Skip to content

Instantly share code, notes, and snippets.

View amonger's full-sized avatar
🏄‍♂️

Alan Monger amonger

🏄‍♂️
View GitHub Profile
@amonger
amonger / build.xml
Created February 6, 2014 00:39
Phing build.xml
<?xml version="1.0" encoding="UTF-8"?>
<project name="Deploy" default="production" basedir="." description="A deployment Script">
<property name="remote_host" value="host.com"/>
<property name="remote_user" value="username"/>
<property name="remote_pass" value="password"/>
<target name="production">
<echo msg="Uploading remote phing script"/>
<scp host="${remote_host}" username="${remote_user}" password="${remote_pass}"
todir="/home/learnmango/phing-example"
@amonger
amonger / BuildRemote.xml
Created February 6, 2014 00:41
Phing Build Remote
<?xml version="1.0" encoding="UTF-8"?>
<project name="Deploy" default="production" basedir="." description="A deployment Script">
<property name="remote_host" value="host.com"/>
<property name="remote_user" value="user"/>
<property name="remote_pass" value="pass"/>
<target name="production">
<exec command="cd site" />
<echo msg="Pulling down latest git version"/>
<exec command="git pull" />
<echo msg="Updating dependancies"/>
@amonger
amonger / distance.sql
Last active August 29, 2015 14:03
Mysql Latitude Longitude distance
SELECT
id,
(3959 * acos(cos(radians(:latitude)) * cos(radians(lat)) * cos(radians(lng) - radians(:longitude)) +
sin(radians(:latitude)) * sin(radians(lat)))) AS distance
FROM user
HAVING distance < :distance
ORDER BY distance
LIMIT 0, 20;
@amonger
amonger / .tmux.conf
Last active October 3, 2018 19:34
Tmux Configuration
#new-session
set -g default-shell $SHELL
#set -g default-command "reattach-to-user-namespace -l ${SHELL}"
set -g default-command "reattach-to-user-namespace -l zsh"
set -g pane-border-status top
set -g pane-border-format "#{pane_current_path}"
set -g window-style 'bg=colour235'
set -g window-active-style 'bg=black'
### Keybase proof
I hereby claim:
* I am amonger on github.
* I am amonger (https://keybase.io/amonger) on keybase.
* I have a public key whose fingerprint is 6F1D 91BE 0F57 9C9F 5EC9 1BA5 FFA7 B0AE 63A2 105C
To claim this, I am signing this object:
@amonger
amonger / .zshrc
Last active May 14, 2016 19:29
.zshrc
case $- in *i*)
if [ -z "$TMUX" ]; then exec tmux; fi;;
esac
@amonger
amonger / MakePayment.php
Last active August 29, 2015 14:23
Omnipay Paypal Express Command
<?php
namespace App\Commands;
use App\Commands\Command;
use Dotenv;
use Illuminate\Contracts\Bus\SelfHandling;
use Omnipay\PayPal\ExpressGateway;
class MakePayment extends Command implements SelfHandling
@amonger
amonger / cowsay.yml
Created August 6, 2015 22:26
Ansible Example
---
- name: Install Cowsay
hosts: localhost
sudo: yes
connection: local
tasks:
- name: install cowsay
apt: name=cowsay
@amonger
amonger / gist:d4c41c4d9f38eeefc04e
Created March 16, 2016 15:05
Remove Merged Branches
git config --global alias.cleanup '! git branch --merged | grep -v "^* master$" | grep -v "^ master$" | xargs git branch -d'