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
@aristus
aristus / .pythonrc
Created November 16, 2015 21:55
Useful constants for capacity planning.
import math,re
# binary "oodles of magnitude"
KB = 2 ** 10
MB = 2 ** 20
GB = 2 ** 30
TB = 2 ** 40
PB = 2 ** 50
# decimal "oodles of magnitude"
@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?
@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:
@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
@danikin
danikin / tar_test.c
Last active December 18, 2020 07:28
Tarantool Quick Test
// Tarantool quick test
// Copyright, Dennis Anikin 2016
//
// Quick disclaimer:
//
// This test shows 500K-1000K transactions per second on one CPU core
// and 600K-1600K queries per second on one CPU core.
//
// Based on the $6.57 per-month-price for the AWS t2.micro instance we can afford the tremendous number of 630bln queries for just $1
//
@iamralch
iamralch / context.go
Created November 20, 2015 13:05
An example that illustrates how to work with https://godoc.org/golang.org/x/net/context
package main
import (
"bufio"
"fmt"
"os"
"strings"
"time"
"golang.org/x/net/context"
@jamesls
jamesls / sqlite-threads.py
Last active February 2, 2022 09:24
Making sqlite slower in python by using threads:
import os
import time
import sqlite3
import threading
conn = None
def create_table():
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" ]
@jasonrudolph
jasonrudolph / 00-about.md
Created September 21, 2012 18:42
Rough Notes from Strange Loop 2012