This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 23 test! | |
ciao test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
svn checkout <url_of_big_dir> <target> --depth empty | |
cd <target> | |
svn up <file_you_want> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'aws-sdk' | |
KEY = 'xxx' | |
SEC = 'yyy' | |
ec2 = AWS::EC2.new(:access_key_id=> KEY, :secret_access_key=> SEC, :region=> 'eu-west-1') | |
volumes = ec2.volumes.tagged('Backup','backup','BACKUP').tagged_values('true','True','TRUE') | |
snapshots = ec2.snapshots.with_owner(:self).tagged('aws_sm').tagged_values('true') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HTTP request limiting =================================================================================================================== | |
frontend ft_web | |
# Use General Purpose Couter (gpc) 0 in SC1 as a global abuse counter | |
# Monitors the number of request sent by an IP over a period of 10 seconds | |
stick-table type ip size 1m expire 10s store gpc0,http_req_rate(10s) | |
tcp-request connection track-sc1 src | |
# refuses a new connection from an abuser | |
tcp-request content reject if { src_get_gpc0 gt 0 } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
watch -n 1 'echo "show table http" | socat unix:/var/run/haproxy.sock -' | |
watch -n 1 'echo "show table public" | socat unix:/var/run/haproxy.sock -' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
require 'rubygems' | |
require 'aws-sdk' | |
KEY = 'xxx' | |
SEC = 'xxx' | |
REGION = 'eu-west-1' | |
ec2 = AWS::EC2.new(:access_key_id=> KEY, :secret_access_key=> SEC, :region=> REGION) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sed 's/\,\ [0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}//g' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ubuntu Ruby Nogokiri requirements: | |
ruby2.0 | |
libxslt-dev | |
libxml2-dev | |
ruby1.9.1-dev | |
build-essential |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
screen /dev/tty.usbserial 9600 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
i=0 | |
while [ $i -le 10 ]; do | |
i=$(($i+1)) | |
echo $i | |
done |
NewerOlder