Skip to content

Instantly share code, notes, and snippets.

View LindseyB's full-sized avatar
⚰️
When I hear that trumpet sound I'm gonna rise up outta the ground

Lindsey Bieda LindseyB

⚰️
When I hear that trumpet sound I'm gonna rise up outta the ground
View GitHub Profile
// checks for collisions using the separating axis theorem
bool VWCar::isColliding(VWCollisionObject* colObj){
int i;
// define the axes: 2 from collision object 2 from car
vector<ofxVec2f*> axes;
axes.reserve(4);
vector<ofxVec2f*>* objCorners = colObj->getCorners();
if(objCorners->empty()){
ofxVec2f vecE, vecF;
double s,t;
float Ax, Ay, Bx, By, Cx, Cy, Dx, Dy;
bool found = false;
for (int i=0; i<4; i++) {
Ax = objCorners->at(i)->x;
Ay = objCorners->at(i)->y;
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
char* toBase26(int num){
char* str;
str = malloc(sizeof(char)*10);
char* temp = str;
while(num > 0){
type World = String
type Player = String
initWorld :: IO World
initWorld = return "World"
initPlayer :: IO Player
initPlayer = return "Player"
act :: World -> String -> World
@LindseyB
LindseyB / grade_report.py
Created November 5, 2011 04:59
Creates an easy to parse grade report from grade grinder csv's
# Creates an easy to parse grade report from grade grinder csv's
# Usage: python grade_report.py [filename].csv
# Note: This assumes the CSV has had the rows before the problem headers removed
import sys
import csv
reader = csv.reader(open(sys.argv[1], 'rb'), delimiter=',', quotechar="'")
# Assignments as defined by the course webpage
@LindseyB
LindseyB / g510_rainbow.lua
Created March 15, 2012 02:07
lua code to rotate colors on the logitech g510 keyboard when g18 is hit
function OnEvent(event, arg)
if (event == "PROFILE_ACTIVATED") then
r1, g1, b1 = 0, 0, 0
end
if (event == "PROFILE_DEACTIVATED") then
color( 255, 0, 0, 50)
end
if (event == "G_PRESSED" and arg == 18) then
@LindseyB
LindseyB / randomWord.py
Created October 21, 2012 19:44
Generate a random word based on a read in dictionary
import random
infile = raw_input("Source file: ");
adjacency = [[0,0], [0,0]]
charlist = ["end", "start"]
# pick an index with a maximum value
def maxIndex( n ):

Node.js Resources

What is node.js?

Node.js is just JavaScript running on the server side. That's it. That's all there is to it.

Express

  • Express Docs, if you want to get started and already know JavaScript this is the place to be

(stolen from the feminism thread on SA)

Feminism 101, or "What in the fuck is The Gilded Cage?"

If you are new to feminism, approaching it from a position of privilege, or haven't read any of these books for any reason, I strongly recommend them.

Feminism is For Everybody: Passionate Politics by bell hooks. Coming from the perspective of a woman of color, bell hooks calls for feminism free of divisive policies and rich with discussion. She critically analyzes the problems facing feminists today, and proposes a vision of a beloved community that appeals to all those committed to equality in just 125 pages and using simple, accessible language.

No Turning Back: The History of Feminism and the Future of Women by Estelle Freedman. The author, a Stanford professor, examines 200 years of feminism and describes the critical momentum which the movement has gained. She explores the new approaches women are taking to traditional feminist concerns, and insightfully debunks the claim the feminism is dea

filename = "test.jpg"
size = File.size(filename)
count = %x{wc -l #{filename}}.split.first.to_i
factor = count/300
factor = 1 if factor < 1
File.open(filename, "rb+") do |file|
# skip some
file.seek(size/(rand(10..20)), IO::SEEK_CUR)