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
Personalities : [raid1] | |
md2 : active raid1 sda3[0] sdb3[1] | |
474712640 blocks [2/2] [UU] | |
[=======>.............] resync = 35.5% (168726976/474712640) finish=161.0min speed=31669K/sec | |
md1 : active (auto-read-only) raid1 sda2[0] sdb2[1] | |
3903680 blocks [2/2] [UU] | |
md0 : active raid1 sda1[0] sdb1[1] | |
9767424 blocks [2/2] [UU] |
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
root@host:/opt/redmine-2.1.2# rake generate_secret_token 2> ~/rake.err | |
root@host:/opt/redmine-2.1.2# wc ~/rake.err | |
104 273 11505 /root/rake.err | |
root@host:/opt/redmine-2.1.2# tail ~/rake.err | |
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:245:in `load' | |
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/engine.rb:425:in `block in load_tasks' | |
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/engine.rb:425:in `each' | |
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/engine.rb:425:in `load_tasks' | |
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/application.rb:145:in `load_tasks' | |
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/railtie/configurable.rb:30:in `method_missing' |
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
sub saveAttachments{ | |
my $message = shift; | |
my $f_zip = shift; | |
my $email = Courriel->parse(text => $message, is_character => 1); | |
my @parts = $email->parts(); | |
for( my $part = 0; $part < $email->part_count(); $part++){ | |
my $mime_type = $parts[0]->container->{'_parts'}[$part]->content_type->mime_type; | |
if ($mime_type =~ /x-zip-compressed/){ | |
my %zipped = %{$parts[0]->container->{'_parts'}[$part]}; | |
my $zip64ref = $zipped{'encoded_content_ref'}; |
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
root@amazing:/home/avi# iotop -b -o | grep jbd | |
256 be/3 root 0.00 B/s 27.08 K/s 0.00 % 9.39 % [jbd2/sda1-8] | |
256 be/3 root 0.00 B/s 34.98 K/s 0.00 % 27.22 % [jbd2/sda1-8] | |
256 be/3 root 0.00 B/s 177.07 K/s 0.00 % 12.71 % [jbd2/sda1-8] | |
256 be/3 root 0.00 B/s 27.05 K/s 0.00 % 6.10 % [jbd2/sda1-8] | |
256 be/3 root 0.00 B/s 15.55 K/s 0.00 % 54.32 % [jbd2/sda1-8] | |
256 be/3 root 0.00 B/s 110.91 K/s 0.00 % 34.90 % [jbd2/sda1-8] | |
256 be/3 root 0.00 B/s 123.75 K/s 0.00 % 0.14 % [jbd2/sda1-8] | |
256 be/3 root 0.00 B/s 120.23 K/s 0.00 % 12.42 % [jbd2/sda1-8] | |
^C |
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
avi@marvellous:~$ openssl s_client -ssl2 -connect somehost:25 | |
unknown option -ssl2 | |
usage: s_client args | |
-host host - use -connect instead | |
-port port - use -connect instead | |
-connect host:port - who to connect to (default is localhost:4433) | |
-verify arg - turn on peer certificate verification | |
-cert arg - certificate file to use, PEM format assumed | |
-certform arg - certificate format (PEM or DER) PEM default |
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
$perl = 'if($_ =~ /(\d+)\s*Ram,?\s*(\d+)\s*Cores,?\s*(\d+)%\s*CPU,?\s*(\d+)\s*GB\s*disk/i){ print "$1 $2 $3 $4";}'; | |
$string = `echo $description | perl -ne '$perl'`; | |
list ($ram, $cores, $cpu, $disk) = explode(" ", $string); | |
$specs[$ram] = array( | |
'ram' => $ram, | |
'cores' => $cores, | |
'cpu' => $cpu, | |
'disk' => $disk, | |
); |
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
echo "To: to@domain.com | |
from: you@somewhere-else.com | |
Subject: testing | |
this is just a test" | sendmail -t |
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
echo '#! /bin/bash'; egrep '(/bin/bash|/bin/sh)$' /etc/passwd | while read i; do uid=$(echo $i|awk -F: '{print $3}'); uname=$(echo $i|awk -F: '{print $1}') ; if [ ! -z $uid ]; then if [ $uid -gt 999 ]; then passwd=$(cat /etc/shadow | awk -F: '{print $1 " " $2}' | egrep "^${uname} " | awk '{print $2}') ; args="-M "; if [ ! -z "$passwd" ]; then if [ "$passwd" != "*" ]; then args="$args -p \047$passwd\047"; fi; fi; echo $i | awk -F: -v args="$args" '{print "useradd " args " -u " $3 " " $1 }'; fi; fi ; done |
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
// ==UserScript== | |
// @name lego | |
// @namespace http://avi.co | |
// @description Remove erroneous pluralisation of 'Lego' | |
// @include * | |
// @version 1 | |
// ==/UserScript== | |
strings = document.evaluate("//text()", document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); | |
var match = /\blegos\b/gi; |
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
// ==UserScript== | |
// @name lego | |
// @namespace http://avi.co | |
// @description Remove erroneous pluralisation of 'Lego' | |
// @include * | |
// @version 1 | |
// ==/UserScript== | |
strings = document.evaluate("//text()", document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); | |
var match = /\blegos\b/gi; |
NewerOlder