Skip to content

Instantly share code, notes, and snippets.

@maxdeliso
maxdeliso / .gitignore
Last active January 2, 2016 21:39
battery checker C program vs bash script
asmBatt
@maxdeliso
maxdeliso / .bashrc_snippet
Last active January 2, 2016 08:29
bashrc snippet
LOCAL_BINDIR="$HOME/local/bin"
# if local bin directory exists and is not in the path already, add it
if [[ -d "$LOCAL_BINDIR" ]] && [[ ! ($PATH =~ "$LOCAL_BINDIR") ]]; then
export PATH=$LOCAL_BINDIR:$PATH
fi
@maxdeliso
maxdeliso / mozconfig
Last active December 31, 2015 20:59
mozconfig
ac_add_options --disable-debug
ac_add_options --disable-tests
ac_add_options --disable-updater
ac_add_options --enable-jemalloc
ac_add_options --enable-official-branding
ac_add_options --enable-64bit
# ...
@maxdeliso
maxdeliso / gist:7011210
Created October 16, 2013 17:02
funthread.java
class FunThread extends Thread {
Object first[];
Object second[];
int size;
public FunThread(Object _first[], Object _second[], int _size) {
first = _first;
second = _second;
size = _size;
}
@maxdeliso
maxdeliso / .gitignore
Last active December 23, 2015 23:29
UVA id: 10199 - Tourist Guide
touristGuide
*.swp
@maxdeliso
maxdeliso / bin2text.py
Last active December 23, 2015 03:58
little python GUI to interactively convert text to binary strings and back
#!/usr/bin/env python
__author__ = 'Max DeLiso'
import tkinter
import tkinter.constants
from binutils import binEncodeString, attemptDecode, binDecodeString
class TkTest(tkinter.Frame):
@maxdeliso
maxdeliso / b2t.py
Last active December 22, 2015 14:59
string to binary program in python 3, using CLI, coded in functional style
### b2t.py - little program to convert strings to/from binary ###
### note: functional style emphasized.
### http://docs.python.org/dev/howto/functional
###
### by Max DeLiso ###
## IMPORTS ##
import re # regular expression module to recognize binary strings
import os # operating system interface for retrieving current directory
@maxdeliso
maxdeliso / pu.py
Last active December 21, 2015 05:49
PyPu
#! /usr/bin/env python3.3
# PyPu: Simple UDP chat.
import logging
import curses
import curses.ascii
from socketserver import UDPServer
from socketserver import BaseRequestHandler
@maxdeliso
maxdeliso / .gitconfig
Last active December 21, 2015 02:29
.vimrc & .gitconfig
[user]
email = [email protected]
name = Max DeLiso
[push]
default = matching
[core]
editor = gvim
[color]
ui = true
[alias]
@maxdeliso
maxdeliso / xmonad.hs
Last active December 20, 2015 10:49
simple xmonad config
-- Max DeLiso
-- xmonad config
import XMonad
import XMonad.Hooks.DynamicLog
import qualified Data.Map as M
main = xmonad =<< xmobar defaultConfig {
modMask = mod4Mask
, terminal = "urxvt"