Skip to content

Instantly share code, notes, and snippets.

💥
🦆

Gareth Jones symm

💥
🦆
Block or report user

Report or block symm

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View PHP Capistrano Recipe.rb
# --------------------------------------------
# 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
# --------------------------------------------
View nginx-update.rb
#!/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'
View pinboard.in.bookmarklet.js
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 Jan 29, 2011
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.
View pinboard-full.js
(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 Jul 13, 2011
Download all the images from a Tumblr blog
View tumblr-photo-ripper.rb
# 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 Sep 17, 2011
Phing build.xml for Symfony2 projects
View build.xml
<?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 Sep 19, 2011
irb3 - Run an IRB-esque prompt over multiple Ruby implementations at once using RVM
View irb3.rb
#!/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 Sep 27, 2019
PHPUnit Cheat Sheet
View 1_phpunit-api.md

PHPUnit API reference

  • version 3.6

TODO

Check those constraints:

$this->anything()
@p01
p01 / LICENSE.txt
Created Oct 6, 2011 — forked from 140bytes/LICENSE.txt
Mandelbrot fractal with zoom & panning in 133 bytes
View LICENSE.txt
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
@its-florida
its-florida / jquery.spin.js
Created Oct 16, 2011
jQuery Plugin for Spin.js
View jquery.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.
You can’t perform that action at this time.