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
################################# HELPERS ################################### | |
############################################################################### | |
## Function : unmarshal ( ) | |
## ---------------------------------------------------------------------------- | |
## Description : | |
## unserialize transform array into hash, but keys are not ordered anymore | |
## unmarshal does the unserialize, reorder and return an array | |
## Parameters : | |
## Return : |
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
package XXX::Role::Logger; | |
use Moose::Role; | |
with 'MooseX::Log::Log4perl::Easy' => { | |
-aliases => { | |
log => '_log', | |
log_info => '_log_info', | |
}, | |
-excludes => [qw( log log_info )], |
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 python | |
import argparse | |
import sys | |
import re | |
import csv | |
import tempfile | |
import shutil | |
import subprocess | |
import math |
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
Reading symbols from /home/jevin/jb/greenpois0n_x64...(no debugging symbols found)...done. | |
(gdb) r | |
Starting program: /home/jevin/jb/greenpois0n_x64 | |
[Thread debugging using libthread_db enabled] | |
Program received signal SIGSEGV, Segmentation fault. | |
QMetaObject::cast (this=0x7ffff7752c60, obj=0x7fffffffe1e0) at kernel/qmetaobject.cpp:300 | |
300 kernel/qmetaobject.cpp: No such file or directory. | |
in kernel/qmetaobject.cpp | |
Current language: auto |
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
0 --1-- 1 --1-- 2 --1-- 3 | |
| \ | \ | \ | | |
| \ | \ | \ | | |
1 6 9 10 8 10 1 | |
| \ | \ | \ | | |
| \ | \ | \ | | |
7 --5-- 6 --4-- 5 --8-- 4 | |
\ / | | |
\ / | | |
10 11 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
socket.on('connection', function(client){ | |
console.log('got client: ' + client); | |
var stream = fs.createReadStream('starwars.txt', {encoding: 'utf8'}); | |
framer(stream, 14); // 14 lines per frame | |
stream.on('frame', function(frame, repeat){ | |
console.log('got frame!'); | |
client.send(frame); | |
}); | |
}); |
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 node | |
require.paths.unshift(__dirname + '/modules'); | |
var fs = require('fs'); | |
var framer = require('framer'); | |
var stream = fs.createReadStream(process.argv[2], {encoding: 'utf8'}); | |
framer(stream, 14); // 14 lines per frame |
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
start on started network | |
script | |
for interface in $(cut -d: -f1 /proc/net/dev | tail -n +3); do | |
logger -t 'wakeonlan init script' enabling wake on lan for $interface | |
ethtool -s $interface wol g | |
done | |
end script |
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 python | |
def count_ones(n): | |
res = 0 | |
while n > 0: | |
if n % 10 == 1: | |
res += 1 | |
n /= 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
tar xvaf foo.tar.bz2 | |
cd foo | |
mkdir -p ~/base/foo | |
./configure --prefix=$HOME/base/foo | |
make install | |
echo 'export PATH="$PATH:$HOME/base/foo/bin"' >> ~/.bashrc |
OlderNewer