Skip to content

Instantly share code, notes, and snippets.

View sleexyz's full-sized avatar

Sean Lee sleexyz

View GitHub Profile
@sleexyz
sleexyz / calen
Last active December 10, 2015 07:58
Calender script...
#!/usr/bin/env python
#
# calen - a calender app
import os
import sys
from termcolor import colored
class entry:
def __init__(self, date, task):
@sleexyz
sleexyz / mountdav
Last active December 10, 2015 16:48
Simple mounting script for Phillips Exeter Academy's webfolders using wdfs
#!/bin/bash
EXPECTED_ARGS=1
if [ $# -ne $EXPECTED_ARGS ]
then
echo "Usage: $0 directory"
exit 1
fi
wdfs https://webfolders.exeter.edu/$1 ~/.mount/$1
nitrogen --restore &
sudo macshit &
urxvtq &
redshift &
xbindkeys &
ssh-agent &
export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel'
.bin/statusbar &
/*
* Problem 50 - Project Euler
* Sean Lee 02/03/12
*/
var isPrime = []
var primes = []
var genprimes = function(upperbound){ //Sieve of Erastothenes
for (var i = 0; i< upperbound; i++){
@sleexyz
sleexyz / broadcast
Created February 20, 2013 23:23
Big Brother espeak
#!/bin/bash
echo $@ | ssh sean.local 'espeak --stdout|aplay -t wav -'
@sleexyz
sleexyz / treminder
Created February 20, 2013 23:25
Big Brother type task reminder for t
#!/usr/bin/env python
from time import sleep
from sh import t, broadcast
from random import choice
name = "Sean"
phrases = [
name + ", you better ",
]
@sleexyz
sleexyz / ( PER \ IN ) vade Fisher
Created January 20, 2014 04:07
Overtone Code
(ns insane-noises.core
(:use [overtone.live]
[overtone.inst.piano]
[overtone.inst.sampled-piano]
[overtone.inst.drum]
[overtone.inst.synth]
))
;;defsynth vs definfst
;(definst foo [freq 220] (lpf (saw (mouse-y 10 300 LIN)) (mouse-x 40 5000 EXP)))
@sleexyz
sleexyz / switchaudio
Created January 22, 2014 14:47
Audio card switching lil script
#!/bin/bash
A="$HOME/.asoundrc"
B="$HOME/.asoundrc_old"
if [[ -e $A ]]; then
mv "$A" "$B"
echo "Switched to onboard soundcard"
else
mv "$B" "$A"
#/usr/bin/env python
import numpy as np
import sys
import matplotlib.pyplot as plt
#Todo: add slider, make bifurication diagram
#
# An investigation into the Logistic map, and an introduction to matplotlib