Skip to content

Instantly share code, notes, and snippets.

View ronin13's full-sized avatar

Raghavendra Prabhu ronin13

View GitHub Profile
anonymous
anonymous / gist:2523336
Created April 29, 2012 02:01
Changing author info
#!/bin/sh
git filter-branch --env-filter '
an="$GIT_AUTHOR_NAME"
am="$GIT_AUTHOR_EMAIL"
cn="$GIT_COMMITTER_NAME"
cm="$GIT_COMMITTER_EMAIL"
if [ "$GIT_COMMITTER_EMAIL" = "[email protected]" ]
@anekos
anekos / evernote-webclipper-methods.js
Created May 6, 2012 04:45
evernote web clipper のメソッド一覧
evernote_doAction( document.popupNode, 'CLIP_ACTION_FULL_PAGE' );
evernote_doAction( document.popupNode, 'CLIP_ACTION_IMAGE' );
evernote_doAction( document.popupNode, 'CLIP_ACTION_SELECTION' );
evernote_doAction( document.popupNode, 'CLIP_ACTION_URL' );
evernote_doAction( document.popupNode, 'NEW_NOTE_ACTION' );
@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

@lichengwu
lichengwu / view_jvm_commandline_flags
Created July 3, 2012 00:38
about jvm command line flags
#list all changed flags
-XX:+PrintCommandLineFlags
#list all changeable flags and final default values
-XX:+PrintFlagsFinal
#list all changeable flags and initial default values
-XX:+PrintFlagsInitial
eg:
@jayjanssen
jayjanssen / gist:3061311
Created July 6, 2012 16:57
Find pt-table-checksum diffs that are not MEMORY tables and in a specific schema
SELECT db, tbl, SUM(this_cnt) AS total_rows, COUNT(*) AS chunks
FROM percona.checksums, information_schema.tables
WHERE
percona.checksums.db=information_schema.tables.TABLE_SCHEMA AND
percona.checksums.tbl=information_schema.tables.TABLE_NAME AND
information_schema.tables.ENGINE != 'MEMORY' AND
percona.checksums.db='myDB' AND
(
master_cnt <> this_cnt
OR master_crc <> this_crc
@jasonrudolph
jasonrudolph / 00-about.md
Created September 21, 2012 18:42
Rough Notes from Strange Loop 2012
@gnarf
gnarf / ..git-pr.md
Last active October 17, 2024 18:48
git pr - Global .gitconfig aliases for Pull Request Managment

Install

Either copy the aliases from the .gitconfig or run the commands in add-pr-alias.sh

Usage

Easily checkout local copies of pull requests from remotes:

  • git pr 4 - creates local branch pr/4 from the github upstream(if it exists) or origin remote and checks it out
  • git pr 4 someremote - creates local branch pr/4 from someremote remote and checks it out
@mopemope
mopemope / log
Created May 13, 2014 08:34
run systemd-nspawn docker container
core@coreos-local ~ $ ./nspawn-container jmatis/tomcat7 "/opt/start-watch-tomcat.sh"
Pulling repository jmatis/tomcat7
b3dfa5e5f738: Download complete
511136ea3c5a: Download complete
5e66087f3ffe: Download complete
4d26dd3ebc1c: Download complete
d4010efcfd86: Download complete
99ec81b80c55: Download complete
c17d434dd941: Download complete
180579a76826: Download complete
@LordZamy
LordZamy / mergesort.go
Created October 14, 2014 02:48
Merge sort in Golang
package main
import (
"fmt"
)
func main() {
A := []int{3, 5, 1, 6, 1, 7, 2, 4, 5}
fmt.Println(sort(A))
}
@tlockney
tlockney / questions.md
Last active November 24, 2015 08:10
What questions would you put on a phone screen for a distributed systems position?

What questions would you put on a phone screen for a distributed systems position?

These come from @tsantero with the last two additions being curteousy of @ifesdjeen in reply to this question from @SeanTAllen.

  1. explain the life of an http request.
  2. what does the FLP result teach us?
  3. what is a byzantine failure?
  4. explain CRDTs
  5. explain linearizability.
  6. how does DNS work?