Skip to content

Instantly share code, notes, and snippets.

View ericclemmons's full-sized avatar
🏠
Working from home

Eric Clemmons ericclemmons

🏠
Working from home
View GitHub Profile
@ericclemmons
ericclemmons / default.phtml
Created October 21, 2010 04:45
Jekyll template
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>{{ page.title }} &mdash; CollegeDegrees.com</title>
</head>
<body>
{{ content }}
@ericclemmons
ericclemmons / bump_version
Created November 1, 2010 01:05
Bash script to merge, tag, & push the "develop" branch
#!/usr/bin/env bash
echo "Checking out master branch"
git checkout master
git pull origin master
git log master..develop
read -p "Review your changes..."
echo "Merging develop branch"
@ericclemmons
ericclemmons / app.php
Created March 25, 2011 03:49
Zend-friendly app.php using APPLICATION_ENV
<?php
// This is the revised `web/app.php` (click the previous edit of this gist to see the original)
//
// For those of us that deploy along-side Zend Framework apps, whose convention has been to pivot configuration
// around APPLICATION_ENV, `web/app.php` and `web/app_dev.php` is redundant.
require_once __DIR__.'/../app/bootstrap.php.cache';
require_once __DIR__.'/../app/AppKernel.php';
//require_once __DIR__.'/../app/bootstrap_cache.php.cache';
@xanf
xanf / AjaxAuthenticationListener.php
Created June 8, 2011 19:20
AJAX auth errors listener for Symfony2
<?php
namespace Application\ProdrepHelperBundle\Component\Event;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Security\Core\Exception\AuthenticationException;
use Symfony\Component\Security\Core\Exception\AccessDeniedException;
use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent;
/**
*/
class AjaxAuthenticationListener
@lucasfais
lucasfais / gist:1207002
Created September 9, 2011 18:46
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@kitek
kitek / gist:1579117
Created January 8, 2012 17:50
NodeJS create md5 hash from string
var data = "do shash'owania";
var crypto = require('crypto');
crypto.createHash('md5').update(data).digest("hex");
@jimbojsb
jimbojsb / gist:1630790
Created January 18, 2012 03:52
Code highlighting for Keynote presentations

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2:

@ericclemmons
ericclemmons / copy_file.sh
Created February 29, 2012 19:22
Rackspace Cloudfiles API - Copy File with Curl
# We need to get an AUTH TOKEN first
curl -X GET -D - \
-H "X-Auth-User: $USER" \
-H "X-Auth-Key: $API_KEY" \
https://auth.api.rackspacecloud.com/v1.0 \
# HTTP/1.1 204 No Content
# Server: Apache/2.2.3 (Red Hat)
# vary: X-Auth-Token,X-Auth-Key,X-Storage-User,X-Storage-Pass
# X-Storage-Url: https://storage101.ord1.clouddrive.com/v1/MossoCloud-something-something
@marktheunissen
marktheunissen / pedantically_commented_playbook.yml
Last active April 26, 2024 23:26 — forked from phred/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
This playbook has been removed as it is now very outdated.
@mrinterweb
mrinterweb / deploy.rb
Created July 25, 2012 02:46
Wordpress site deployment using capistrano
set :application, 'www.mysite.com'
set :deploy_to, "/srv/www.mysite.com"
set :domain, "www.mysite.com"
set :user, "deploymentuser"
set :scm, :git
set :repository, "git@github.com:myusername/myproject.git"
set :branch, :master
set :deploy_via, :remote_cache
set :copy_exclude, ['.git']
ssh_options[:forward_agent] = true