Skip to content

Instantly share code, notes, and snippets.

View dalanmiller's full-sized avatar
👨‍💻

dalan dalanmiller

👨‍💻
View GitHub Profile
@hellerbarde
hellerbarde / latency.markdown
Created May 31, 2012 13:16 — forked from jboner/latency.txt
Latency numbers every programmer should know

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
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

@dergachev
dergachev / GIF-Screencast-OSX.md
Last active April 19, 2024 11:00
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@jmdobry
jmdobry / Instructions.md
Last active August 31, 2021 18:21
Nginx reverse-proxy for RethinkDB Admin UI

Start your rethinkdb instance with this flag: --bind all (or bind=all in the configuration file for your instance)

Block external access to the web UI with these two commands: sudo iptables -A INPUT -i eth0 -p tcp --dport 8080 -j DROP sudo iptables -I INPUT -i eth0 -s 127.0.0.1 -p tcp --dport 8080 -j ACCEPT

Install nginx: sudo apt-get install nginx

@wookiecooking
wookiecooking / aliases.sh
Created November 30, 2013 00:52
[Shell] Assortment of OSX influenced bash aliases and functions
# Rails Stuff
alias stoprails='kill -9 $(lsof -i :3000 -t)'
alias startrails='rails server -d'
alias restartrails='stopRails && startRails'
#Check PHP For Erroes
alias phpcheck='find ./ -name \*.php | xargs -n 1 php -l'
# ROT13-encode text. Works for decoding, too! ;)
alias rot13='tr a-zA-Z n-za-mN-ZA-M'
@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active April 16, 2024 23:05
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\

@bsweger
bsweger / useful_pandas_snippets.md
Last active April 19, 2024 18:04
Useful Pandas Snippets

Useful Pandas Snippets

A personal diary of DataFrame munging over the years.

Data Types and Conversion

Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)

@1328
1328 / aliens.py
Last active August 29, 2015 14:07
aliens - try
import random
from collections import defaultdict
from pprint import pprint
class City(object):
def __init__(self, data=None):
self.name = None
self.neighbors = {}
if data is not None:
@comerford
comerford / mongo_wt_zlib.conf
Last active January 9, 2017 12:08
YAML Config for MongoDB 2.7.9 - WiredTiger, zlib compression
storage:
dbPath: "/ssd/db/wt_zlib"
engine: "wiredTiger"
wiredTiger:
collectionConfig: "block_compressor=zlib"
systemLog:
destination: file
path: "/data/wt_zlib/mongodb.log"
processManagement:
fork: true
@attacus
attacus / riot-matrix-workshop.md
Last active March 13, 2024 00:16
Create your own encrypted chat server with Riot and Matrix

This guide is unmaintained and was created for a specific workshop in 2017. It remains as a legacy reference. Use at your own risk.

Running your own encrypted chat service with Matrix and Riot

Workshop Instructor:

This workshop is distributed under a CC BY-SA 4.0 license.

What are we doing here?

@steven2358
steven2358 / ffmpeg.md
Last active April 19, 2024 05:16
FFmpeg cheat sheet