Skip to content

Instantly share code, notes, and snippets.

View sud0n1m's full-sized avatar

Colin Nederkoorn sud0n1m

View GitHub Profile
@sud0n1m
sud0n1m / customer.io_upload.js
Created November 20, 2012 14:13 — forked from nicolasembleton/customer.io_upload.js
Import your customer data with custom parameters into customer.io
//#!/usr/bin/env node
var http = require("http"),
fs = require("fs"),
sys = require('sys'),
exec = require('child_process').exec;
var ENDPOINT="https://app.customer.io/api/v1/customers/";
var SITEID="YOUR SITE ID";
var APIKEY="YOUR API KEY";
@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": "*"
},
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 / 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'
#!/usr/bin/env python
#install the follow first:
#sudo easy_install pip
#sudo pip install -U boto
#sudo pip install configparser
#!/usr/bin/env bash
apt-get -y update
apt-get -y upgrade
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev
cd /tmp
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p327.tar.gz
tar -xvzf ruby-1.9.3-p327.tar.gz
cd ruby-1.9.3-p327/
./configure --prefix=/usr/local
make
@sud0n1m
sud0n1m / bootstrap.sh
Last active December 12, 2015 08:59
Bootstrap
#!/usr/bin/env bash
apt-get -y update
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline-gplv2-dev libyaml-dev
cd /tmp
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p385.tar.gz
tar -xvzf ruby-1.9.3-p385.tar.gz
cd ruby-1.9.3-p385/
./configure --prefix=/usr/local
make
make install
@sud0n1m
sud0n1m / Capfile
Last active December 13, 2015 18:08
A preliminary capistrano deploy script for discourse. To be used together with https://github.com/sud0n1m/discourse-chef
load 'deploy' if respond_to?(:namespace) # cap2 differentiator
load 'deploy/assets'
Dir['vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) }
load 'config/deploy'
# From the Discourse-Chef directory
SERVER="yourdomain.com"
# Install Instructions
librarian-chef install
# enter your password once and never again
ssh-copy-id root@$SERVER
<?php if $_SESSION[user] ?>
<script type="text/javascript">
_cio.identify({
// Signed in user attributes
id: <?= $_SESSION[user][id] ?>, // Unique id for the currently signed in user in your application.
email:<?= $_SESSION[user][email] ?>, // Email of the currently signed in user.
created_at:<?= $_SESSION[user][created_at] ?>,