Skip to content

Instantly share code, notes, and snippets.

View Manzanit0's full-sized avatar

Javier García Manzanit0

View GitHub Profile
@solarkraft
solarkraft / custom.css
Last active March 2, 2024 12:08
Logseq custom.css for publishing
/*** Publishing: Hide things that aren't very useful for a read-only view */
/** Hide page properties (public pages will always have public: true) */
.content .pre-block { display: none; }
/** Title */
/* Make title non-editable */
#main-container .page-title { pointer-events: none; }
/** Hide useless sidebar stuff */
@2hamed
2hamed / client.go
Created February 24, 2021 09:23
http server/client to showcase timeout
package main
import (
"fmt"
"io/ioutil"
"net/http"
"time"
)
type rt struct {
@joaoqalves
joaoqalves / tramos.js
Created February 7, 2021 10:34
Tramos IRPF
// Fuente: https://cincodias.elpais.com/herramientas/calculadora-irpf/
var datos = {
// (*) ESTATAL
'E':[
[0, 12450, 9.5],
[12450, 20200, 12],
[20200, 35200, 15],
[35200, 60000, 18.5],
[60000, 999999999999, 22.5],
@ninedraft
ninedraft / adapter.go
Created July 17, 2020 08:40
Golang STD HTTP to gin middleware adapter
// Copyright 2020 Petrukhin Pavel
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
name: Elixir CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
MIX_ENV: test
on:
pull_request:
types: [closed]
branches:
- master
jobs:
docker:
runs-on: ubuntu-latest
if: github.event.pull_request.merged
steps:
@cblavier
cblavier / ntest.ex
Created October 7, 2019 16:17
Parallel test runner
defmodule Mix.Tasks.NTest do
use Mix.Task
@wildcard "apps/*/test/**/*_test.exs"
def run([i, n | args]) do
{i, _} = Integer.parse(i)
{n, _} = Integer.parse(n)
test_paths =
@gvenzl
gvenzl / One Liner to download the latest release from your GitHub repo.md
Last active July 21, 2024 19:22
One Liner to download the latest release from your GitHub repo
LOCATION=$(curl -s https://api.github.com/repos/<YOUR ORGANIZTION>/<YOUR REPO>/releases/latest \
| grep "zipball_url" \
| awk '{ print $2 }' \
| sed 's/,$//'       \
| sed 's/"//g' )     \
; curl -L -o <OUTPUT FILE NAME> $LOCATION

for example:

@milesbxf
milesbxf / monzo-alertmanager-config.yaml
Last active September 20, 2024 11:15
Monzo's Alertmanager Slack templates
###################################################
##
## Alertmanager YAML configuration for routing.
##
## Will route alerts with a code_owner label to the slack-code-owners receiver
## configured above, but will continue processing them to send to both a
## central Slack channel (slack-monitoring) and PagerDuty receivers
## (pd-warning and pd-critical)
##
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active September 23, 2024 02:55
set -e, -u, -o, -x pipefail explanation