Skip to content

Instantly share code, notes, and snippets.

/* Since script loading is dynamic, we take
a callback function with our loadScript call
that executes once the script is done downloading/parsing
on the page.
*/
var loadScript = function(src, callbackfn) {
var newScript = document.createElement("script");
newScript.type = "text/javascript";
newScript.setAttribute("async", "true");
newScript.setAttribute("src", src);
VERSION=1.4.2
sudo apt-get update
sudo apt-get install openjdk-6-jdk
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-$VERSION.deb
sudo dpkg -i elasticsearch-$VERSION.deb
# be sure you add "action.disable_delete_all_indices" : true to the config!!
insert into image (
id,
name,
description,
album_id,
album_position,
path,
type,
size,
url,
@selbyk
selbyk / results.json
Created April 17, 2015 15:04
RAID Configurations on Performance ({"Raid Type": {"Stripe Size": { 'performce' }, ... })
{
"Noredun": {
"4": {
"responseTime": 47.73792,
"rps": 505.446884
},
"16": {
"responseTime": 38.438951,
"rps": 387.339675
},
<MacGyver> selby: ssh user@host "tar -czf - /folder/to/backup" | tar -xzf - /folder/where/it/should/go
xvda 202:0 0 300G 0 disk /
xvdf 202:80 0 350G 0 disk
├─xvdf1 202:81 0 8G 0 part
├─xvdf2 202:82 0 512M 0 part
└─xvdf3 202:83 0 341.5G 0 part
@selbyk
selbyk / fstab
Created April 25, 2015 00:35
How to create Linux swapfile
# Swap file created on DATE
/var/swapfile none swap sw 0 0
@selbyk
selbyk / batch_resize.sh
Created May 7, 2015 07:11
Shell script to process a subset of facial recognition image database from UMass.
#/bin/bash
# Usage: ./batch_resize.sh input_dir output_dir “10 30 50”
# ./batch_resize.sh help
# Setup our globals
PARAM_CHECK_FAIL=0
INPUT_DIR=""
OUTPUT_DIR=""
SIZES=()
@selbyk
selbyk / start_with_java_7.sh
Created May 16, 2015 20:59
Run program_to_run using Java 7
export JAVA_HOME=/usr/lib/jvm/java-7-openjdk/jre
program_to_run
# This is an example of the kind of things you can do in a configuration file.
# All flags used by the client can be configured here. Run Let's Encrypt with
# "--help" to learn more about the available options.
# Use a 4096 bit RSA key instead of 2048
rsa-key-size = 4096
# Always use the staging/testing server
server = https://acme-v01.api.letsencrypt.org/directory