Skip to content

Instantly share code, notes, and snippets.

@villimagg
villimagg / artisan
Last active December 15, 2015 07:49
An artisan executable to store under the bin/ directory for easy artisan commands and easy installation of an instance of Laravel 4 for creating new projects.
#!/bin/bash
if [ -f "./artisan" ]; then
php artisan "$@"
else
if [ "$1" == "new" ]; then
if [ ! `which git` ]; then
echo "For this installer to work you'll need to install Git."

This is a general-purpose function to ask Yes/No questions in Bash, either with or without a default answer. It keeps repeating the question until it gets a valid answer.

@villimagg
villimagg / gist:8293858
Created January 7, 2014 02:39
dotfiles
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# Uncomment the following line if you don't like systemctl's auto-paging feature:
# export SYSTEMD_PAGER=