Skip to content

Instantly share code, notes, and snippets.

View zot24's full-sized avatar
🦑
boom!

zot24

🦑
boom!
View GitHub Profile
@zot24
zot24 / ups_packages_services_codes_uk.php
Created December 5, 2013 15:37
UPS Service Codes & Package Type Codes in the UK
$packages = array(
"UPS Letter" => '01',
"Customer Supplied Package" => '02' ,
"Tube" => '03',
"PAK" => '04',
"UPS Express Box" => '21',
"UPS 25KG Box" => '24',
"UPS 10KG Box" => '25',
"Pallet" => '30',
"Small Express Box" => '2a',

Note: Some of these shortcuts have been remapped for my own convenience (Preferences->Keymap). These are Mac shortcuts, just use the Windows/Linux equivalent of the Cmd/Option/Ctrl/Del keys.

####Search, Go to, Navigation ####

Cmd + P - Search file

Cmd + Shift + O - Search everywhere

(I swapped the above two recently because I use Cmd + P to search for files most of the time).

@zot24
zot24 / citylink_service_list_300514.txt
Created May 30, 2014 15:20
CityLink Service List showing the ID of each service and the short description of each one
@zot24
zot24 / run_byzanz_gif_recorder
Created June 19, 2014 09:01
How to create a gifcast with byzanz
byzanz-record --duration=90 --x=60 --y=40 --width=1050 --height=1000 out.gif
@zot24
zot24 / aws_commands
Created June 26, 2014 08:19
My AWS commads
# Connect to AWS instance zot24.com with my personal functions
sh-aws-ubuntu zot24.com
@zot24
zot24 / hostname_from_instance
Created June 26, 2014 08:21
AWS Utilities functions
echo $(aws ec2 describe-instances --filters "{\"Name\":\"tag:Name\", \"Values\":[\"$1\"]}" --query='Reservations[0].Instances[0].PublicDnsName' | tr -d '"')
@zot24
zot24 / zshrc
Created June 26, 2014 08:25
My ZSH config file
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="agnoster"
# Default user name
@zot24
zot24 / alias
Created June 26, 2014 17:28 — forked from JeffreyWay/.bash_profile
Personal bash/zsh alias
# 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
@zot24
zot24 / start.php
Created June 27, 2014 08:31
This is how I detect my environment with Laravel, if I'm running from the console outside of Vagrant I'm calling the environment console which have all the credentials to access the database from outside of the virtual machine. And if I'm using the browser and there is not ENV set up I'm using by default development environment.
$env = $app->detectEnvironment(function () use ($app)
{
return getenv('ENV') ?: ($app->runningInConsole() ? 'console' : 'development');
});
@zot24
zot24 / script
Created September 24, 2014 14:36
Run command in a child process with gulp
gulp.task "run", (command, cb) ->
exec = require('child_process').exec;
exec command, (err, stdout, stderr) ->
console.log(stdout);
console.log(stderr);
cb(err);