Skip to content

Instantly share code, notes, and snippets.

View jfisbein's full-sized avatar

Joan jfisbein

View GitHub Profile
@jboner
jboner / latency.txt
Last active July 22, 2024 14:44
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@adamloving
adamloving / temporary-email-address-domains
Last active May 31, 2024 15:43
A list of domains for disposable and temporary email addresses. Useful for filtering your email list to increase open rates (sending email to these domains likely will not be opened).
0-mail.com
0815.ru
0clickemail.com
0wnd.net
0wnd.org
10minutemail.com
20minutemail.com
2prong.com
30minutemail.com
3d-painting.com
@willurd
willurd / web-servers.md
Last active July 22, 2024 15:25
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@aras-p
aras-p / preprocessor_fun.h
Last active July 16, 2024 02:50
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@rb2k
rb2k / gist:8372402
Last active April 15, 2024 19:30
A jenkins script to clean up workspaces on slaves
// Check if a slave has < 10 GB of free space, wipe out workspaces if it does
import hudson.model.*;
import hudson.util.*;
import jenkins.model.*;
import hudson.FilePath.FileCallable;
import hudson.slaves.OfflineCause;
import hudson.node_monitors.*;
for (node in Jenkins.instance.nodes) {
@dcode
dcode / GitHub Flavored Asciidoc (GFA).adoc
Last active June 23, 2024 21:12
Demo of some useful tips for using Asciidoc on GitHub

GitHub Flavored Asciidoc (GFA)

@jfisbein
jfisbein / update-fritzbox-ssl.sh
Last active April 30, 2017 11:27
Script to update FritzBox ssl certificate
#!/bin/bash
FB_URL=""
SID=""
SID_FILE="/tmp/fb_sid"
function init() {
FB_URL="$1"
if [ ! -f $SID_FILE ]; then
@nandosola
nandosola / MLG-howto.md
Last active February 16, 2020 10:55
Málaga tips (from a local)

Moverse

A y desde el Centro

Alameda Principal y Plaza de la Merced son los puntos más céntricos accesibles por tte. público.

Metro

La Térmica está cerca de la estación de La Luz-La Paz. Para ir al centro, bájate en El Perchel (aka RENFE-María Zambrano) y camina hasta el centro (unos 20 min) o bien pilla el C2 o el 1 en la c/ Salitre y bájate en la parada de Pza. de La Merced.

@jfisbein
jfisbein / install-oscam.sh
Last active May 12, 2024 08:59
install and update oscam on raspbian
#!/bin/bash
set -e
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root" 1>&2
exit 1
fi
function install() {
@dakoctba
dakoctba / AppConfig.java
Last active January 22, 2024 11:58
Spring Boot + JDBI + Multiple Databases
import java.util.List;
import javax.sql.DataSource;
import org.jdbi.v3.core.Jdbi;
import org.jdbi.v3.core.mapper.RowMapper;
import org.jdbi.v3.core.spi.JdbiPlugin;
import org.jdbi.v3.sqlobject.SqlObjectPlugin;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.actuate.autoconfigure.metrics.MeterRegistryCustomizer;