Skip to content

Instantly share code, notes, and snippets.

View benallfree's full-sized avatar

Ben Allfree benallfree

View GitHub Profile
@benallfree
benallfree / trellis-tools.sh
Created July 15, 2017 01:18
Command line tools installation
# If you need HomeBrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Install Yarn
brew install yarn
# Install Hugo
brew install hugo
# Sublime command line shortcut
@benallfree
benallfree / iOS Compile & Debug
Created November 6, 2015 14:43
AppleScript to launch iOS Simulator and Safari debugger using iTerm
#!/usr/bin/osascript
# AppleScript to automatically compile Cordova and open the Safari debugger
set maxWait to 20
set hasClicked to false
set x to 0
set device_name to "Simulator"
# delay fix for yosemite
@benallfree
benallfree / open-webinspector.applescript
Created October 30, 2015 13:27 — forked from uniphonic/open-webinspector.applescript
This is an AppleScript to automatically compile Cordova and open the Safari debugger. You can also use Automator to assign this script to a shortcut key.
#!/usr/bin/osascript
# AppleScript to automatically compile Cordova and open the Safari debugger
set maxWait to 20
set hasClicked to false
set x to 0
set device_name to "iOS Simulator"
# delay fix for yosemite
@benallfree
benallfree / masonry.patch
Created June 2, 2015 14:35
Pretty Pinterest Pins Masonry layout patch
Index: pretty-pinterest-pins.php
===================================================================
--- pretty-pinterest-pins.php (revision 1172836)
+++ pretty-pinterest-pins.php (working copy)
@@ -4,7 +4,7 @@
* @version 1.3
*/
/*
-Plugin Name: Pretty Pinterest Pins
+Plugin Name: Pretty Pinterest Pins Custom
@benallfree
benallfree / initial-laravel-setup.md
Last active August 29, 2015 14:05
Initial Laravel setup

Add hostname to bootstrap/start.php:

'local' => array('homestead', 'Bens-MacBook-Pro.local'),

Install Dotenv:

"require": {
@benallfree
benallfree / bootstrap-and-responsive-laravel.md
Last active August 3, 2016 06:42
Add Bootstrap theme & responsive support to Laravel

Add bootstrapper to composer.json and follow setup instructions and documentation

"require": {
    "patricktalmadge/bootstrapper": "dev-develop"
}

Add to app/config/app.php providers:

@benallfree
benallfree / laravel-database-query-logging.md
Last active August 29, 2015 14:05
Add database query logging to Laravel

In app/config/database.php:

'log'=>$_ENV['DB_LOGGING'],

In .env

DB_LOGGING=1
<?php echo 'whoim = '.exec('/usr/bin/whoami');
#!/usr/bin/perl
my $id = (getpwuid($<))[0];
print "Content-type: text/html\n\n";
print "<html><body>";
print qq($id\n);
print "</body></html>";
@benallfree
benallfree / gitpromot.sh
Created August 10, 2014 17:56
gitprompt config
GIT_PROMPT_ONLY_IN_REPO=0
source /etc/skel/.bash-git-prompt/gitprompt.sh
alias ls='ls -lah'
shopt -s dotglob