Skip to content

Instantly share code, notes, and snippets.

View jessegreathouse's full-sized avatar

Jesse Greathouse jessegreathouse

View GitHub Profile
@ericclemmons
ericclemmons / My_Application_Resource_DoctrineODM.php
Created December 2, 2010 19:42
How to boostrap Doctrine2 ODM (similar with ORM) in Zend Framework
<?php
// Assumes you've installed via PEAR doctrine-common & doctrine orm/odm
use Doctrine\Common\ClassLoader,
Doctrine\Common\Annotations\AnnotationReader,
Doctrine\ODM\MongoDB\DocumentManager,
Doctrine\ODM\MongoDB\Mongo,
Doctrine\ODM\MongoDB\Configuration,
Doctrine\ODM\MongoDB\Mapping\Driver\AnnotationDriver;
@chaoxu
chaoxu / screenshot.sh
Created January 7, 2011 18:47
Take a screenshot and upload to imageshack.us, then copy the link to clipboard. Allow one argument, use s for selection, a integer for amount of seconds to wait. (Can't do both)
#!/bin/bash
rm screenshot.png -f
if [ $# -ne 0 ]
then
if [ "X$1" = "Xs" ]
then
scrot screenshot.png -s
else
scrot screenshot.png -d $1
fi
@jessegreathouse
jessegreathouse / index.php
Created April 6, 2011 19:25
how to use custom headers and footers with CDclient [theoretically]
<?php
/*
We've built in the ability to only select certain content by using CSS selectors. This may yield unexpected results if not used carefully and is subject to change. for example, you may wish to only select the body head and form, and you may wish to store those things in variables so you can mix in your own content. Here is how you'd do something like that:
*/
include('library.php');
$client = new cdClient();
$client->request();
$client->initHeaders();
@xboston
xboston / phalcon-events.list
Created December 24, 2013 19:08
Phalcon events:list
dispatch:beforeDispatchLoop
dispatch:beforeDispatch
dispatch:beforeNotFoundAction
dispatch:beforeExecuteRoute
dispatch:afterInitialize
dispatch:afterExecuteRoute
dispatch:afterDispatch
dispatch:afterDispatchLoop
dispatch:beforeException
@anthonyholmes
anthonyholmes / bootstrap-sass-mixin-cheatsheet.scss
Created October 10, 2014 08:13
Bootstrap Sass Mixin Cheatsheet
// Alerts
@include alert-variant($background, $border, $text-color);
// Background Variant
@include bg-variant($parent, $color);
// Border Radius
@include border-top-radius($radius);
@include border-right-radius($radius);
@include border-bottom-radius($radius);