Skip to content

Instantly share code, notes, and snippets.

View symm's full-sized avatar
🦄

Gareth Jones symm

🦄
View GitHub Profile
# --------------------------------------------
# General
# --------------------------------------------
set :shared_children, %w(cache logs) # Shared directories, these directories contain generated content which should not be wiped out during deployments.
set :application, "domain.com" # Application name
set :deploy_to, "/var/www/#{application}/#{stage}" # Path where files are deployed to ...
# --------------------------------------------
# Server
# --------------------------------------------
#!/usr/bin/env ruby
# -*- ruby -*-
# TODO: Intelligently find (maybe even install?) latest REE & passenger.
CONFIG_FLAGS="--with-http_secure_link_module"
REE_VERSION="ruby-enterprise-1.8.7-2010.01"
require 'open-uri'
@jaredatron
jaredatron / pinboard.in.bookmarklet.js
Created December 24, 2010 20:48
pinbaord.in bookmarklet
javascript:t='PUT YOUR TAGS HERE';q=location.href;p=document.title;void(t=open('http://pinboard.in/add?later=yes&noui=yes&jump=close&tags='+encodeURIComponent(t)+'&url='+encodeURIComponent(q)+'&title='+encodeURIComponent(p),'Pinboard','toolbar=no,width=100,height=100'));t.blur();
@BenWard
BenWard / pinboard-full.js
Created January 29, 2011 07:47
A smarter bookmarklet for Pinboard.in; wraps selected text in <blockquote> tags, keeps variables out of the global scope, supports filling tags from rel="tag" markup in the page, and titles from hAtom entry titles.
(function() {
// Change `silent` to true to invoke the promptless, self-closing
// version of the bookmarklet.
var silent = false;
var url = location.href;
var title = document.title;
// Look for a single hAtom entry on the page, and iff one is found, extract
// the entry-title in place of the document title:
@jamiew
jamiew / tumblr-photo-ripper.rb
Created July 13, 2011 17:46
Download all the images from a Tumblr blog
# Usage:
# [sudo] gem install mechanize
# ruby tumblr-photo-ripper.rb
require 'rubygems'
require 'mechanize'
# Your Tumblr subdomain, e.g. "jamiew" for "jamiew.tumblr.com"
site = "doctorwho"
@hectorsanjuan
hectorsanjuan / build.xml
Created September 17, 2011 18:22
Phing build.xml for Symfony2 projects
<?xml version="1.0" encoding="UTF-8"?>
<project name="${projectName}" basedir="." default="build:main">
<!-- Properties -->
<property name="dir.app" value="${project.basedir}/app" />
<property name="dir.src" value="${project.basedir}/src" />
<property name="dir.build" value="${project.basedir}/app/build" />
<property name="dir.docs" value="${dir.build}/docs" />
<property name="dir.docs.phpdoc" value="${dir.docs}/phpdoc" />
<property name="dir.docs.docblox" value="${dir.docs}/docblox" />
<property name="dir.reports" value="${dir.build}/logs" />
@peterc
peterc / irb3.rb
Created September 19, 2011 14:17
irb3 - Run an IRB-esque prompt over multiple Ruby implementations at once using RVM
#!/usr/bin/env ruby
# encoding: utf-8
# irb3 - Runs an IRB-esque prompt (but it's NOT really IRB!) over multiple
# versions of Ruby at once (using RVM)
#
# By Peter Cooper, BSD licensed
#
# Main dependency is term-ansicolor for each impl:
# rvm exec gem install term-ansicolor
@loonies
loonies / 1_phpunit-api.md
Last active January 19, 2024 07:34
PHPUnit Cheat Sheet

PHPUnit API reference

  • version 3.6

TODO

Check those constraints:

$this-&gt;anything()
@p01
p01 / LICENSE.txt
Created October 6, 2011 17:11 — forked from 140bytes/LICENSE.txt
Mandelbrot fractal with zoom & panning in 133 bytes
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Mathieu 'p01' Henri - http://www.p01.org/releases/
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@innotekservices
innotekservices / jquery.spin.js
Created October 16, 2011 02:39
jQuery Plugin for Spin.js
/*
You can now create a spinner using any of the variants below:
$("#el").spin(); // Produces default Spinner using the text color of #el.
$("#el").spin("small"); // Produces a 'small' Spinner using the text color of #el.
$("#el").spin("large", "white"); // Produces a 'large' Spinner in white (or any valid CSS color).
$("#el").spin({ ... }); // Produces a Spinner using your custom settings.
$("#el").spin(false); // Kills the spinner.