Skip to content

Instantly share code, notes, and snippets.

Avatar

Senthil Arivudainambi sent-hil

View GitHub Profile
@karmi
karmi / .gitignore
Created Apr 3, 2011
Visualizing timelines with Protovis and date histogram facet in ElasticSearch
View .gitignore
.DS_Store
tmp/
@bergie
bergie / README.md
Created May 18, 2011
Falsy Values tutorials
View README.md
@mikeyk
mikeyk / gist:1329319
Created Oct 31, 2011
Testing storage of millions of keys in Redis
View gist:1329319
#! /usr/bin/env python
import redis
import random
import pylibmc
import sys
r = redis.Redis(host = 'localhost', port = 6389)
mc = pylibmc.Client(['localhost:11222'])
@shilov
shilov / redis_json_marshal_eval_benchmarks.rb
Created Jan 27, 2012
Ruby Redis benchmarks for JSON vs Marshal vs String
View redis_json_marshal_eval_benchmarks.rb
# http://forrst.com/posts/JSON_vs_Marshal_vs_eval_Which_is_the_fastest_fo-6Qy
require 'benchmark'
require 'json'
require 'redis'
# -----------------
puts "Initialize variables.."
@JoshuaEstes
JoshuaEstes / 000-Cheat-Sheets.md
Last active Jul 3, 2020
Developer Cheat Sheets for bash, git, gpg, irssi, mutt, tmux, and vim. See my dotfiles repository for extra info.
@jboner
jboner / latency.txt
Last active Aug 13, 2020
Latency Numbers Every Programmer Should Know
View latency.txt
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
@KartikTalwar
KartikTalwar / Documentation.md
Last active Aug 12, 2020
Rsync over SSH - (40MB/s over 1GB NICs)
View Documentation.md

The fastest remote directory rsync over ssh archival I can muster (40MB/s over 1gb NICs)

This creates an archive that does the following:

rsync (Everyone seems to like -z, but it is much slower for me)

  • a: archive mode - rescursive, preserves owner, preserves permissions, preserves modification times, preserves group, copies symlinks as symlinks, preserves device files.
  • H: preserves hard-links
  • A: preserves ACLs
View jsmem.md

JavaScript Code

var str = "hi";

Memory allocation:

Address Value Description
...... ...
@drewolson
drewolson / reflection.go
Last active Aug 13, 2020
Golang Reflection Example
View reflection.go
package main
import (
"fmt"
"reflect"
)
type Foo struct {
FirstName string `tag_name:"tag 1"`
LastName string `tag_name:"tag 2"`
You can’t perform that action at this time.