Skip to content

Instantly share code, notes, and snippets.

View JPBetley's full-sized avatar
🐢
Converting tabs and spaces

Phil Betley JPBetley

🐢
Converting tabs and spaces
View GitHub Profile
# Modify this file accordingly for your specific requirement.
# http://www.thegeekstuff.com
# 1. Delete all existing rules
iptables -F
# 2. Set default chain policies
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT DROP
@JPBetley
JPBetley / Homestead.yaml
Last active August 29, 2015 14:01
Homestead changes
---
authorize: /Users/tatsumori/.ssh/id_rsa.pub
keys:
- /Users/tatsumori/.ssh/id_rsa
folders:
- map: /Users/tatsumori/Code
to: /home/vagrant/Code
@JPBetley
JPBetley / tatsumori.zsh-theme
Last active August 29, 2015 13:57
Oh My ZSH Theme
if [[ -z $ZSH_THEME_CLOUD_PREFIX ]]; then
ZSH_THEME_CLOUD_PREFIX='☁'
fi
function git_prompt_info() {
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
echo "$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_PREFIX$(current_branch)$ZSH_THEME_GIT_PROMPT_SUFFIX"
}
function get_pwd() {
@JPBetley
JPBetley / .zshrc
Created March 21, 2014 18:25
zshrc config files
# Path to your oh-my-zsh configuration.
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="tatsumori"
alias rake="noglob rake"
@JPBetley
JPBetley / backup_database.sh
Created March 5, 2014 20:03
Simple Bash Backup Scripts
#! /bin/bash
TIMESTAMP=$(date +"%F")
BACKUP_ROOT="-------------------"
BACKUP_DIR="$BACKUP_ROOT$TIMESTAMP"
MYSQL_USER="----------------"
MYSQL=/usr/bin/mysql
MYSQL_PASSWORD="----------------"
MYSQLDUMP=/usr/bin/mysqldump
@JPBetley
JPBetley / .vimrc
Created February 12, 2014 00:48
Vim Configs
set nocompatible " be iMproved
filetype off " required!
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" let Vundle manage Vundle
" required!
Bundle 'gmarik/vundle'
@JPBetley
JPBetley / laravel-resource-route-expanded.sublime-snippet
Created January 26, 2014 02:11
Laravel Resource Route Expanded Sublime Snippet
<snippet>
<content><![CDATA[
Route::get('${1:resource}', ['as' => '${1}.index', 'uses' => '${1/(.+)/\u\1/g}sController@index']);
Route::get('${1}/create', ['as' => '${1}.create', 'uses' => '${1/(.+)/\u\1/g}sController@create']);
Route::post('${1}', ['as' => '${1}.store', 'uses' => '${1/(.+)/\u\1/g}sController@store']);
Route::get('${1}/{${1}}', ['as' => '${1}.show', 'uses' => '${1/(.+)/\u\1/g}sController@show']);
Route::get('${1}/{${1}}/edit', ['as' => '${1}.edit', 'uses' => '${1/(.+)/\u\1/g}sController@edit']);
Route::put('${1}/{${1}}', ['as' => '${1}.update', 'uses' => '${1/(.+)/\u\1/g}sController@update']);
Route::patch('${1}/{${1}}', ['uses' => '${1/(.+)/\u\1/g}sController@update']);
Route::delete('${1}/{${1}}', ['as' => '${1}.destroy', 'uses' => '${1/(.+)/\u\1/g}sController@destroy']);
@JPBetley
JPBetley / resource_route.php
Created January 26, 2014 01:55
Laravel Resource Route Expanded
<?php
Route::get('resource', ['as' => 'resource.index', 'uses' => 'ResourcesController@index']);
Route::get('resource/create', ['as' => 'resource.create', 'uses' => 'ResourcesController@create']);
Route::post('resource', ['as' => 'resource.store', 'uses' => 'ResourcesController@store']);
Route::get('resource/{resource}', ['as' => 'resource.show', 'uses' => 'ResourcesController@show']);
Route::get('resource/{resource}/edit', ['as' => 'resource.edit', 'uses' => 'ResourcesController@edit']);
Route::put('resource/{resource}', ['as' => 'resource.update', 'uses' => 'ResourcesController@update']);
Route::patch('resource/{resource}', ['uses' => 'ResourcesController@update']);
Route::delete('resource/{resource}', ['as' => 'resource.destroy', 'uses' => 'ResourcesController@destroy']);
@JPBetley
JPBetley / .gitconfig
Last active January 2, 2016 02:48
.gitconfig
[user]
name = John Phillip Betley
email = jpbetley@gmail.com
[alias]
st = status
co = checkout
br = branch
up = rebase
amend = commit --amend
@JPBetley
JPBetley / controller.php
Created October 22, 2013 19:38
Basic Controller Setup
<?php
class UserController extends BaseController {
protected $zab;
public function __construct(ZabbixWrapper $zab)
{
$this->zab = $zab;
}