Skip to content

Instantly share code, notes, and snippets.

View simplyluke's full-sized avatar

Luke Wright simplyluke

View GitHub Profile
// You wrote this
if (keyPressed){
if (key == UP)
fill (#F1D5E5);
ellipse (250,265, 9,8); }
else {
ellipse (250,265, 5,4); }
// Should be this
// For the "coded" keys, effectively anything other than a alphanumeric
if ((keyPressed) && (key == CODED) && (keyCode == DOWN)) {
fill(#ff0724); // RED
}
// For alphanumeric
if ((keyPressed) && (key == '8')) {
translate(0, -5);
}
<% content_for :body do %>
<% if controller.controller_name == 'teams' && controller.action_name == 'index' %>
<body data-no-turbolink="true">
<% end %>
<% end %>
{
{
"id" : "1",
"name": "Lorem Ipsum",
"url" : "http://balloonchallenge.org/teams/1",
"location": {
"latitude": "30.2807033",
"longitude": "97.755326"
}
// April Zero Style
$(document).ready(function() {
var year = 31536000730;
function age(){
var now = Date.now();
var myAge = now - (new Date(1997, 11, 19));
var years = myAge/year;
return years.toString().substring(0, 15);
}
@simplyluke
simplyluke / .rtorrent.rc
Created April 26, 2014 16:30
.rtorrent.rc
# This is an example resource file for rTorrent. Copy to
# ~/.rtorrent.rc and enable/modify the options as needed. Remember to
# uncomment the options you wish to enable.
# NECESSARY FOR YOUR WEBUI, DO NOT COMMENT THESE OUT. - fuck webui, I command line
# scgi_port = 127.0.0.1:5000
# encoding_list = UTF-8
# Maximum and minimum number of peers to connect to per torrent.
#min_peers = 40
# Be sure to restart your server when you modify this file.
# Your secret key is used for verifying the integrity of signed cookies.
# If you change this key, all old signed cookies will become invalid!
# Make sure the secret is at least 30 characters and all random,
# no regular words or you'll be exposed to dictionary attacks.
# You can use `rake secret` to generate a secure secret key.
# Make sure your secret_key_base is kept private
@simplyluke
simplyluke / gist:9847587
Created March 29, 2014 03:03
keybase.md

Keybase proof

I hereby claim:

  • I am simplyluke on github.
  • I am simplyluke (https://keybase.io/simplyluke) on keybase.
  • I have a public key whose fingerprint is 9DE8 4C81 393B 7FCA 0F64 FD91 F908 B546 06AC 221D

To claim this, I am signing this object:

@simplyluke
simplyluke / homework.py
Last active January 3, 2016 01:59
the bridge problem
def higher(x):
a = (x-252.0)**2.0
b = a/(-824.0)
return b + 136 - 59
def lower(x):
a = (x-252.0)**2.0
b = a/(-538.1695)
return b + 118 - 59
@simplyluke
simplyluke / gist:8191381
Last active January 1, 2016 19:38
RP Application API Design

Outline: RESTful API to manage the infrastructure of the application. Create users/goals/points via API and build mobile applications on top of it. I'm not too familiar with developing apps in this way, but it does not seem overly complicated. Pleae correct anything obviously wrong with this plan, still a noob

Users

Endpoints:

Users:

  • get /users, returns all users
  • get /users/:id, returns user