Want to create a Gist from your editor, the command line, or the Services menu? Here's how.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require_once 'Zend/Application/Resource/ResourceAbstract.php'; | |
/** | |
* TODO: short description. | |
* | |
* TODO: long description. | |
* | |
*/ | |
class My_Resource_Database extends Zend_Application_Resource_ResourceAbstract | |
{ | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var | |
PARALLEL_CONNECTS = 10, | |
http = require('http'), | |
sys = require('sys'), | |
connectionCount = 0, | |
messageCount = 0; | |
lastMessages = 0; | |
function addClient() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
OlderNewer