Skip to content

Instantly share code, notes, and snippets.

View sud0n1m's full-sized avatar

Colin Nederkoorn sud0n1m

View GitHub Profile
#!/usr/bin/env python
#install the follow first:
#sudo easy_install pip
#sudo pip install -U boto
#sudo pip install configparser
@sud0n1m
sud0n1m / Logs
Created December 26, 2012 03:16
➜ raw git:(Relaunch) ✗ jekyll --auto
Configuration from /Users/sudonim/Projects/home/raw/_config.yml
Auto-regenerating enabled: . -> ../public
[2012-12-25 22:13:08] regeneration: 289 files changed
Asset Pipeline: Processing 'css_asset_tag' manifest 'blog'
Asset Pipeline: Saved 'style.css' to '_site/assets'
Asset Pipeline: Saved 'signup.css' to '_site/assets'
Asset Pipeline: Saved 'blog.css' to '_site/assets'
Asset Pipeline: Saved 'bootstrap-responsive.min' to '_site/assets'
Asset Pipeline: Processing 'javascript_asset_tag' manifest 'global'
source: .
destination: ../public
includes: ./_includes
plugins: ./_plugins
pygments: true
permalink: /blog/:title.html
base_url: http://customer.io
description: Customer.io
root_desc: Customer.io
@sud0n1m
sud0n1m / gist:4190198
Created December 2, 2012 18:02
Amazon S3 Policy
{
"Version": "2008-10-17",
"Id": "b2cc31d0-cc91-4285-a658-473099d2c867",
"Statement": [
{
"Sid": "AllowPublicRead",
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
@sud0n1m
sud0n1m / premailer_monkey_path.rb
Created October 28, 2012 22:27
An initializer we added so premailer supports @media queries.
# Patched to no process @media queries in <style> blocks.
# For HTML emails, @media queries are exclusively used for
# targeting mobile clients. These should not be inlined.
class CssParser::Parser
def parse_block_into_rule_sets!(block, options = {}) # :nodoc:
current_media_queries = [:all]
if options[:media_types]
current_media_queries = options[:media_types].flatten.collect { |mt| CssParser.sanitize_media_query(mt)}
end
var email = $("#email").val();
var id = email.replace('@', '_');
id = id.replace('.', '_');
@sud0n1m
sud0n1m / gist:3761675
Created September 21, 2012 14:11
Fix a div when scrolling
<script type="text/javascript">
$(window).scroll(function() { if ($(window).scrollTop() > 110) $("#signupbox").css("position", "fixed"); else $("#signupbox").css("position", "static"); });
</script>
@sud0n1m
sud0n1m / caddy.sh
Created September 11, 2012 00:43
Caddy -> Pump data into Customer.io from CSV
#!/bin/bash
echo "Caddy v 0.1 from Customer.io"
ENDPOINT="https://app.customer.io/api/v1/customers/"
SITEID="YOUR SITE ID"
APIKEY="YOUR API KEY"
INPUT=users.csv
OLDIFS=$IFS
@sud0n1m
sud0n1m / gist:3082897
Created July 10, 2012 11:59
Cmake errors on Mountain Lion GM
Last login: Tue Jul 10 07:54:59 on tty??
➜ ~ brew install -v cmake
Warning: Not sure what version of Xcode is the latest for OS X 10.8.
==> Downloading http://www.cmake.org/files/v2.8/cmake-2.8.8.tar.gz
Already downloaded: /Library/Caches/Homebrew/cmake-2.8.8.tar.gz
/usr/bin/tar xf /Library/Caches/Homebrew/cmake-2.8.8.tar.gz
==> Downloading patches
/usr/bin/curl -qf#LA Homebrew 0.9.2 (Ruby 1.8.7-358; Mac OS X 10.8) https://github.com/Kitware/CMake/commit/3ea850.patch -o 000-homebrew.diff https://github.com/Kitware/CMake/commit/8b2fb3.patch -o 001-homebrew.diff
######################################################################## 100.0%
######################################################################## 100.0%
@sud0n1m
sud0n1m / doesntwork.js
Created June 4, 2012 14:40
Functional code...
function Penguin(name) {
this.name = name;
this.numLegs = 2;
}
// create your Emperor class here and make it inherit from Penguin
function Emperor(name){
this.prototype = new Penguin(name);