Skip to content

Instantly share code, notes, and snippets.

View joelip's full-sized avatar

Joe Lipper joelip

View GitHub Profile
@beesandbombs
beesandbombs / waveLines.pde
Created August 16, 2017 23:43
wave lines
// gif by davey. godspeed
int[][] result;
float t, c;
float ease(float p) {
return 3*p*p - 2*p*p*p;
}
float ease(float p, float g) {
@beesandbombs
beesandbombs / polygonWalkers.pde
Created July 26, 2017 23:30
polygon walkers
// by dave @beesandbombs
int[][] result;
float t, c;
float ease(float p) {
return 3*p*p - 2*p*p*p;
}
float ease(float p, float g) {
@baweaver
baweaver / rails_booklist.md
Last active September 15, 2022 17:53
Rails Booklist

Rails Book List

A list of Rails books and their applications. Free books are tagged with (F)

Have a suggestion? Leave a comment. There are still books I need to read on the subject so some may not show up in this list yet.

Learning Rails

Your first steps into Rails

@fitnr
fitnr / bookmarklet-replaceTextWithFontSize
Last active January 9, 2017 11:31
Replaces all text on a page with the font size. Useful for debugging the page or just replacing wretched content with something less awful.
javascript:%28function%28%29%7Bvar%20n,walk=document.createTreeWalker%28document.body,NodeFilter.SHOW_TEXT,null,0%29%3Bwhile%28n=walk.nextNode%28%29%29%7Bif(n.textContent.trim%28%29.length>0)n.textContent=window.getComputedStyle(n.parentNode).fontSize%3B%7D%7D%29%28%29
@aspencer8111
aspencer8111 / js_functions.md
Last active October 27, 2018 19:43
Javascript functions explained

Learn your JS functions and arguments

A function has a few parts:

  1. The declaration: function ...
  2. The name: function foo...
  3. The arguments: function foo(arguments go here!)...
  4. The code to be executed: (inside the { } brackets):
function foo() { 
// - Draw a series of points in a straight line and draw a line between them;
// - Make a copy of the preceding series of points, slightly mutate their x/y coordinates, and draw a line between them;
// - Repeat
ArrayList<PVector> points;
int pTotal = 300; // The total number of points per line
float w; // This will be used to define the drawing area
// Noise variables
float offsetX = 0;
@bendc
bendc / easing.css
Created September 23, 2016 04:12
Easing CSS variables
:root {
--ease-in-quad: cubic-bezier(.55, .085, .68, .53);
--ease-in-cubic: cubic-bezier(.550, .055, .675, .19);
--ease-in-quart: cubic-bezier(.895, .03, .685, .22);
--ease-in-quint: cubic-bezier(.755, .05, .855, .06);
--ease-in-expo: cubic-bezier(.95, .05, .795, .035);
--ease-in-circ: cubic-bezier(.6, .04, .98, .335);
--ease-out-quad: cubic-bezier(.25, .46, .45, .94);
--ease-out-cubic: cubic-bezier(.215, .61, .355, 1);
@michaelvillar
michaelvillar / .zshrc
Created August 25, 2016 00:19
Get a OS X Notification when a slow CLI command finishes
# Based on http://frantic.im/notify-on-completion and https://gist.github.com/jamesmacaulay/860763
# Notify on completion
function f_notifyme {
LAST_EXIT_CODE=$?
CMD=$(fc -ln -1)
terminal-notifier -title "$CMD" -message "Status code: $LAST_EXIT_CODE" &
}
save_preexec_time() {
export PREEXEC_CMD="$(history | tail -1 | sed 's/ *[0-9]* *//')"
@bendc
bendc / interval.js
Created August 18, 2016 20:28
Better setInterval
const interval = (callback, delay) => {
const tick = now => {
if (now - start >= delay) {
start = now;
callback();
}
requestAnimationFrame(tick);
};
let start = performance.now();
requestAnimationFrame(tick);
@bendc
bendc / display-fade.html
Created June 22, 2016 03:01
Transitioning the opacity of a hidden element
<!doctype html>
<meta charset="utf-8">
<title>Example</title>
<style>
div {
width: 100px;
height: 100px;
background: black;
animation-duration: .5s;