Skip to content

Instantly share code, notes, and snippets.

Annika Backstrom abackstrom

Block or report user

Report or block abackstrom

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View repl.scala
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 }
View gist:cf951f04e2439879fe38
ssh vm 'cat sourcefile.tar' | pv -s $(ssh vm 'stat -c %s sourcefile.tar') | ssh someserver 'cat >destfile.tar'
View gist:c38253a4fcf0b54b96dc
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");
});
View gist:5c1c74f3fdabf6a648a8
~$ 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
View gist:b8ecd3c02ebeee8636c8
# 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
View gist:578976
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
View mu.sixohthree.com.conf
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;
View gist:590047
[gitosis]
daemon = yes
gitweb = yes
loglevel = DEBUG
[group superusers]
members = adam@aziz adam@roku
[group gitosis-admin]
writable = gitosis-admin
View irssi config
ignores = (
{ level = "JOINS PARTS QUITS"; },
{ level = "JOINS PARTS QUITS"; exception = "yes"; channels = ( "#foo" ); }
);
View gist:613475
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 );
}
You can’t perform that action at this time.