This file contains hidden or 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
#!/usr/bin/env python | |
import boto.sqs | |
from boto.sqs.message import RawMessage | |
conn = boto.sqs.connect_to_region('us-east-1') | |
q = conn.get_queue('tiles-data-processing-queue-stage') | |
q.set_message_class(RawMessage) | |
m = q.read() |
This file contains hidden or 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
# | |
# Settings for EdgeRouter Lite Traffic Shaping for a Shaw 25/2.5mbit connection | |
# | |
set traffic-policy shaper shaw25mbit | |
set traffic-policy shaper shaw25mbit description "QoS policy for home network" | |
set traffic-policy shaper shaw25mbit bandwidth 25mbit | |
# give priority to DNS / SSH because lag sucks here | |
set traffic-policy shaper shaw25mbit class 10 description "top" | |
set traffic-policy shaper shaw25mbit class 10 bandwidth 25% |
This file contains hidden or 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/sh | |
# == ABOUT == | |
# this script is run when the WAN IP address changes from the | |
# asuswrt (https://github.com/RMerl/asuswrt-merlin) project | |
# It updates the ddns name from freedns.afraid.org | |
# the base64 key part from the update url you get from freedns.afraid.org | |
# don't forget to copy/paste the "=" if it exists at the end. |
This file contains hidden or 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/sh | |
cd ~ | |
DIST=$(/usr/lib/rpm/redhat/dist.sh --el) | |
if [ "$DIST" -eq "6" ]; then | |
sudo yum install -y vim-svcops | |
echo "alias vi=/opt/vim/bin/vim" >> ~/.bash_profile | |
echo "alias vim=/opt/vim/bin/vim" >> ~/.bash_profile | |
source ~/.bash_profile |
This file contains hidden or 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/sh | |
# credit: http://sudoers-d.com/blog/2013/01/18/installing-vim-on-centos-6-dot-3/ | |
# | |
# Install (for the brave/trusting): | |
# > curl -L http://j.mp/vim73centos | sh | |
# | |
# This will install vim 73 into $HOME/bin so update your path to | |
# be: PATH=$HOME/bin:$PATH to make sure the right version of | |
# vim is used each time! |
This file contains hidden or 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 | |
# ******************************* | |
# Instructions on turning this into an OSX service: | |
# http://blog.lanceli.com/2012/08/downscale-screenshot-at-hight-resolution-on-retina-mackbook-pro.html | |
# ******************************* | |
# the path where screenshots to save | |
DROPBOX_ID= ENTER YOUR DROPBOX ID HERE |
This file contains hidden or 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
const events = require('events'), | |
util = require('util'); | |
function Test() { | |
this.created = Date.now(); | |
} | |
util.inherits(Test, events.EventEmitter); | |
Test.prototype.sendEmit = function() { | |
this.emit("BOOM", Date.now(), this); | |
} |
This file contains hidden or 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
/* | |
* http://jsfiddle.net/mostlygeek/etz43/ | |
* | |
* much credit goes to: http://thecodeplayer.com/walkthrough/canvas-fireworks-tutorial | |
* tweaked a few things out for performance: | |
* | |
* - revised the animation loop to stop animating when no more particles/fireworks | |
* - use `|0` to round off to nearest pixel | |
* - use a clock algorithm for trails, instead of pop() and unshift() on the array | |
*/ |
This file contains hidden or 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 | |
# update the system | |
sudo apt-get --yes update | |
sudo apt-get --yes upgrade | |
# node.js using PPA (for statsd) | |
sudo apt-get install --yes python-software-properties | |
sudo apt-add-repository ppa:chris-lea/node.js | |
sudo apt-get update --yes |
This file contains hidden or 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
#!/usr/bin/env python | |
# | |
# s3-download.py - a quick-and-dirty download script to download from S3 | |
# implemented using Boto, which automatically applies AWS IAM role credentials | |
# | |
# This code is distributed under the MIT license from | |
# http://opensource.org/licenses/MIT: | |
# | |
# Copyright (c) 2013 Martijn Koster | |
# |