Skip to content

Instantly share code, notes, and snippets.

View alexlovelltroy's full-sized avatar
🏫
Attending Marcel Marceau College of Radio Performance

Alex Lovell-Troy alexlovelltroy

🏫
Attending Marcel Marceau College of Radio Performance
View GitHub Profile

#INTROS PRIVACY POLICY

  1. ###Introduction

    Thank you for visiting Intros.to, an online service which allows its Users to track introductions. Please read our Terms of Service and this Privacy Policy carefully, as you must agree to both as a condition of using our Service.

  2. ###Definitions

    Throughout this document, we may use certain words or phrases, and it is important that you understand the meaning of them. The following is a non-exhaustive list of definitions of words and phrases found in this document:

@alexlovelltroy
alexlovelltroy / handler_test.py
Created October 9, 2013 15:21
This is a generic mixin that can add action handlers to any other class
class HandlerMixin(object):
action_handlers = {}
def add_handler_action(self,action):
if action not in self.action_handlers.keys():
self.action_handlers[action] = []
def register_handler(self, action, function):
self.add_handler_action(action)
if function not in self.action_handlers[action]:
@alexlovelltroy
alexlovelltroy / claro_internet.sh
Created February 7, 2014 22:37
An expanded bash oneliner to use on a mac and notify you when the internet comes back
INTERNET=1 # We have internet access
while 1 ; do
export OLD_INTERNET=$INTERNET;
sleep 5 && dig vpn.activision.com +short && export INTERNET=1 || export INTERNET=0;
if [ $OLD_INTERNET -lt $INTERNET ]; then
say "We have internet";
fi;
if [ $OLD_INTERNET -gt $INTERNET ]; then
say "We lost internet";
fi;

Keybase proof

I hereby claim:

  • I am alexlovelltroy on github.
  • I am alexlovelltroy (https://keybase.io/alexlovelltroy) on keybase.
  • I have a public key whose fingerprint is 7C67 0D07 4189 4795 7758 5C38 8F8D 6E6E 3FEB 79D1

To claim this, I am signing this object:

@alexlovelltroy
alexlovelltroy / random_mnemonic.zsh
Created August 15, 2014 22:09
This script uses the menemonic_wordlist from the mnemonic encoding project to generate a set of word pairs
#!/usr/bin/env zsh
#
# This script uses the menemonic_wordlist from the mnemonic encoding project to generate a set of word pairs
# I use them for software release naming conventions and I like choices
# You can get it for yourself with curl
# curl -Lo menmonic_wordlist.txt http://web.archive.org/web/20091003023412/http://tothink.com/mnemonic/wordlist.txt
#
#
MNEMONIC_FILE="$HOME/Documents/mnemonic_wordlist.txt"
function random_word {
@alexlovelltroy
alexlovelltroy / random_mnemonic.zsh
Created September 2, 2014 22:00
This script uses the menemonic_wordlist from the mnemonic encoding project to generate a set of word pairs
#!/usr/bin/env zsh
#
# This script uses the menemonic_wordlist from the mnemonic encoding project to generate a set of word pairs
# I use them for software release naming conventions and I like choices
# You can get it for yourself with curl
# curl -Lo menmonic_wordlist.txt http://web.archive.org/web/20091003023412/http://tothink.com/mnemonic/wordlist.txt
#
#
MNEMONIC_FILE="$HOME/Documents/mnemonic_wordlist.txt"
function random_word {
@alexlovelltroy
alexlovelltroy / keygen
Created October 10, 2014 19:06
Build yourself a better ssh key
ssh-keygen -t ecdsa -b 521
@alexlovelltroy
alexlovelltroy / local_settings.py
Created November 21, 2014 21:46
Python settings handling
FOO='Barbar'
@alexlovelltroy
alexlovelltroy / civil_discussion.md
Created November 26, 2014 18:00
Rules for civilized discussion

don't be a jerk

@alexlovelltroy
alexlovelltroy / hello.js
Created December 9, 2014 20:19
nodejs hello world
var http = require("http");
var url = require("url");
function start() {
function onRequest(request, response) {
var pathname = url.parse(request.url).pathname;
console.log("Request for " + pathname + " received.");
response.writeHead(200, {"Content-Type": "text/plain"});
response.write("Hello World at " + pathname);