Skip to content

Instantly share code, notes, and snippets.

View bgallagh3r's full-sized avatar

Brian Gallagher bgallagh3r

View GitHub Profile
public function range_add($aVars) {
$aVars[] = "range";
return $aVars;
}
public function range_where( $where, $args ) {
if( !is_admin() ) {
$range = ( isset($args->query_vars['range']) ? $args->query_vars['range'] : false );
if( $range ) {
$range = split(',',$range);
$where .= "AND LEFT(wp_posts.post_title,1) BETWEEN '$range[0]' AND '$range[1]'";
# laravel new-app
alias laravel="git clone -o laravel -b develop https://github.com/laravel/laravel.git"
alias artisan="php artisan"
alias migrate="php artisan migrate"
alias serve="php artisan serve"
alias dump="php artisan dump"
alias t="phpunit"
# Generators Package
@bgallagh3r
bgallagh3r / controller.sublime-snippet
Created September 19, 2012 15:36
Laravel Controller - Sublime Text 2 Snippet
<snippet>
<content><![CDATA[
<?php
class ${1}s_Controller extends Base_Controller {
/*
|--------------------------------------------------------------------------
| Parent Contstruct
|--------------------------------------------------------------------------
@bgallagh3r
bgallagh3r / gist:3745158
Created September 18, 2012 19:11
Ascii Meme: Challenge Accepted
.. ..
......... ......
. . ..... . .. . . ... . ...
. ... .=?8nmmmmmmmmmmmnz=,.... ...
.......,=nmd7: . . . . . .=omnz: ..
@bgallagh3r
bgallagh3r / gist:3745154
Last active January 23, 2023 00:38
Ascii Meme: Troll
░░░░░▄▄▄▄▀▀▀▀▀▀▀▀▄▄▄▄▄▄░░░░░░░
░░░░░█░░░░▒▒▒▒▒▒▒▒▒▒▒▒░░▀▀▄░░░░
░░░░█░░░▒▒▒▒▒▒░░░░░░░░▒▒▒░░█░░░
░░░█░░░░░░▄██▀▄▄░░░░░▄▄▄░░░░█░░
░▄▀▒▄▄▄▒░█▀▀▀▀▄▄█░░░██▄▄█░░░░█░
█░▒█▒▄░▀▄▄▄▀░░░░░░░░█░░░▒▒▒▒▒░█
█░▒█░█▀▄▄░░░░░█▀░░░░▀▄░░▄▀▀▀▄▒█
░█░▀▄░█▄░█▀▄▄░▀░▀▀░▄▄▀░░░░█░░█░
░░█░░░▀▄▀█▄▄░█▀▀▀▄▄▄▄▀▀█▀██░█░░
░░░█░░░░██░░▀█▄▄▄█▄▄█▄████░█░░░
@bgallagh3r
bgallagh3r / gist:3745139
Created September 18, 2012 19:08
Ascii Meme: Y U NO Guys
ლ(ಠ_ಠლ)
ლ(ಠ益ಠლ)
(ノಠ益ಠ)ノ彡
@bgallagh3r
bgallagh3r / gist:3745112
Created September 18, 2012 19:04
Ascii Meme: Epic Smiley
...gNMMM@@MMMNa+..
..M@M#"=!........?7TWMMN&,
..MMY=...`.....`...```....?YMMa.
.JM#^..``.```````````````....`.JW@N.
.M#^.``.`.```````````````.`..````.,WMh.
.MM5.J.J..```.````````..`.JJ.,,`...``.JMN.
.MM.JY^` .MMa .```````.`.M"= .dMN,`.`.`.MM,
.@M.M$ @@MMN.``````.`dF J@@MMp````..MM,
M@^JF ?WH"Jb .`````JF "H"^M,..```.@N
JMF dF JN `````.@F gF `.`.`J@F
@bgallagh3r
bgallagh3r / route.sublime-snippet
Created September 14, 2012 00:10 — forked from JeffreyWay/snippet.xml
Laravel Route Resource - Sublime Text 2 Snippet
<snippet>
<content><![CDATA[
/*
|--------------------------------------------------------------------------
| RESTful routes for ${1} controller
|--------------------------------------------------------------------------
|
|
| HTTP VERB | Controller | Description
| GET | ${1}s/ | Get all ${1}s
@bgallagh3r
bgallagh3r / gitutils.ps1
Created September 5, 2012 14:22 — forked from markembling/gitutils.ps1
Powershell functions for git information
# Git functions
# Mark Embling (http://www.markembling.info/)
# Is the current directory a git repository/working copy?
function isCurrentDirectoryGitRepository {
if ((Test-Path ".git") -eq $TRUE) {
return $TRUE
}
# Test within parent dirs
@bgallagh3r
bgallagh3r / profile.ps1
Created August 30, 2012 18:05 — forked from markembling/profile.ps1
My preferred prompt for Powershell - includes git info.
# My preferred prompt for Powershell.
# Displays git branch and stats when inside a git repository.
# See http://gist.github.com/180853 for gitutils.ps1.
. (Resolve-Path ~/Documents/WindowsPowershell/gitutils.ps1)
function prompt {
$path = ""
$pathbits = ([string]$pwd).split("\", [System.StringSplitOptions]::RemoveEmptyEntries)
if($pathbits.length -eq 1) {