Keybase proof
I hereby claim:
- I am thom-nic on github.
- I am thom_nic (https://keybase.io/thom_nic) on keybase.
- I have a public key whose fingerprint is 66D4 6F49 8A5A CF50 61DD 028A F60F F0BE 93E2 E646
To claim this, I am signing this object:
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.facebook</groupId> | |
<artifactId>facebook-android-sdk</artifactId> | |
<packaging>apklib</packaging> | |
<name>Facebook Android SDK</name> | |
<version>3.0.1</version> |
I hereby claim:
To claim this, I am signing this object:
set nocompatible | |
source $VIMRUNTIME/vimrc_example.vim | |
source $VIMRUNTIME/mswin.vim | |
source ~/.vimrc | |
behave mswin | |
set diffexpr=MyDiff() | |
function MyDiff() | |
let opt = '' | |
if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif |
/** | |
* Scroll to the given element on the page | |
*/ | |
function scrollTo(elem) { | |
$('html').animate({ | |
scrollTop: $(elem).offset().top | |
}, 600); | |
} |
# shellshock upgrade & patch for Mac OSX | |
# OSX ships with a horribly old version of bash (3.2) which is vulnerable to | |
# the Shellshock exploit (CVE-2014-6271) | |
# We use homebrew to get a recent version of bash, then symlink it to | |
# /bin/bash and /bin/sh (because sh is really bash) | |
# | |
# Use this to see if you're vulnerable | |
# env X="() { :;} ; echo vulnerable" /bin/bash -c "echo testing" | |
brew update && brew install bash |
import Queue as _oldQueue | |
import heapq | |
from time import mktime, time as _time | |
class PriorityQueue(_oldQueue.PriorityQueue): | |
''' | |
This class extends Python's Queue.PriorityQueue by allowing it to | |
evict lower priority items in order to make room. This avoids a | |
starvation problem where low-priority items fill the queue and prevent | |
a high-priority item from being inserted. |
%%% Sends a message back & forth | |
%%% Author: Thom Nichols | |
%%% | |
%%% Remote server communication demo. | |
%%% Use start_listener/1 to register a listener on a remote or local node. | |
%%% use send/2 to send a messge to a node and listen for its response. | |
-module(echo). | |
-author('Thom Nichols'). | |
-import(erlang). |
/** | |
* Node builder. Call like: | |
* $n('div',{class:'top'},'inner text') // or: | |
* $n('div',{class:'top'},[$n('p',{},'nested element']) | |
*/ | |
$n= function(e,attrs,inner) { | |
if(typeof(e)=='string') e = document.createElement(e); | |
if (attrs) for (var k in attrs) e.setAttribute(k,attrs[k]); | |
if (inner) { | |
if (typeof(inner)=='string') e.textContent = inner; |
/* Collapse Google Reader iframe ad frames */ | |
@-moz-document url-prefix(https://www.google.com/reader/), | |
url-prefix(http://www.google.com/reader/) { | |
/* Make the search bar take up less vertical space */ | |
#top-bar { height: 44px !important; } | |
#search { padding: 8px 0 !important; } | |
/* make the 'subscribe' bar take up less vertical space */ | |
#viewer-header, #lhn-add-subscription-section { height: 42px !important; } | |
/* Right panel */ |
# run with rainbows -c rainbows.config.rb | |
require 'rainbows' | |
listen 8888 # by default Unicorn listens on port 8080 | |
worker_processes 9 # this should be >= nr_cpus | |
pid "unicorn.pid" | |
#stderr_path "unicorn.log" | |
#stdout_path "unicorn.log" | |
# nuke workers after 30 seconds instead of 60 seconds (the default) | |
timeout 30 |