Skip to content

Instantly share code, notes, and snippets.

View wilmoore's full-sized avatar

Wil (₩) Moore III wilmoore

View GitHub Profile
# The GraphicsMagick action, dependent on the `gm` command, is able to perform
# any number of GraphicsMagick conversions on an image passed in as an input.
# The options hash should specify the +name+ for the particular step (which is
# appended to the resulting image filename) the +command+ (eg. convert, mogrify),
# the +options+ (to the command, eg. -shadow -blur), and the +extension+ which
# will determine the resulting image type. Optionally, you may also specify
# +input+ as the name of a previous step; doing this will use the result of
# that step as the source image, otherwise each step uses the original image
# as its source.
class GraphicsMagick < CloudCrowd::Action
@jwage
jwage / SplClassLoader.php
Last active April 9, 2024 21:04
Add MIT license.
<?php
/*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
anonymous
anonymous / Resource.php
Created October 30, 2009 19:27
require_once 'Zend/Application/Resource/ResourceAbstract.php';
/**
* TODO: short description.
*
* TODO: long description.
*
*/
class My_Resource_Database extends Zend_Application_Resource_ResourceAbstract
{
var
PARALLEL_CONNECTS = 10,
http = require('http'),
sys = require('sys'),
connectionCount = 0,
messageCount = 0;
lastMessages = 0;
function addClient() {
@jgornick
jgornick / gist:249442
Created December 4, 2009 23:00
ZF: Zend_Application_Resource_Acl
# Adding a role
# resources.acl.roles.{roleName}.id = {roleId}
resources.acl.roles.guest.id = "G"
# Assigning parents to a role
# resources.acl.roles.{roleName}.parents = {parentRoleIds} (multiple in csv)
resources.acl.roles.user.id = "U"
resources.acl.roles.user.parents = "G"
# Adding a resource
#!/bin/bash
# Expand globs to null when there are no matches
shopt -s nullglob
# Look for either a '<subdir>/console' or a 'symfony' file
until
file=(*/console symfony); [[ -f "$file" ]] && php "$file" "$@" && exit;
do
[[ "$PWD" == "/" ]] && break;
@hugs
hugs / LICENSE
Created February 15, 2010 01:45
The Node.js "Hello World" web server ported to CoffeeScript
I, Jason Huggins, the author of the work "CoffeeScript Web Server" (2010), irrevocably renounce
all current and future legal rights to the work in any medium whatsoever.
I stand behind the merit of the work, but disclaim all liability for it under law.
I encourage you, the audience, to share, copy, distribute, perform, remix, mash up, interpret,
excerpt, translate, and otherwise enjoy and use the work as you will.
I request that you acknowledge my authorship.
@defunkt
defunkt / clients.md
Created April 18, 2010 14:09
A list of Gist clients.

Gist Clients

Want to create a Gist from your editor, the command line, or the Services menu? Here's how.

Editor Support

@wilmoore
wilmoore / SplClassLoader.php
Created June 5, 2010 04:25 — forked from jwage/SplClassLoader.php
PHP 5.3 Namespace Autoloader
<?php
/**
* SplClassLoader implementation that implements the technical interoperability
* standards for PHP 5.3 namespaces and class names.
*
* http://groups.google.com/group/php-standards/web/final-proposal
*
* // Example which loads classes for the Doctrine Common package in the
* // Doctrine\Common namespace.
@hemanth
hemanth / gist:458534
Created June 30, 2010 11:13
Fibonacci Sequences
Ada
Recursive
function fib(n : integer) return integer is
begin
if n < 2 then
return n;
else
return fib(n-1) + fib(n-2);
end if;