View gist:10953895
@MirrorsUsed(symbols: '', override: '*')
import 'dart:mirrors';
class ReflectionHelper {
static callMethodsByAnnotation(var object, var symbol) {
var mirror = reflectClass(object.runtimeType);
mirror.instanceMembers.forEach((name, method) {
for (var metadata in method.metadata)
if (metadata.hasReflectee && metadata.reflectee == symbol)
reflect(object).invoke(name, []);
View gist:5d90091db803f52b618d
package main
import (
"bufio"
"crypto/tls"
"fmt"
"io"
"net"
"reflect"
"regexp"
View gist:9c67a8ff27b429559986
/**
* Simplex noise algorithm.
*
* This is a port of the public domain java implementation (see
* original header) and is public domain aswell.
* ported by Matthias Hecker <apoc.cc>.
* Links:
* http://webstaff.itn.liu.se/~stegu/simplexnoise/
* http://stackoverflow.com/a/18516731
*/
View keybase.md

Keybase proof

I hereby claim:

  • I am 4poc on github.
  • I am apoc (https://keybase.io/apoc) on keybase.
  • I have a public key whose fingerprint is 6FCC 1EF0 3B42 A155 CE89 4962 C6E6 8A99 721F BC1E

To claim this, I am signing this object:

View gist:835763
protocol specification: http://pubsubhubbub.googlecode.com/svn/trunk/pubsubhubbub-core-0.3.html
test feed: http://apubtest.wordpress.com/feed/ (atom)
hub: <atom:link rel='hub' href='http://apubtest.wordpress.com/?pushpress=hub'/>
-> http://apubtest.wordpress.com/?pushpress=hub
topic/self: <atom:link href="http://apubtest.wordpress.com/feed/" rel="self" type="application/rss+xml" />
-> http://apubtest.wordpress.com/feed/
View gist:837530
1. Last-Modified
Server->Client: Last-Modified: Mon, 21 Feb 2011 ... (200)
Client->Server: If-Modified-Since: Mon, 21 Feb 2011 ... (200/304)
2. ETag
Server->Client: ETag: 123456654321 (200)
Client->Server: If-None-Match: 123456654321 (200/304)
View linux live screencasting with justin.tv
#!/bin/bash
#
# http://wiki.videolan.org/VLC_command-line_help
# http://wiki.videolan.org/Documentation:Modules/screen
# http://apiwiki.justin.tv/mediawiki/index.php/Linux_Broadcasting_API
# StreamKey: http://www.justin.tv/broadcast/adv_other
#
cvlc screen:// \
--screen-width 1356 \
View pacman (< 3.5!!!)
This is obsolete with the new pacman version 3.5!
Pacman (arch linux) uses a file based database with a lot
of small files. Some filesystems are awfully slow when
accessing lots of small files, in general this is not
that great of a deal because most of the applications
store their information with more sense. Pacman doesn't
care (it is a long well known problem), which means that
sometimes you have to wait minutes before a search query
completes (pacman -Ss).
View vimrc_stop_using_arrow_keys
" stop using arrow keys!
map <UP> d'oh!
map <DOWN> d'oh!
map <LEFT> d'oh!
map <RIGHT> d'oh!
imap <UP> d'oh!
imap <DOWN> d'oh!
imap <LEFT> d'oh!
imap <RIGHT> d'oh!
View GalleryAdapter.java
public void onNewItems(List<Item> newItems) {
notifyDataSetChanged();
} //just a test