Skip to content

Instantly share code, notes, and snippets.

View zot24's full-sized avatar
🦑
boom!

zot24

🦑
boom!
View GitHub Profile
@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);
@zot24
zot24 / script.sh
Created September 24, 2014 14:37
Prepend line to file using sed on a Mac, this is only valid if the script already have some data in it
sed -i '' -e $'1i\\\n Here is my new top line' file
@zot24
zot24 / search_issue_github
Created October 6, 2014 11:30
Github search open issue without a milestone and without the label 's:in-pull-request'
is:open is:issue no:milestone -label:s:in-pull-request