This file contains 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/perl -w | |
use strict; | |
use POSIX; | |
my $MAX_EXEC_TIME = 10; | |
my $pid; | |
eval { | |
local $SIG{'ALRM'} = sub { die "timed out\n" }; |
This file contains 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
urxvt.foreground: White | |
urxvt.saveLines: 20000 | |
urxvt.scrollBar: off | |
urxvt.font: xft:inconsolata:size=10:autohint=true:antialias=true | |
urxvt*foreground: #f2f2f2 | |
!urxvt*background: #101010 | |
urxvt*background: #002b37 |
This file contains 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
from fabric.api import run, hosts,env | |
import logging | |
logging.basicConfig( level=logging.ERROR ) | |
env['use_ssh_config'] = True | |
SVN_USER = 'XXXXXXXX' | |
BASE_PATH = """ $DISTRIBUTE_TOP/dist_top_syscontrol/projects/dod/ """ |
This file contains 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
data:text/html, <body contenteditable style="font-size:2rem;line-height:1.4;max-width:60rem;margin:0 auto;padding:4rem;"> |
This file contains 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
avconv -i $file.mp4 -vcodec mpeg4 -acodec ac3 -ab 128k -ac 2 $file.avi |
This file contains 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
#Youtube ADS filtering | |
$IPTABLES -A INPUT -s 206.111.0.0/16 -j REJECT | |
$IPTABLES -A INPUT -s 173.194.55.0/24 -j REJECT | |
# Opening port 80 | |
iptables -I INPUT -p tcp --dport 80 -j ACCEPT |
This file contains 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
Config { font = "-Misc-Fixed-Bold-R-Normal--13-100-75-75-C-70-ISO8859-1" | |
, bgColor = "#101030" | |
, fgColor = "grey" | |
, position = Static { xpos = 0 , ypos = 0, width = 1024, height = 16 } | |
, commands = [ Run Cpu ["-L","3","-H","50","--normal","green","--high","red"] 10 | |
, Run Memory ["-t","Mem: <usedratio>%"] 10 | |
, Run Swap [] 10 | |
, Run StdinReader | |
] |
This file contains 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
Config { font = "-*-Fixed-Bold-R-Normal-*-13-*-*-*-*-*-*-*" | |
, bgColor = "black" | |
, fgColor = "grey" | |
, position = Top | |
, border = NoBorder | |
, borderColor = "black" | |
, lowerOnStart = True | |
, commands = [ Run Cpu ["-L","3","-H","50","--normal","green","--high","red"] 10 | |
, Run Memory ["-t","Mem: <usedratio>%"] 10 | |
, Run Swap [] 10 |
This file contains 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
# Warning! Dangerous step! Destroys VMs | |
for x in $(virsh list --all | grep instance- | awk '{print $2}') ; do | |
virsh destroy $x ; | |
virsh undefine $x ; | |
done ; | |
# Warning! Dangerous step! Removes lots of packages, including many | |
# which may be unrelated to RDO. | |
yum remove -y nrpe "*nagios*" puppet "*ntp*" "*openstack*" \ | |
"*nova*" "*keystone*" "*glance*" "*cinder*" "*swift*" \ |
This file contains 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/env perl | |
use DBI; | |
use warnings; | |
# DB Connection | |
my $dsn = "DBI:mysql:information_schema:dbod-testinstance:5500:mysql_read_default_file=$ENV{HOME}/.my.cnf"; | |
$dbh = DBI->connect($dsn,undef, undef, {RaiseError => 1}) | |
or die "Connection Error: $DBI::errstr\n"; |
OlderNewer