Skip to content

Instantly share code, notes, and snippets.

Jansen Price sumpygump

View GitHub Profile
sumpygump /
Created Feb 20, 2014
symfony getting started

Symfony Standard Getting Started Guide


You must have composer and phing installed.

Create New Project

Create a new project by running the command

sumpygump /
Created Mar 13, 2014
Script to update the cache and logs directory with correct permissions for a Symfony project. Adapted from
# This script will update the cache and logs dirs to be owned by apache user
rm -rfv app/cache/*
rm -rfv app/logs/*
APACHEUSER=`ps aux | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data' | grep -v root | head -1 | cut -d\ -f1`
echo Apache user is $APACHEUSER
sumpygump / git-notes.txt
Last active Aug 29, 2015
Some notes about git
View git-notes.txt
Amend commit (only can amend the latest commit)
git commit --amend -m "Message"
Note that this will add anything you have staged to the commit
Retrieving old versions of a file
git checkout 4b4a5c48 -- filename.txt
Reverting a commit
git revert 4b4a5c48
This will bring up an editor to edit the commit message
sumpygump / composer.json
Created Mar 31, 2014
WP composer install
View composer.json
"repositories": [
"type": "package",
"package": {
"name": "wordpress",
"type": "webroot",
"version": "3.8.1",
"dist": {
"type": "zip",
sumpygump / sf.php
Created Apr 22, 2014
Universal app/console for Symfony applications
View sf.php
# This script allows you to run `sf` instead of app/console and you don't have
# to be the root of a Symfony application. It will traverse the parent
# directories until it finds app/console.
# Get the canonical directory of the current "path"
sumpygump / 0_reuse_code.js
Created Jul 29, 2014
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
sumpygump / README
Last active Aug 29, 2015
Dpkg Packages
# Dpkg Packages
Run this command to get the list of locally installed packages:
dpkg --get-selections | grep -v deinstall > ~/Desktop/packages
Then, when installing to the new computer, do this:
sudo dpkg --set-selections < ~/Desktop/packages && sudo apt-get -u dselect-upgrade
sumpygump / method
Created Jan 2, 2015
Method Radio Terminal Status
View method
#!/usr/bin/env php
* Method Radio Terminal status
* This will show the currently playing song and a brief song history from the
* terminal
* Save this file in your path as 'method'
View splay
#!/usr/bin/env python
# This is a quick CLI tool to preview a folder of audio samples.
# Run it in a directory with some .wav files.
# Uses mplayer to trigger playing the sounds.
# Currently it loads up as many samples as will fit on the keyboard (lowercase letters)
# In the future it will allow you to change directories, page through samples on the keyboard and maybe some other fun stuff.
import sys
import os
You can’t perform that action at this time.