This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# put this file in /usr/local/etc/my.cnf | |
[mysqld] | |
max_connections = 10 | |
key_buffer_size = 16K | |
max_allowed_packet = 1M | |
table_open_cache = 4 | |
sort_buffer_size = 64K | |
read_buffer_size = 256K | |
read_rnd_buffer_size = 256K |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function.prototype.curry = function curry() { | |
var fn = this, args = Array.prototype.slice.call(arguments); | |
return function curryed() { | |
return fn.apply(this, args.concat(Array.prototype.slice.call(arguments))); | |
}; | |
}; | |
// pulled from this stackoverflow.com post http://stackoverflow.com/questions/4674021/xhr-get-request-url-in-onreadystatechange |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### | |
Module dependencies | |
### | |
require.paths.unshift "#{__dirname}/lib/support/express-csrf/" | |
require.paths.unshift "#{__dirname}/lib/support/node_hash/lib/" | |
express = require 'express' | |
app = module.exports = express.createServer() | |
RedisStore = require 'connect-redis' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysql -uroot --password= --skip-column-names -e "select concat('update ', a.table_name, ' set ', a.column_name, ' = convert(cast(convert(', a.column_name, ' using latin1) as binary) using utf8);') from information_schema.columns a where a.table_schema = '$DB_SCHEMA';" > fixutf8.sql | |
mysql -uroot --password= $DB_SCHEMA < fixutf8.sql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# install setuptools | |
wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -O - | sudo python | |
# install pip | |
sudo easy_install pip | |
# install virtualenv | |
sudo pip install virtualenv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
editor | |
foreground: f5f5f5 | |
background: 000000 | |
caret: 000000 | |
editor-selection | |
foreground: ffffff | |
background: ff4f92 | |
H1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var date = new Date(Date.parse(twitter_response[0].created_at.replace(/( \+)/, ' UTC$1'))); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Verifying that "ghostrocket.id" is my Blockstack ID. https://onename.com/ghostrocket |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Aws\Kms\KmsClient; | |
// Somewhere in the controller or model | |
$this->load->config('aws'); | |
// Not needed for EC2 instance role based authorization - for my local instance only | |
$key = $this->config->item('aws_s3_access_key'); | |
$secret = $this->config->item('aws_s3_secret_key'); |
OlderNewer