Skip to content

Instantly share code, notes, and snippets.

View danish-rehman's full-sized avatar

danish-rehman

View GitHub Profile
@danish-rehman
danish-rehman / check_opt_on_queue
Created January 9, 2015 00:58
Command to check the optimization on queuing applied
>> ethtool -k eth4
Offload parameters for eth0:
rx-checksumming: off
tx-checksumming: off
scatter-gather: off
@danish-rehman
danish-rehman / view_txqueuelen
Created January 9, 2015 01:53
View Default txqueuelen
>> ifconfig
TX packets:187170 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
@danish-rehman
danish-rehman / change_txqueuelen
Created January 9, 2015 01:55
Command to change txqueuelen
# Temporarirly
>> ifconfig eth1 txqueuelen 10000
# Permament
# Append the following setting per interface
>> vi /etc/rc.local
/sbin/ifconfig eth1 txqueuelen 10000
@danish-rehman
danish-rehman / install_ruby
Created January 9, 2015 02:08
Initial Ruby installation
>> git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
>> git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
>> rbenv rehash
# Load rbenv
>> eval "$(rbenv init -)"
@danish-rehman
danish-rehman / gist:ab0becee6c84b941f7e2
Created January 9, 2015 02:10
Install ruby versions
>> rbenv install -l
>> rbenv install 1.9.3-p484
@danish-rehman
danish-rehman / gist:1a4cbd75e7578c404bf6
Created January 9, 2015 02:12
Set a ruby version to be your global version
>> rbenv global 1.9.3-p484
@danish-rehman
danish-rehman / install_bundler
Created January 9, 2015 02:13
Install bundler
>> gem install bundler
@danish-rehman
danish-rehman / advance
Last active August 29, 2015 14:13
Git config
function parse_git_branch {
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
ref=${ref#refs/heads/}
unpushed=$(git log -- origin/$ref..$ref 2> /dev/null) || return
if [ "$unpushed" ]; then
@danish-rehman
danish-rehman / git_config_advance
Created January 9, 2015 02:17
Git config advance
function parse_git_branch {
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
ref=${ref#refs/heads/}
unpushed=$(git log -- origin/$ref..$ref 2> /dev/null) || return
if [ "$unpushed" ]; then