Skip to content

Instantly share code, notes, and snippets.

View ronin13's full-sized avatar

Raghavendra Prabhu ronin13

View GitHub Profile
@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
@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:
@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

@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' );
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" = "your@email.to.match" ]