Skip to content

Instantly share code, notes, and snippets.

View abackstrom's full-sized avatar

Annika Backstrom abackstrom

View GitHub Profile
scala> List("Annika", "Backstrom").map({ s: String => s.toUpperCase() })
res12: List[String] = List(ANNIKA, BACKSTROM)
scala> List("Annika", "Backstrom").map({ _.toUpperCase() })
res13: List[String] = List(ANNIKA, BACKSTROM)
scala> List("Annika", "Backstrom").map({ _.toUpperCase })
res14: List[String] = List(ANNIKA, BACKSTROM)
scala> List("Annika", "Backstrom").map { _.toUpperCase }
ssh vm 'cat sourcefile.tar' | pv -s $(ssh vm 'stat -c %s sourcefile.tar') | ssh someserver 'cat >destfile.tar'
var irc = require('irc');
var client = new irc.Client('irc.freenode.net', 'somebot', {
channels: ['##remotes'],
});
client.addListener('message##remotes', function (from, to, message) {
client.say("##remotes", from + ": i agree");
});
~$ sudo php-build 5.6.5 /usr/local
[Info]: Loaded extension plugin
[Info]: Loaded apc Plugin.
[Info]: Loaded composer Plugin.
[Info]: Loaded pyrus Plugin.
[Info]: Loaded uprofiler Plugin.
[Info]: Loaded xdebug Plugin.
[Info]: Loaded xhprof Plugin.
[Info]: php.ini-production gets used as php.ini
[Info]: Building 5.6.5 into /usr/local
# get page # of 'last' page
curl -si https://github.<yourdomain>.com/api/v3/users/abackstrom/gists?access_token=$TOKEN | grep ^Link:
# download json metadata for all gists. use the right page range! curl expands the bracketed range
curl "https://github.<yourdomain>.com/api/v3/users/abackstrom/gists?access_token=$TOKEN&page=[1-27]" -o gists_#1.json
# clone all the repos
# install jq first. http://stedolan.github.io/jq/
jq -r '.[] | .git_pull_url' *.json | while read repo ; do git clone $repo ; done
2010/09/14 08:29:46 [debug] 9770#0: *7 write new buf t:1 f:0 080DB2B8, pos 080DB2B8, size: 223 file: 0, size: 0
2010/09/14 08:29:46 [debug] 9770#0: *7 http write filter: l:1 f:0 s:223
2010/09/14 08:29:46 [debug] 9770#0: *7 http write filter limit 0
2010/09/14 08:29:46 [debug] 9770#0: *7 writev: 223
2010/09/14 08:29:46 [debug] 9770#0: *7 http write filter 00000000
2010/09/14 08:29:46 [debug] 9770#0: *7 http finalize request: 0, "/blogs.dir/3/files/2010/08/wordpress-answers-beta-300x213.png?" 1
2010/09/14 08:29:46 [debug] 9770#0: *7 set http keepalive handler
2010/09/14 08:29:46 [debug] 9770#0: *7 http close request
2010/09/14 08:29:46 [debug] 9770#0: *7 http log handler
2010/09/14 08:29:46 [debug] 9770#0: *7 run cleanup: 081468C4
server {
listen 69.164.216.5:80 default;
root /var/www/mu.sixohthree.com/html;
server_name_in_redirect off;
#fastcgi_cache_valid 200 20m;
#fastcgi_cache_key "$host$request_uri";
#fastcgi_cache mu;
[gitosis]
daemon = yes
gitweb = yes
loglevel = DEBUG
[group superusers]
members = adam@aziz adam@roku
[group gitosis-admin]
writable = gitosis-admin
ignores = (
{ level = "JOINS PARTS QUITS"; },
{ level = "JOINS PARTS QUITS"; exception = "yes"; channels = ( "#foo" ); }
);
function mediawiki_page( $atts ) {
$title = urlencode($atts['title']);
if( false === ( $content = get_transient( 'mediawiki_' . $title ) ) ) {
$url = 'http://wiki.sixohthree.com/w/index.php?title=' . $title . '&action=render';
$response = wp_remote_get($url);
$content = $response['body'];
set_transient( 'mediawiki_' . $title, $content, 600 );
}