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
define [], -> | |
# Handles site-wide event delegations for all elements. | |
# @param selector The CSS-style element selector. | |
# @param event The event to bind to, click, hover, mouseenter, etc. | |
# @param handler The handler function to execute on event firing | |
# return void | |
(selector, event, handler) -> | |
# Define function to wrap the handler function in |
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
# Sudo system control to fix memory in current session | |
sudo sysctl -w kern.sysv.shmall=65536 | |
sudo sysctl -w kern.sysv.shmmax=16777216 | |
# Fix memory bug for future sessions | |
cat << 'EOF' >> /etc/sysctl.conf | |
kern.sysv.shmall=65536 | |
kern.sysv.shmmax=16777216 | |
EOF |
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
#Modify Array prototype | |
class Array | |
#Sorts numerically descending, period | |
#separated occurences ie. file.10.1.2.3.git | |
def sort_by_version_number! | |
regex = /(([0-9]+\.?){4,})\./ | |
self.sort! do |a,b| | |
#Get version numbers | |
a = Gem::Version.new(a.match(regex)[1]) | |
b = Gem::Version.new(b.match(regex)[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
#location of git repo | |
REPO="" | |
#install library dependencies | |
sudo apt-get update && apt-get upgrade -y | |
sudo apt-get install -y chromium-browser x11-xserver-utils unclutter xwininfo git git-core couchdb | |
#better font experience | |
sudo apt-get install -y ttf-mscorefonts-installer |
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 | |
brew update | |
brew doctor | |
brew uninstall postgresql || true | |
brew install postgresql | |
initdb /usr/local/var/postgres -E utf8 | |
gem install lunchy |
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 port = 0; | |
var endpoint = 0x01; | |
var device = { vendorId: 0x04b8, productId: 0x0202}; | |
var connect = function(callback) { | |
chrome.permissions.getAll(function(p) { | |
if (p.permissions.indexOf('usb') >= 0) { | |
//construct permission object for our device | |
var obj = { usbDevices: [device] }; |
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
{ | |
"AWSTemplateFormatVersion" : "2010-09-09", | |
"Description" : "Creates networking infrastructure.", | |
"Parameters" : { | |
"BastionKeyName" : { | |
"Description" : "Name of an existing EC2 KeyPair to enable SSH access to the bastion host", | |
"Type" : "String", |
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
# Run Application specific setup tasks here! | |
#!/usr/bin/env bash | |
cd /vagrant | |
fig run web foreman run rake db:create | |
fig run web foreman run rake db:migrate |
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
<Envelope xmlns="http://www.w3.org/2003/05/soap-envelope"> | |
<Header> | |
<To xmlns="http://www.w3.org/2005/08/addressing">https://api.rkd.reuters.com/api/TokenManagement/TokenManagement.svc/ | |
Anonymous</To> | |
<Action xmlns="http://www.w3.org/2005/08/addressing">http://www.reuters.com/ns/2006/05/01/webservices/rkd/TokenManagement_1/ | |
CreateServiceToken_1</Action> | |
</Header> | |
<Body> | |
<CreateServiceToken_Request_1 xmlns:global="http://www.reuters.com/ns/2006/05/01/webservices/rkd/Common_1" xmlns="http://www. | |
reuters.com/ns/2006/05/01/webservices/rkd/TokenManagement_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
FROM ubuntu:trusty | |
# Install Ruby | |
RUN apt-get -y update | |
RUN apt-get -y install build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev | |
RUN apt-get -y install wget | |
RUN wget http://ftp.ruby-lang.org/pub/ruby/2.1/ruby-2.1.2.tar.gz | |
RUN tar -xvzf ruby-2.1.2.tar.gz | |
RUN cd ruby-2.1.2 && ./configure --prefix=/usr/local | |
RUN cd ruby-2.1.2 && make |
OlderNewer