Skip to content

Instantly share code, notes, and snippets.

View iturgeon's full-sized avatar
👻
The answer is YES

Ian Turgeon iturgeon

👻
The answer is YES
View GitHub Profile
@iturgeon
iturgeon / fuel-error
Created January 12, 2012 17:11
Auto locate and tail the newest FuelPHP error log
#!/bin/sh
ARGS='noargs'
if [ $1 ] ; then
LOG_DIR=$1
else
echo 'Missing Required Arugments: root dir of fuel /dir/to/fuel/'
exit
fi
<div>
<? foreach ($items as $item) { ?>
<h2><?= $item['product_name'] ?></h2>
<img src="img/<?= $item['product_image'] ?>" />
<p><?= $item['description'] ?></p>
<? } ?>
</div>
@iturgeon
iturgeon / gist:3877271
Created October 12, 2012 04:18
Curl request to send a test credit card test to authorize.net
curl -F "
x_version=3.1
&x_delim_data=True
&x_delim_char=|
&x_relay_response=False
&x_login=[login]
&x_tran_key=[key]
&x_test_request=TRUE
&x_type=AUTH_CAPTURE
&x_first_name=Ian
@iturgeon
iturgeon / Default.sublime-commands
Created October 27, 2012 20:37
SublimeText 2 CamelCase to SnakeCase Converter
[
{
"caption": "Snake Case: Convert CamelCase to snake_case",
"command": "snake_case"
}
]
@iturgeon
iturgeon / .bash_profile
Created November 5, 2012 19:06
Trace Flash Debug Logs in the console
### opens "flashlog.txt" in Console
alias trace='tail -f ~/Library/Preferences/Macromedia/Flash\ Player/Logs/flashlog.txt | grep -v "^\->\|^<\-\|^\=\=>\|^<\=\="'
@iturgeon
iturgeon / Vagrantfile
Created November 29, 2012 19:45
Chef and Vagrant setup to easily create databases as needed
Vagrant::Config.run do |config|
config.vm.box = "lucid32"
config.vm.box_url = "http://files.vagrantup.com/lucid32.box"
config.vm.provision :chef_solo do |chef|
chef.cookbooks_path = "cookbooks"
# pass json_attribs to chef
chef.json = {
@iturgeon
iturgeon / gist:4471743
Last active December 10, 2015 17:59
FUELPHP oil command to run in different environments
# env FUEL_ENV=<einvironment> php oil <commands>
env FUEL_ENV=production php oil r migrate
@iturgeon
iturgeon / gist:4543686
Last active December 11, 2015 04:18
Normal Sublime text user settings
// Normal
{
"color_scheme": "Packages/Color Scheme - Default/Monokai Bright.tmTheme",
"draw_white_space": "all",
"font_face": "ProFontX",
"font_options":
[
"no_antialias"
],
"font_size": 9.0,
@iturgeon
iturgeon / bootstrap_dev.php
Last active December 15, 2015 09:28
Adding php 5.4's development server to FuelPHP's oil commands (built for fuelphp 1.6)
<?php
if (file_exists($_SERVER['DOCUMENT_ROOT'].$_SERVER['REQUEST_URI']))
{
// bypass existing file processing
return false;
}
else
{
// route requests though the normal path
@iturgeon
iturgeon / gist:6242194
Last active December 21, 2015 03:29
remove all .svn folders from directory recursively
find . -name .svn -print0 | xargs -0 rm -rf'