Skip to content

Instantly share code, notes, and snippets.

@imiric
imiric / PKGBUILD
Last active December 16, 2015 10:59
PKGBUILD for Vagrant 1.2.1
pkgname=vagrant
pkgver=1.2.1
pkgrel=4
pkgdesc="Tool for building and distributing virtualized development environments"
arch=('i686' 'x86_64')
url='http://vagrantup.com/'
license=('MIT')
depends=('ruby' 'virtualbox>=4.0' 'ruby-net-ssh>=2.6.6' \
'ruby-net-scp>=1.1.0' 'ruby-erubis>=2.7.0' 'ruby-i18n>=0.6.0' \
'ruby-log4r>=1.1.9' 'ruby-childprocess>=0.3.7')
@DevL
DevL / generate_sequel_migration.rake
Created December 14, 2012 14:48
Generate a timestamped, empty Sequel migration in the 'migrations' directory.
namespace :generate do
desc 'Generate a timestamped, empty Sequel migration.'
task :migration, :name do |_, args|
if args[:name].nil?
puts 'You must specify a migration name (e.g. rake generate:migration[create_events])!'
exit false
end
content = "Sequel.migration do\n up do\n \n end\n\n down do\n \n end\nend\n"
timestamp = Time.now.to_i
@iros
iros / API.md
Created August 22, 2012 14:42
Documenting your REST API

Title

<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>

  • URL

    <The URL Structure (path only, no root url)>

  • Method:

@dlapiduz
dlapiduz / eydeploy.rb
Created April 20, 2012 23:13
config/eydeploy.rb
def conditionally_enable_maintenance_page
return true
end
@jcasimir
jcasimir / exporter.rb
Created February 26, 2012 20:09 — forked from chad/exporter.rb
Export ActiveRecord Tables to CSV
require 'csv'
module Exporter
DEFAULT_EXPORT_TABLES = [ Invoice, InvoiceItem, Item, Merchant, Transaction, User ]
DESTINATION_FOLDER = "tmp/"
def self.included(klass)
klass.extend ClassLevelMethods
end
@vmihailenco
vmihailenco / proxy.go
Created November 20, 2011 15:22
Simple TCP proxy in Golang
package main
import (
"bytes"
"encoding/hex"
"flag"
"fmt"
"io"
"log"
"net"
@bennylope
bennylope / remotefiles.conf
Created October 19, 2011 01:30
nginx remote file proxying
location ~* ^/remote-files/(http[s]*://)(.*?)/(.*) {
# Do not allow people to mess with this location directly
# Only internal redirects are allowed
internal;
# nginx has to be able to resolve the remote URLs
resolver 8.8.8.8;
# Location-specific logging
#access_log /usr/local/etc/nginx/logs/internal_redirect.access.log main;
@samaaron
samaaron / gist:1284485
Created October 13, 2011 15:17
basic sequencer
(ns overtone.studio.sequencer
(:use [overtone.live]))
(defn- play-sample
[samp time vol]
(at time (stereo-player samp :vol vol)))
(defn determine-time
[onset-time b-idx beat-dur num-beats]
(+ onset-time (* b-idx beat-dur)))
@jeffrafter
jeffrafter / nginx.conf
Created September 20, 2011 15:58
Nginx proxy pass to localhost:3000 for development
worker_processes 1;
error_log /usr/local/var/log/nginx.error.log;
events {
worker_connections 1024;
}
http {
include mime.types;
@pepijndevos
pepijndevos / vocoder.clj
Created July 4, 2011 19:48
Overtone Vocoder
(ns test
(:use overtone.live
;overtone.inst.synth
overtone.inst.io))
(def a (buffer 2048))
(def b (buffer 2048))
(definst vocoder [freq 432]
(let [input (in 8)