This file contains 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
#!/usr/bin/env php | |
<?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' |
This file contains 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
# 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 |
This file contains 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 | |
# | |
# This file echoes a bunch of color codes to the | |
# terminal to demonstrate what's available. Each | |
# line is the color code of one forground color, | |
# out of 17 (default + 16 escapes), followed by a | |
# test use of that color on all nine background | |
# colors (default + 8 escapes). | |
# |
This file contains 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains 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 | |
# 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. | |
targetfile=app/console | |
path=. | |
# Get the canonical directory of the current "path" |
This file contains 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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <errno.h> | |
#include <string.h> | |
#include <fcntl.h> | |
#include <signal.h> | |
#include <sys/types.h> | |
#include <sys/socket.h> | |
#include <netinet/in.h> |
This file contains 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
{ | |
"repositories": [ | |
{ | |
"type": "package", | |
"package": { | |
"name": "wordpress", | |
"type": "webroot", | |
"version": "3.8.1", | |
"dist": { | |
"type": "zip", |
This file contains 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
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 |
This file contains 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 | |
# 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 |
This file contains 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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Version: 1.1.0 | |
# Settings for this VM | |
VM_HOSTNAME = "php55.dev" | |
VM_IPADDRESS = "192.168.100.5" | |
MYSQL_ROOT_PW = "1111" | |
TIMEZONE = "America/Chicago" |