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
def merge_sort(list_struct=[]): | |
""" | |
merge_sort | |
as if there's not enough merge sorts in python out there | |
""" | |
list_len = len(list_struct) | |
if list_len <= 1: | |
return list_struct | |
mid = list_len / 2 |
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 -w | |
# rebx | |
use strict; | |
my $mod = shift(@ARGV); | |
my @customperl = qw(/path/to/perl); | |
push (@INC, @customperl); | |
(!defined($mod)) && exit 1; | |
unless ( eval "require $mod;1") { |
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 $rvm_usr_path | |
/some/path/to/rvm/usr | |
$ rvm remove 1.9.3 | |
Removing /some/path/to/rvm/src/ruby-1.9.3-p0... | |
Removing /some/path/to/rvm/rubies/ruby-1.9.3-p0... | |
Removing ruby-1.9.3-p0 aliases... | |
Removing ruby-1.9.3-p0 wrappers... | |
Removing ruby-1.9.3-p0 environments... |
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
$ cat voidsize.c | |
#include <stdio.h> | |
int main(void) { | |
printf("void size: %d\n", sizeof(void)); | |
return 0; | |
} | |
$ make voidsize | |
cc voidsize.c -o voidsize | |
voidsize.c: In function ‘main’: |
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
live: | |
tshark -i eth0 -aduration:60 -d tcp.port==3306,mysql -T fields -e mysql.query 'port 3306' | |
capture: | |
tcpdump -i eth0 port 3306 -s 1500 -w tcpdump.out | |
tshark -r tcpdump.out -d tcp.port==3306,mysql -T fields -e mysql.query > query_log.out |
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
> rvm use 1.9.2-p290@mall --create | |
Database file /home/rebx/.rvm/user/db does not exist. | |
> __rvm_db | |
bash: /db: No such file or directory | |
> echo $rvm_path |
NewerOlder