Skip to content

Instantly share code, notes, and snippets.

View zackkitzmiller's full-sized avatar
🏗️
Working from home

Zack Kitzmiller zackkitzmiller

🏗️
Working from home
View GitHub Profile
<?php
$env = $app->detectEnvironment(function() {
return getenv('[APPNAME]_ENV') ?: 'development';
});
<?php echo Form::open(array('url' => 'foo/bar', 'method' => 'post')); ?>
<form action="foo/bar" method="post">
@zackkitzmiller
zackkitzmiller / .htaccess
Last active December 18, 2015 18:29 — forked from dhrrgn/.htaccess
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?_uri=$1 [L]
@zackkitzmiller
zackkitzmiller / test.php
Last active December 17, 2015 02:29 — forked from dongilbert/test.php
<?php
print_r(new DateTime('01/01/2012'));
/*
DateTime Object
(
[date] => 2012-01-01 00:00:00
[timezone_type] => 3
[timezone] => America/Chicago
)
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
function proml {
local BLUE="\[\033[0;34m\]"
local RED="\[\033[0;31m\]"
local LIGHT_RED="\[\033[1;31m\]"
local GREEN="\[\033[0;32m\]"
local LIGHT_GREEN="\[\033[1;32m\]"
javascript:jQuery('#gregbox-overlay, #gregbox-wrap').hide();
![Alt Text](http://urltohost.com/image.jpg)
/*!
* Fuck Yeah Sticky Scroll v.1
*
* Loosely based on
* Contained Sticky Scroll v1.1
* By Matt Ward
* http://blog.echoenduring.com/2010/11/15/freebie-contained-sticky-scroll-jquery-plugin/
*
*
*
@zackkitzmiller
zackkitzmiller / pianobar.rb
Created April 11, 2011 18:33
ruby script for growl notify with pianobar
#!/usr/bin/ruby
trigger = ARGV.shift
if trigger == 'songstart'
songinfo = {}
STDIN.each_line { |line| songinfo.store(*line.chomp.split('=', 2))}
`growlnotify -t "Now Playing" -m "#{songinfo['title']}\nby #{songinfo['artist']}" -n 'pianobar' -a 'iTunes'`
end
$(document).ready(function(){
var placeholder_text = 'Email Address';
$('#input_field').focus(function(){
if ($(this).val() == placeholder_text) {
$(this).val('');
}