I hereby claim:
- I am matthewhudson on github.
- I am matthewhudson (https://keybase.io/matthewhudson) on keybase.
- I have a public key whose fingerprint is 7B45 9A21 41FC FCD3 46EF B079 43BE B01D 5135 4390
To claim this, I am signing this object:
crypto = require 'crypto' | |
key = 'monkeybutt' | |
cipher = crypto.createCipher 'aes128', key | |
decipher = crypto.createDecipher 'aes128', key | |
encrypt = (plaintext) -> | |
encrypted = cipher.update plaintext, 'utf8', 'base64' | |
encrypted += cipher.final 'base64' |
# Note that when compiling with coffeescript, the plugin is wrapped in another | |
# anonymous function. We do not need to pass in undefined as well, since | |
# coffeescript uses (void 0) instead. | |
do ($ = jQuery, window, document) -> | |
# window and document are passed through as local variable rather than global | |
# as this (slightly) quickens the resolution process and can be more efficiently | |
# minified (especially when both are regularly referenced in your plugin). | |
# Create the defaults once |
I hereby claim:
To claim this, I am signing this object:
import uuid | |
import hashlib | |
import base64 | |
def generate_unique_id(): | |
return base64.b32encode( | |
hashlib.sha256(uuid.uuid4().bytes).digest())[:12].lower() | |
def generate_access_token(): | |
return base64.b32encode(hashlib.sha256(uuid.uuid4().bytes).digest())[:52] |
$(document).ready(function() { | |
// Open external links in a new window. | |
$("a").each(function(index) { | |
var re = new RegExp('^(?:f|ht)tp(?:s)?\://([^/]+)', 'im'); | |
var hostname = $(this).attr('href').match(re)[1].toString(); | |
if (hostname != "www.wetalky.com") { | |
$(this).attr({ | |
target: "_blank" |
var constructor = function (spec, my) { | |
var that = {}; | |
var my = my || {}; | |
// This function is private. | |
my.privateFunction = function() { | |
return true; | |
}; | |
// This function is public. |
{ | |
"settings" : { | |
"id" : "matthewhudson", | |
"name" : "Matthew Hudson", | |
"avatar" : "http://www.matthewghudson.com/Matthew-Hudson.jpg", | |
"enable_search" : true | |
}, | |
"content" : { | |
"tumblr" : { | |
"title" : "Blog", |
# Install prerequisites before compiling: | |
apt-get install build-essential | |
apt-get install libfuse-dev | |
apt-get install fuse-utils | |
apt-get install libcurl4-openssl-dev | |
apt-get install libxml2-dev | |
apt-get install mime-support | |
# Download and Install | |
wget http://s3fs.googlecode.com/files/s3fs-1.61.tar.gz |
# Install LAMP. | |
sudo yum install -y httpd php mysql-server mysql php-mysql | |
# Start Apache & MySQL. | |
sudo service httpd start | |
sudo service mysqld start | |
# Setup MySQL with root account credentials. | |
mysqladmin -u root password 'branches' |
# | |
# This is the main Apache server configuration file. It contains the | |
# configuration directives that give the server its instructions. | |
# See <URL:http://httpd.apache.org/docs/2.2/> for detailed information. | |
# In particular, see | |
# <URL:http://httpd.apache.org/docs/2.2/mod/directives.html> | |
# for a discussion of each configuration directive. | |
# | |
# | |
# Do NOT simply read the instructions in here without understanding |