Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
#
# NINETEEN.SH
# This script allows you to install/update Enlightenment 19 git version on
# Ubuntu 14.04 LTS or Debian wheezy/sid, or remove E19 git from your system.
# Originally from: http://ubuntuforums.org/showthread.php?t=2203190
# By: Philippe J. Guillaumie (batden AT sfr DOT fr).
# Additional updates by: Bryan Hundven (bryanhundven AT gmail DOT com).
#
# Tip:
@sigmonsays
sigmonsays / lama
Last active August 29, 2015 14:07 — forked from tech6/lama
NNNNNNNNNNNNNNNNNNNNNDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDNNNNNNNNNNNNNNNNNNNNNN
NNNNNNNNNNNNNNNNNNDDDNDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDNNNNNNNNNNNNNNNNNN
NNNNNNNNNNNNNNNNNDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDNNNNNNNNNNNNNNN
NNNNNNNNNNNNNNNDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDZ?NDDDDDDDDDDDDDDDDDDDNNNNNNNNNNNNN
NNNNNNNNNNNNNDDDDDDDDDDDDDDDDDDD?:$DDDDD8+DDD:=,DDDDDDDDDDDDDDDDDDDDDNNNNNNNNNNN
NNNNNNNNNNNDDDDDDDDDDDDDDDDDDDDO?O:DD8DZ+$DDN:D=+DDDDDDDDDDDDDDDDDDDDDDDNNNNNNNN
NNNNNNNNDDDDDDDDDDDDDDDDDDDDDD8:88~D8D?+++78O:8Z:DDDDDDDDDDDDDDDDDDDDDDDDDNNNNNN
NNNNNNDDDDDDDDDDDDDDDDDDDDDDDD8+8D=+DI?Z8+?D+:8$:DDDDDDDDDDDDDDDDDDDDDDDDDDNNNNN
NNNNNDDDDDDDDDDDDDDDDDDDDDDDDDD+D8?~=?$=8=7Z::8I:D8DDDDDDDDDDDDDDDDDDDDDDDDNNNNN
NNNDDDDDDDDDDDDDDDDDDDDDDDDDD8D+IOIZ$7ZDD7+$:~O=~D8DDDDDDDDDDDDDDDDDDDDDDDDDNNNN

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns                     on recent CPU
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 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs 4X memory

@sigmonsays
sigmonsays / lama
Last active August 29, 2015 14:10 — forked from tech6/lama
NNNNNNNNNNNNNNNNNNNNNDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDNNNNNNNNNNNNNNNNNNNNNN
NNNNNNNNNNNNNNNNNNDDDNDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDNNNNNNNNNNNNNNNNNN
NNNNNNNNNNNNNNNNNDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDNNNNNNNNNNNNNNN
NNNNNNNNNNNNNNNDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDZ?NDDDDDDDDDDDDDDDDDDDNNNNNNNNNNNNN
NNNNNNNNNNNNNDDDDDDDDDDDDDDDDDDD?:$DDDDD8+DDD:=,DDDDDDDDDDDDDDDDDDDDDNNNNNNNNNNN
NNNNNNNNNNNDDDDDDDDDDDDDDDDDDDDO?O:DD8DZ+$DDN:D=+DDDDDDDDDDDDDDDDDDDDDDDNNNNNNNN
NNNNNNNNDDDDDDDDDDDDDDDDDDDDDD8:88~D8D?+++78O:8Z:DDDDDDDDDDDDDDDDDDDDDDDDDNNNNNN
NNNNNNDDDDDDDDDDDDDDDDDDDDDDDD8+8D=+DI?Z8+?D+:8$:DDDDDDDDDDDDDDDDDDDDDDDDDDNNNNN
NNNNNDDDDDDDDDDDDDDDDDDDDDDDDDD+D8?~=?$=8=7Z::8I:D8DDDDDDDDDDDDDDDDDDDDDDDDNNNNN
NNNDDDDDDDDDDDDDDDDDDDDDDDDDD8D+IOIZ$7ZDD7+$:~O=~D8DDDDDDDDDDDDDDDDDDDDDDDDDNNNN
@sigmonsays
sigmonsays / reload_iptables.sh
Created December 2, 2015 01:19 — forked from eqhmcow/reload_iptables.sh
unload the iptables modules and then reload them and apply the firewall rules stored at /etc/iptables.conf - adapted from RHEL 5's iptables services script
IPTABLES=iptables
IPV=${IPTABLES%tables} # ip for ipv4 | ip6 for ipv6
PROC_IPTABLES_NAMES=/proc/net/${IPV}_tables_names
/sbin/modprobe --version 2>&1 | grep -q module-init-tools \
&& NEW_MODUTILS=1 \
|| NEW_MODUTILS=0
# Do not stop if iptables module is not loaded.
[ -e "$PROC_IPTABLES_NAMES" ] || exit 1
@sigmonsays
sigmonsays / tmux-cheatsheet.markdown
Created February 17, 2016 18:16 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@sigmonsays
sigmonsays / share_send_app_endpoints.md
Created July 24, 2017 01:05 — forked from StephenBlackWasAlreadyTaken/share_send_app_endpoints.md
DexcomShare Endpoints for the Uploader App
  • these are the calls used by the dexcom uploader app
  • these are in no particular order!
  • User-Agent: Dexcom%20Share/3.0.2.11 CFNetwork/672.0.2 Darwin/14.0.0

General

Read Dexcoms System time clock

GET

@sigmonsays
sigmonsays / sshd.go
Created December 19, 2017 17:00 — forked from jpillora/sshd.go
Go SSH server complete example - Read more here https://blog.gopheracademy.com/go-and-ssh/
// A small SSH daemon providing bash sessions
//
// Server:
// cd my/new/dir/
// #generate server keypair
// ssh-keygen -t rsa
// go get -v .
// go run sshd.go
//
// Client:
@sigmonsays
sigmonsays / main.go
Created January 7, 2018 16:19 — forked from enricofoltran/main.go
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
package main
import (
"context"
"flag"
"fmt"
"log"
"net/http"
"os"
"os/signal"