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 / thread.py
Last active March 29, 2023 19:17 — forked from anonymous/chain.py
clojure `->`-style functional threading
from functools import reduce
def thread(*args):
"""
Functional thread ->, inspired by clojure and https://stackoverflow.com/a/17122666/333294
Toy example that only works for functions or airity 1
"""
caller = lambda x, y: y(x)
return reduce(caller, args[1:], args[0])
@0atman
0atman / mdlp.awk
Created March 11, 2017 10:20 — forked from trauber/mdlp.awk
Agnostic literate programming for github flavored markdown.
#!/usr/bin/awk -e { if (/^```/) { i++; next } if ( i % 2 == 1) { print } }
# mdlp - agnostic literate programming for github flavored markdown.
# I release this script into the public domain.
# Rich Traube, Fri Feb 15 09:07:27 EST 2013
@0atman
0atman / clapping_music.alda.clj
Last active August 29, 2016 23:33 — forked from daveyarwood/clapping_music.alda
Steve Reich's "Clapping Music" in Alda
(ns clapping "
Clapping Music (1972)
for two performers
Steve Reich
sheet music:
https://sites.ualberta.ca/~michaelf/SEM-O/SEM-O_2014/Steve's%20piece/clapping_reich.jpg
This alda version slightly tweaked from daveyarwood:
@0atman
0atman / remove-sidebar.css
Last active October 1, 2018 15:01 — forked from nottrobin/remove-sidebar.css
slack.com remove left sidebar
/* hide the sidebar */
#team_menu {display: none;}
#col_channels_bg {display: none;}
#col_channels {display: none;}
#messages_container {margin-left: 0;}
#messages-input-container {left: -160px;}
/* move the favouites star over */
#channel_header .star {
"""
This fabric file makes setting up and deploying a django application much
easier, but it does make a few assumptions. Namely that you're using Git,
Apache and mod_wsgi and your using Debian or Ubuntu. Also you should have
Django installed on your local machine and SSH installed on both the local
machine and any servers you want to deploy to.
_note that I've used the name project_name throughout this example. Replace
this with whatever your project is called._