Skip to content

Instantly share code, notes, and snippets.

gavin gavinmyers

Block or report user

Report or block gavinmyers

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@gavinmyers
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
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
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
gavinmyers / goop.py
Created Dec 22, 2012
Initial port of Goop.java, not fully moved over and serious performance issues
View goop.py
#!/usr/bin/env python
import random
from pyglet.image import ImageData
from pyglet.window import *
w = 320
h = 320
window = pyglet.window.Window()
window.set_size(w,h)
img = pyglet.image.create(w,h)
@gavinmyers
gavinmyers / Goop.java
Created Dec 3, 2012
Goop (Java, BufferedImage)
View Goop.java
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
gavinmyers / app.py
Created Sep 16, 2012
pyglet, simple window
View app.py
#!/usr/bin/env python
from math import pi, sin, cos
from pyglet.gl import *
from pyglet.window import *
import pyglet
tile = 24
@gavinmyers
gavinmyers / main.coffee
Created Jul 27, 2012
REST, CoffeeScript, NodeJS, Redis
View main.coffee
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
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
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)
View FirstAttempt.java
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++) {
You can’t perform that action at this time.