Skip to content

Instantly share code, notes, and snippets.

View benley's full-sized avatar
🐈

Benjamin Staffin benley

🐈
View GitHub Profile
@benley
benley / gist:5953657
Created July 9, 2013 00:24
python vim niceties
" You most likely want these set in your vimrc:
filetype plugin indent on
" These three are used by the indent function below:
let s:maxoff = 50 " maximum number of lines to look backwards.
let pyindent_nested_paren="&sw*2"
let pyindent_open_paren="&sw*2"
" See http://google-styleguide.googlecode.com/svn/trunk/pyguide.html,
@benley
benley / mandelbrot.sh
Created February 19, 2013 08:30
Mandelbrot set generator in Bash
#!/bin/bash -i
# Draws a mandelbrot set.
# Author: Benjamin Staffin
#
# Simulates floating point by using big integers. Flagrantly uses two integers
# instead of complex numbers. I couldn't be arsed to calculate infinity limits
# of logarithmic functions in bash, so this just uses escape time values for
# colors.
#
# Algorithm reference: http://en.wikipedia.org/wiki/Mandelbrot_set#For_programmers
@benley
benley / debian-netinstall-hack.md
Created August 5, 2012 08:06
A quick and dirty netinstall method for Debian

A quick and dirty netinstall method for Debian

Requirements:

  • An existing computer (or virtual machine) running Linux. Other unix variants may work, but no guarantees. You need root access.
  • An internet connection. Duh.
  • The target machine and your netboot server must be on the same vlan (Ethernet segment). If you're doing this at home, they probably are.
  • The target machine must be connected to the network via wired ethernet, not wifi. PXE booting doesn't work with wifi.

For purposes of this document, I'm going to assume that you are installing Debian on an x86 or amd64 system.