Skip to content

Instantly share code, notes, and snippets.

View 0atman's full-sized avatar
🦀
Oxidising

Tristram Oaten 0atman

🦀
Oxidising
View GitHub Profile
@0atman
0atman / resume.py
Created October 30, 2012 11:06
resume
from datetime import date, timedelta
from textwrap import wrap
years = timedelta(weeks=52)
tris = {
"fullname": "Tristram Oaten",
"email": "tris@blackgateresearch.com",
"bio": """I specialise in functional and object-oriented Javascript,Python and Django development
and high-availability Linux systems administration in a heterogeneous environment.
#!/bin/bash
if [ -z "$1" ]; then
echo "`basename $0` {start|stop}"
exit
fi
case "$1" in
start)
/usr/bin/Xvfb :99 -ac -screen 0 1024x768x8 &
@0atman
0atman / migrate.sh
Created December 14, 2012 11:51
tweak model, run this
./manage.py schemamigration cms --auto; ./manage.py migrate && ./manage.py graph_models cms -g -o cms.svg && ./manage.py runserver_plus
@0atman
0atman / rekt.md
Last active October 20, 2015 08:45
  • not rekt
  • robrecht
@0atman
0atman / available.py
Created October 26, 2015 11:55
Quick domain checker
import requests
available = lambda d: "is still available" in requests.get("http://www.checkdomain.com/cgi-bin/checkdomain.pl?domain={domain}.com".format(domain=str(d))).text
@0atman
0atman / tones.sh
Created November 4, 2015 10:17
An ubuntu implementation of http://kmkeen.com/awk-music/
while true
do
awk 'function wl() {
rate=64000;
return (rate/160)*(0.87055^(int(rand()*10)))};
BEGIN {
srand();
wla=wl();
while(1) {
wlb=wla;
@0atman
0atman / literal.py
Last active November 4, 2015 10:19
python class for literal function creation from dictionaries
class Literal:
'class for literal object creation from dictionaries'
def __init__(self, **kwargs):
self.__dict__.update(kwargs)
@0atman
0atman / date_ideas.py
Last active November 16, 2015 12:54
This article seemed so mechanical, I decided to reverse enginer the generator that made it http://www.tickld.com/x/jaw/20-awesome-date-ideas
from random import choice
location = [
"Go on a search for as many good climbing trees as possible",
"Go to a major chain bookstore",
"Have them dressed up as a ghost and you dress up as Pacman",
"Create photo evidence suggesting that you went on an adventure",
"Dress up as superheroes",
"Build forts out of furniture and blankets",
@0atman
0atman / email_debug.py
Created December 1, 2015 16:05
You can sign up to services without using your real email address, just run this on your server and email it
import smtpd
import asyncore
server = smtpd.DebuggingServer(('0.0.0.0', 25), None)
print "Server running, all emails sent to this server will be echoed to the screen."
asyncore.loop()
@0atman
0atman / CONTRIBUTING.md
Created December 8, 2015 17:13
A template CONTRIBUTING file, for hygienic PRs

PR Template

Copy and paste this into your PR description. Sections are fine to be blank, but own the fact they are blank and leave them in. No documentation can be ok, but it must be deliberate.

## Description
A few sentences describing the overall goals of the pull request's commits.

## Related
List related PRs, issues, trello cards, etc.