Skip to content

Instantly share code, notes, and snippets.

@vwood
vwood / schelling.py
Created February 16, 2012 04:12
Schelling Model
#!/usr/bin/python
import Tkinter as Tk
import random
class Schelling():
"""A Schelling model.
This is a model of a city undergoing dynamic racial segregation."""
race_colors = ["#F9C", "#000", "#FF0", "#F00", "#533"]
@vwood
vwood / gist:1725650
Created February 2, 2012 20:44
Pythonic Java
import java.net.* ;
import java.io.* ;
import java.util.* ;
public class Server {
public static void main( String[] args) {
try {
ServerSocket sock = new ServerSocket(4712,100) ;
while(true) new Handler(sock.accept()).start() ;}
catch(IOException e) {
System.err.println(e) ;};}}
@vwood
vwood / preemployment-questions.txt
Created February 10, 2022 08:50
Preemployment questions
How long has the average employee been working here?
When was the last time someone was promoted?
What technology changes are you most excited about?
What are the companies long term goals?
Who are your main competitors?
How often are releases done?
How many environments do you have? dev/test/staging/prod?
Who does the design of the project?
Where do feature requests come from?
@vwood
vwood / ecldemo.c
Created November 4, 2010 03:49
Example of ECL in a C program.
/*
Example of a C program embedding ECL with callbacks to C functions.
Compiled via: gcc ecldemo.c -lecl
*/
#include <stdio.h>
#include <stdlib.h>
#include "ecl/ecl.h"
#define DEFUN(name,fun,args) \
cl_def_c_function(c_string_to_object(name), \
@vwood
vwood / new_laptop.sh
Last active May 10, 2022 01:28
Setup new ubuntu machine (20.04)
#!/bin/bash
#
# New machine setup for UBUNTU
#
# fixes bad defaults, and installs base packages
#
gsettings set org.gnome.shell.extensions.desktop-icons show-home false
gsettings set org.gnome.shell.extensions.desktop-icons show-trash false