Skip to content

Instantly share code, notes, and snippets.

View hvgirish's full-sized avatar

Girish Hemmige Venkatappa hvgirish

View GitHub Profile
@gleicon
gleicon / gDNS.py
Created July 10, 2011 03:31
gevent/dnslib/redis based DNS server
# dns server using dnslib and gevent
# based on https://bitbucket.org/paulc/dnslib/src/80d85555aae4/src/server/gevent_server.py
# set the key as
# set IP:name ip_addr
# set TXT:name txtfield
# fallback on gevent's dns resolver
# gleicon 2011
import gevent
@funny-falcon
funny-falcon / cumulative_performance.patch
Created January 22, 2012 19:19
ruby-1.9.3-p0 cumulative performance patch.
diff --git a/common.mk b/common.mk
index ea244cc..4f22609 100644
--- a/common.mk
+++ b/common.mk
@@ -629,7 +629,8 @@ file.$(OBJEXT): {$(VPATH)}file.c $(RUBY_H_INCLUDES) {$(VPATH)}io.h \
gc.$(OBJEXT): {$(VPATH)}gc.c $(RUBY_H_INCLUDES) {$(VPATH)}re.h \
{$(VPATH)}regex.h $(ENCODING_H_INCLUDES) $(VM_CORE_H_INCLUDES) \
{$(VPATH)}gc.h {$(VPATH)}io.h {$(VPATH)}eval_intern.h {$(VPATH)}util.h \
- {$(VPATH)}debug.h {$(VPATH)}internal.h {$(VPATH)}constant.h
+ {$(VPATH)}debug.h {$(VPATH)}internal.h {$(VPATH)}constant.h \
@burke
burke / 0-readme.md
Created January 27, 2012 13:44 — forked from funny-falcon/cumulative_performance.patch
ruby-1.9.3-p327 cumulative performance patch for rbenv

ruby-1.9.3-p327 cumulative performance patch for rbenv

This installs a patched ruby 1.9.3-p327 with various performance improvements and a backported COW-friendly GC, all courtesy of funny-falcon.

Requirements

You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf using homebrew.

[65926] 07 Jul 20:59:47.815 * +SLAVE New slave for master mymaster attached: 127.0.0.1:6380
[65926] 07 Jul 20:59:53.994 * +SENTINEL added for master mymaster (127.0.0.1:6379) with runid 9e9854b802195e9fc76e1bfdd77b50c96dcfac14 running at 127.0.0.1:26380
[65926] 07 Jul 21:00:00.305 * +SDOWN master mymaster (127.0.0.1:6379) is subjectively down
[65926] 07 Jul 21:00:00.521 * +ODOWN master mymaster (127.0.0.1:6379) is objectively down (quorum 2/2)
[65926] 07 Jul 21:00:00.521 # +FAILOVER-START of mymaster (127.0.0.1:6379), I'm the elected leader
@kgriffs
kgriffs / sysctl.conf
Last active March 21, 2025 04:08
Linux Web Server Kernel Tuning
# Configuration file for runtime kernel parameters.
# See sysctl.conf(5) for more information.
# See also http://www.nateware.com/linux-network-tuning-for-2013.html for
# an explanation about some of these parameters, and instructions for
# a few other tweaks outside this file.
#
# See also: https://gist.github.com/kgriffs/4027835
#
# Assumes a beefy machine with lots of network bandwidth
@KartikTalwar
KartikTalwar / Documentation.md
Last active February 28, 2025 10:57
Rsync over SSH - (40MB/s over 1GB NICs)

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
@raggi
raggi / validate_local_cache.sh
Last active December 11, 2015 23:39
A script to validate your local gem cache against the public s3 repositories. If you find mismatches that contain both local and remote values, please post them in comments.
#!/usr/bin/env sh
if ! which md5sum > /dev/null; then
echo Install md5sum
exit 1
fi
if ! which curl > /dev/null; then
echo Install curl
exit 1
@mongolab-org
mongolab-org / watch-flip-flop.py
Last active August 5, 2016 23:05
check out http://mongolab.org/flip-flop/ for a more detailed explanation
#!/usr/bin/env python
# Written with pymongo-3.3
author__ = 'mongolab' \
import pymongo
import sys, datetime, time
import random
@clemensg
clemensg / etc_sysctl.conf
Created February 5, 2014 16:50
My FreeBSD /etc/sysctl.conf
# /etc/sysctl.conf
# Clemens Gruber, 2014
#
# Uncomment this to prevent users from seeing information about processes that
# are being run under another UID.
security.bsd.see_other_uids=0
## I/O
riak_core_util:rpc_every_member_ann(application, set_env, [riak_kv, anti_entropy_build_limit, {1, 86400000}], 5000).
riak_core_util:rpc_every_member_ann(application, set_env, [riak_kv, anti_entropy_concurrency, 1], 5000).
riak_core_util:rpc_every_member_ann(application, set_env, [riak_kv, anti_entropy_expire, 2419200000], 5000).