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
#!/bin/sh | |
ProgName=$(basename $0) | |
sub_help(){ | |
echo "Usage: $ProgName <subcommand> [options]\n" | |
echo "Subcommands:" | |
echo " bar Do bar" | |
echo " baz Run baz" | |
echo "" |
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
#!/bin/bash | |
if [ -z "$1" ]; then | |
echo | |
echo usage: $0 network-interface | |
echo | |
echo e.g. $0 eth0 | |
echo | |
echo shows packets-per-second |
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
#!/bin/sh | |
opkg update | |
PACKAGES=`opkg --force-space --noaction install $1 | grep http | cut -f 2 -d ' ' | sed 's/.$//'` | |
for i in $PACKAGES | |
do | |
LIST=`wget -qO- $i | tar -Oxz ./data.tar.gz | tar -tz | sort -r | sed 's/^./\/overlay/'` | |
for f in $LIST | |
do | |
if [ -f $f ] | |
then |
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
use strict; | |
use Tie::IxHash; | |
use JSON::PP; | |
# magic start | |
my $obj_parser_sub = \&JSON::PP::object; | |
*JSON::PP::object = sub { | |
tie my %obj, 'Tie::IxHash'; | |
$obj_parser_sub->(\%obj); |
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
# the fpic is needed for mod_perl | |
# so is usesshrplib | |
# use 64bitall just makes sense as uselargefiles | |
# the ldflags mimic the settings of the system perl | |
perlbrew install -j 8 5.14.2 \ | |
-Dcccdlflags=-fPIC \ | |
-Duseshrplib \ | |
-Duse64bitall \ |
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
// module dependencies | |
var http = require('http'), | |
url = require('url'); | |
/** | |
* UrlReq - Wraps the http.request function making it nice for unit testing APIs. | |
* | |
* @param {string} reqUrl The required url in any form | |
* @param {object} options An options object (this is optional) |
NewerOlder