Skip to content

Instantly share code, notes, and snippets.

View IGZalbertogregoris's full-sized avatar

Alberto IGZalbertogregoris

  • Intelygenz
View GitHub Profile
@IGZalbertogregoris
IGZalbertogregoris / increase_network_latency.sh
Created March 17, 2014 07:34
Emulate network latency in Linux
# Install iproute (Ubuntu)
sudo apt-get install iproute
# Increase network latency in eth0 (250 milliseconds)
sudo tc qdisc add dev eth0 root netem delay 250ms
# Delete network modifications
sudo tc qdisc del dev eth0 root netem
# To make this change in localhost you must only replace "eth0" to "lo" ( --- WARNING --- in this case time will double )
@IGZalbertogregoris
IGZalbertogregoris / loadSSHKeys.sh
Last active August 29, 2015 13:55
Load ssh keys to run vagrant-google plugin
eval $(ssh-agent)
ssh-add $PATH_TO_SSH_KEY
@IGZalbertogregoris
IGZalbertogregoris / gist:8351616
Created January 10, 2014 13:05
Deploy a multi-machine etcd cluster in a multicloud environment with high geographic distribution
https://github.com/coreos/etcd/blob/master/Documentation/tuning.md
@IGZalbertogregoris
IGZalbertogregoris / get_privet_ip_address.sh
Created December 19, 2013 12:03
Get private ip address
hostname -I | cut -d ' ' -f 1
@IGZalbertogregoris
IGZalbertogregoris / set_attributes_dynamically.rb
Created December 15, 2013 10:36
In Ruby set dynamically object's attributes
class Test
attr_accessor :attribute
def initialize(attribute)
@attribute = attribute
end
end
obj = Test.new('Hello')
puts obj.attribute
@IGZalbertogregoris
IGZalbertogregoris / add-apt-repository.sh
Created November 29, 2013 11:14
It install "add-apt-repository" command
sudo apt-get install software-properties-common
@IGZalbertogregoris
IGZalbertogregoris / .screenrc
Created November 27, 2013 14:41
screenrc status bar configuration (~/.screenrc)
"# turns off the license screen
startup_message off
# Status bar
hardstatus on
hardstatus alwayslastline
hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{= kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B} %m-%d %{W}%c %{g}]'
# define a bigger scrollback, default is 100 lines.
defscrollback 10000