I hereby claim:
- I am Affix on github.
- I am affix (https://keybase.io/affix) on keybase.
- I have a public key whose fingerprint is B143 C0B3 D2C8 158D 0DFF 7CB0 3DF1 24CD EDE8 E0CA
To claim this, I am signing this object:
class { 'openshift_origin' : | |
roles => ['broker','named','activemq','datastore','node'], | |
broker_hostname => 'broker.', | |
node_hostname => 'broker.', | |
named_hostname => 'broker.', | |
datastore_hostname => 'broker.', | |
activemq_hostname => 'broker.', | |
bind_key => 'YOUR_KEY', |
#!/usr/bin/env python | |
""" | |
Synchronise block devices over the network | |
Copyright 2006-2008 Justin Azoff <justin@bouncybouncy.net> | |
Copyright 2011 Robert Coup <robert@coup.net.nz> | |
License: GPL | |
Getting started: | |
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env python | |
# autoblock-twitter.py | |
# Automatically block twitter users who mention you in a tweet that you do not follow. | |
# I wrote this as my user is @cli and I was constantly getting unrelated spam mentions | |
# License : GPLv2+ | |
# Author : Keiran "Affix" Smith <Affix_AT_affix_DOT_me> | |
import tweepy | |
consumer_key="" |
def distance_between(lat1,lon1,lat2,lon2, miles=false) | |
r = 6371; # Kilometers | |
dLat = to_radian(lat2-lat1); | |
dLon = to_radian(lon2-lon1); | |
lat1 = to_radian(lat1); | |
lat2 = to_radian(lat2); | |
a = Math.sin(dLat/2) * Math.sin(dLat/2) + | |
Math.sin(dLon/2) * Math.sin(dLon/2) * Math.cos(lat1) * Math.cos(lat2); |
Custom recipe to get OS X 10.11 El Capitan running from scratch, setup applications and developer environment. This is very similar (and currently mostly the same) as my 10.10 Yosemite setup recipe (as found on this gist https://gist.github.com/kevinelliott/0726211d17020a6abc1f). Note that I expect this to change significantly as I install El Capitan several times.
I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.
This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.
You are encouraged to fork this and modify it to your heart's content to match your own needs.
<?php | |
/** | |
* @copyright 2012 TheHydroImpulse, Daniel Fagnan | |
* @version 0.1 | |
* @todo Add an overwite ability. Among other things. | |
* @note Use this as you wish. Extend it, Mash it. Enjoy it. | |
*/ |
server { | |
listen 80; | |
server_name www.example.com; | |
root /var/www/vhosts/example.com/public/; | |
location / | |
{ | |
index index.php index.html index.htm; | |
} |
#!/usr/bin/env python | |
# | |
# dumpit.py | |
# An Alternative to mysqldump written in Python | |
# Requires MySQLdb Python Module. | |
# | |
# Author : Keiran 'Affix' Smith | |
# Email : affix@affix.me | |
# Web : http://affix.me | |
# Copyright 2013 Keiran Smith |
public function DistAB($lata, $lona, $latb, $lonb) | |
{ | |
$delta_lat = $latb - $lata ; | |
$delta_lon = $lonb - $lona ; | |
$earth_radius = 6372.795477598; | |
$alpha = $delta_lat/2; | |
$beta = $delta_lon/2; | |
$a = sin(deg2rad($alpha)) * sin(deg2rad($alpha)) + cos(deg2rad($lata)) * cos(deg2rad($latb)) * sin(deg2rad($beta)) * sin(deg2rad($beta)) ; |