Skip to content

Instantly share code, notes, and snippets.

gavinmyers / .bashrc
Last active Dec 11, 2015
default conf files, I didn't write most of these but I'm keeping them here as a reference for when I build a new machine.
View .bashrc
alias tmux="TERM=screen-256color-bce tmux -2"
alias geany="sublime"
gavinmyers / cloo.clj
Last active Dec 10, 2015
Goop started in Clojure (currently just draws random pixel data, not optimized)
View cloo.clj
(import javax.swing.JFrame)
(import javax.swing.JPanel)
(import java.awt.event.ActionEvent)
(import java.awt.Dimension)
(import java.awt.Color)
(import javax.swing.Timer)
(import java.awt.event.ActionListener)
(import java.awt.event.KeyListener)
(import java.awt.image.BufferedImage)
(set! *warn-on-reflection* true)
gavinmyers / goop.c
Last active Dec 10, 2015
playing around, this is very broken
View goop.c
#include <GL/glut.h>
#define GOOP_WIDTH 1000
#define GOOP_HEIGHT 1000
static GLubyte GoopImage[GOOP_WIDTH][GOOP_HEIGHT][3];
void goop(void) {
int i, j, k;
for (i = 2; i < GOOP_HEIGHT-2; i++) {
for (j = 10; j < GOOP_WIDTH-25; j++) {
gavinmyers /
Created Dec 22, 2012
Initial port of, not fully moved over and serious performance issues
#!/usr/bin/env python
import random
from pyglet.image import ImageData
from pyglet.window import *
w = 320
h = 320
window = pyglet.window.Window()
img = pyglet.image.create(w,h)
gavinmyers /
Created Dec 3, 2012
Goop (Java, BufferedImage)
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.image.BufferedImage;
public class Goop extends JPanel implements ActionListener {
private BufferedImage canvas;
gavinmyers /
Created Sep 16, 2012
pyglet, simple window
#!/usr/bin/env python
from math import pi, sin, cos
from import *
from pyglet.window import *
import pyglet
tile = 24
gavinmyers /
Created Jul 27, 2012
REST, CoffeeScript, NodeJS, Redis
express = require "express"
crypto = require "crypto"
user = require "./src/user"
project = require "./src/project"
app = express.createServer()
app.listen 8008
app.get '/', (req, res) ->
res.write JSON.stringify {version:0.3}
res.end ""
gavinmyers / prime.rb
Created May 14, 2012
Prime Number Calculator in Ruby
View prime.rb
#!/usr/bin/env ruby
puts "limit number:"
max = Integer(gets)
primes = []
puts "going from 2 to #{max}"
(2..max).select do |current|
# if current is divisible by any number in the array (that is not itself) it is not prime
isPrime = true
primes.each do |prime|
gavinmyers / 01.lisp
Last active Oct 4, 2015
Clojure, install and investigation
View 01.lisp
(defn random-letters [limit iteration]
(println (format "iteration: %s" iteration))
(println (format "limit: %s" limit))
(random-letters 25 5)
package test;
public class Test {
private static String alphabet = "abcdefghijklmnopqrstuvwxyz";
public static void main(args[]) { //haven't written main in awhile... pretty sure this is wrong
int limit = 100; //hard coding since I dont remember how to work with args
int iteration = 3; //every third number
int count = iteratin;
for(int i = 0; i < limit; i++) {