I hereby claim:
- I am jakeasmith on github.
- I am jakeasmith (https://keybase.io/jakeasmith) on keybase.
- I have a public key whose fingerprint is 857E 1166 E3F8 2B03 D031 EC7D 30D8 B376 3748 E328
To claim this, I am signing this object:
<?php | |
class BaseAction | |
{ | |
protected $close_session = true; | |
public function __construct() | |
{ | |
session_start(); | |
if($this->close_session)) { |
<?php | |
abstract class BaseType | |
{ | |
abstract public function calculate($foo, $bar); | |
public function validate($baz) | |
{ | |
return $baz === true; | |
} |
#!/bin/bash | |
# Put this file at: .git/hooks/post-checkout | |
# and make it executable | |
# You can install it system wide too, see http://stackoverflow.com/a/2293578/685587 | |
# Original source: http://nschoenmaker.nl/2013/07/composer-post-checkout-hook-in-git/ | |
PREV_COMMIT=$1 | |
POST_COMMIT=$2 | |
I hereby claim:
To claim this, I am signing this object:
# Colors | |
DARK_PURPLE="\[\033[1;34m\]" | |
GREEN="\[\033[0;32m\]" | |
GREY="\[\033[1;30m\]" | |
NORMAL="\[\033[0m\]" | |
RED="\[\033[0;31m\]" | |
YELLOW="\[\033[0;33m\]" | |
# Git shortcuts | |
alias gci='git commit' |
mysqldump [database] | pv | gzip -c > [file].sql.gz |
#!/bin/bash | |
command -v git >/dev/null 2>&1 && echo "Git is installed" || { echo >&2 "I require git but it's not installed. Please download it from http://git-scm.com/"; exit 1; } | |
command -v VBoxManage >/dev/null 2>&1 && echo "VirtualBox is installed" || { echo >&2 "I require VBoxManage but it's not installed. Please download it from https://www.virtualbox.org/"; exit 1; } | |
command -v vagrant >/dev/null 2>&1 && echo "Vagrant is installed" || { echo >&2 "I require vagrant but it's not installed. Please download it from http://www.vagrantup.com/"; exit 1; } |
<?php | |
/** | |
* Spits debug output to the terminal | |
* | |
* @return void | |
* @author Jake A. Smith | |
* @param string $msg the string to display | |
* @param int $line_breaks number of line breaks | |
* @param $bool $before Determines whether the line breaks will show before or after the message |
<?php | |
$start_date = strtotime('3 months ago'); | |
$start_quarter = ceil(date('m', $start_date) / 3); | |
$start_month = ($start_quarter * 3) - 2; | |
$start_year = date('Y', $start_date); | |
$start_timestamp = mktime(0, 0, 0, $start_month, 1, $start_year); | |
echo $start_timestamp; |