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 | |
# Exits bash immediately if any command fails | |
set -e | |
# Will echo commands as the run | |
set -x | |
# Configure these | |
BUILDBOX_TEAM="" |
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
class CloudfrontSigner | |
def initialize(distribution, private_key, key_pair_id) | |
@distribution = distribution | |
@private_key = OpenSSL::PKey::RSA.new(private_key) | |
@key_pair_id = key_pair_id | |
end | |
def signed_url(path, expires_at, options = {}) | |
# AWS operates in UNIX time |
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 Base58 | |
class InvalidCharacterError < RuntimeError; end | |
ALPHABET = | |
%w( | |
1 2 3 4 5 6 7 8 9 | |
a b c d e f g h i | |
j k m n o p q r s | |
t u v w x y z A B |
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
rm -r ~/Library/Application Support/Satellite Eyes | |
rm ~/Library/Preferences/uk.co.tomtaylor.SatelliteEyes.plist |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<definitions name="Service" | |
targetNamespace="http://localhost:80/Service.wsdl" | |
xmlns:tns="http://localhost:80/Service.wsdl" | |
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" | |
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xmlns:xsd="http://www.w3.org/2001/XMLSchema" | |
xmlns:IDSP="http://ns.adobe.com/InDesign/soap/" | |
xmlns:SOAP="http://schemas.xmlsoap.org/wsdl/soap/" |
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
%% @author Northscale <info@northscale.com> | |
%% @copyright 2010 NorthScale, Inc. | |
%% | |
%% Licensed under the Apache License, Version 2.0 (the "License"); | |
%% you may not use this file except in compliance with the License. | |
%% You may obtain a copy of the License at | |
%% | |
%% http://www.apache.org/licenses/LICENSE-2.0 | |
%% | |
%% Unless required by applicable law or agreed to in writing, software |
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
mu:inception tom$ make | |
gcc -g -Wall -m32 -c -o inception.o inception.c | |
gcc -g -Wall -m32 -g -o inception inception.o -lpthread | |
mu:inception tom$ ./inception | |
Dreamer [Fischer], level [1], priority [19], policy [OTHER] | |
Dreamer [Cobb], level [1], priority [19], policy [OTHER] | |
Dreamer [Ariadne], level [1], priority [19], policy [OTHER] | |
Dreamer [Arthur], level [1], priority [19], policy [OTHER] | |
Dreamer [Eames], level [1], priority [19], policy [OTHER] | |
Dreamer [Saito], level [1], priority [19], policy [OTHER] |
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
require 'rubygems' | |
require 'sinatra' | |
require 'dm-core' | |
require 'dm-validations' | |
require 'dm-timestamps' | |
DataMapper.setup(:default, "sqlite3://#{Dir.pwd}/messages.sqlite3") | |
class Message | |
include DataMapper::Resource |
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
#!/usr/bin/ruby | |
require 'rubygems' | |
require 'net/http' | |
require 'rio' | |
body = Net::HTTP.get 'minneapolisfuckingrocks.blogspot.com', '/2009/01/diplo-remix-collection.html' | |
body.scan(/http:\/\/[a-zA-Z0-9_\.\/]*mp3{1}/).each {|link| rio(link) > rio(File.basename(link))} |
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
class String | |
require 'rexml/parsers/pullparser' | |
def truncate_html(len = 30) | |
p = REXML::Parsers::PullParser.new(self) | |
tags = [] | |
new_len = len | |
results = '' | |
while p.has_next? && new_len > 0 |