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
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)
@LindseyB
LindseyB / arroz_con_garbanzos.md
Last active August 29, 2015 14:12
Arroz con Garbanzos recipe

Arroz con Garbanzos

ingredients

  • 2 tbsp olive oil
  • 1 onion, chopped
  • 1 green bell pepper, chopped
  • 1 garlic clove, minced
  • 2 cups of medium or long-grain white rice
-- Ada Lovelace is credited with writing the first program (one which calculated Bernoulli numbers)
-- Many years later the Ada programming language was created
--
-- This Ada uses the following algorithm for computing Bernoulli numbers
-- (http://en.wikipedia.org/wiki/Bernoulli_number#Algorithmic_description)
with Ada.Text_IO;
use Ada.Text_IO;
with Ada.Float_Text_IO; -- in Ada Float IO is treated differently from text IO, same goes for integers
use Ada.Float_Text_IO;
# The following is a quick and dirty example of uploading to vimeo using ruby
# It assumes that you already have an access token for a user
require 'net/http'
require 'httparty'
ACCESS_TOKEN = "your access token here"
auth = "Bearer #{ACCESS_TOKEN}"
# get ticket

B7 Em B D

(Em, C, G, B7)(x2) - dd uu du

I'm not angry anymore

Well sometimes I am

Well sometimes I am

@LindseyB
LindseyB / bloop.ino
Last active September 2, 2015 03:26
// rainbow the main LED on twitter mention (just setup an IFTTT to trigger the publish of an even with "bloop")
void setup() {
Particle.subscribe("bloop", myHandler);
RGB.control(true);
}
void loop() {
//nothing to see here!
}
// 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){
- "Hardcore tea action!"
- "Physics!"
- "Explosion sound!"
- "Over 15 achievements!"
- "Coming soon!"
- "Danger!"
- "M-M-M-Monster kill!"
- "Single player experience!"
- "The 2015's best tea simulation game!"
- "Probably at least an entire hour of gameplay!"