Skip to content

Instantly share code, notes, and snippets.

View richardegil's full-sized avatar

Richard Gil richardegil

View GitHub Profile
import processing.serial.*;
import cc.arduino.*;
Arduino arduino;
int led = 12;
int button = 2;
int value = 0;
void setup() {
@brendandawes
brendandawes / Ben Folds Five Poster - Cityscape Generator.pde
Last active December 11, 2015 21:48
Processing source code that was used to generate the little cityscapes for my Ben Folds Five poster.
// Ben Folds Five Poster - Cityscape Generator by Brendan Dawes
// http://brendandawes.com/projects/benfoldsfive/
// Requires library from http://toxiclibs.org
import toxi.color.*;
import toxi.util.datatypes.*;
import processing.pdf.*;
final color BACKGROUND_COLOR = color(240);
void setup() {
size(400,400);
}
void draw() {
float percent = map(mouseX,0,width,0,1);
background(0);
@tammyhart
tammyhart / tooltip.js
Last active December 27, 2015 19:39
Super easy tooltips. example html: <a href="#" class="tooltip" title="title here">Link Text</a> In CSS, set .tooltip to relative postion, and .title to absolute position, with whatever styling you want such as background and padding.
function onHoverToggleTooltip( e ) {
var $this = $( this ),
title = $this.attr( 'title' ),
type = e.type,
offset = $this.offset(),
xOffset = e.pageX - offset.left + 10,
yOffset = e.pageY - offset.top + 30;
if( type == 'mouseenter' ) {
$this.data( 'tipText', title ).removeAttr( 'title' );
@sbine
sbine / Main.sublime-menu
Created November 14, 2012 17:54
Custom 3-pane Sublime Text window layouts
[{
"id": "view",
"children": [{
"id": "layout",
"children": [
{
"command": "set_layout",
"caption" : "Custom: 3 Pane (2T 1B)",
"mnemonic": "C",
"args": {
@shiffman
shiffman / recordinglist.md
Last active September 13, 2019 15:53
A list of ideas for #CodingRainbow Video topics: https://www.youtube.com/user/shiffman
anonymous
anonymous / sphere.pde
Created May 15, 2017 23:58
sphere worms
// by davey aka bees & bombs :)
int[][] result;
float t, c;
float ease(float p) {
return 3*p*p - 2*p*p*p;
}
float ease(float p, float g) {
/* The Grid ---------------------- */
.lt-ie9 .row { width: 940px; max-width: 100%; min-width: 768px; margin: 0 auto; }
.lt-ie9 .row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; }
.lt-ie9 .row.large-collapse .column,
.lt-ie9 .row.large-collapse .columns { padding: 0; }
.lt-ie9 .row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; }
.lt-ie9 .row .row.large-collapse { margin: 0; }
.lt-ie9 .column, .lt-ie9 .columns { float: left; min-height: 1px; padding: 0 15px; position: relative; }
.lt-ie9 .column.large-centered, .columns.large-centered { float: none; margin: 0 auto; }
@goldsky
goldsky / sticky-footer.css
Last active October 27, 2021 02:50
Sticky footer using CSS's display: table, inspired by: http://pixelsvsbytes.com/blog/2012/02/this-css-layout-grid-is-no-holy-grail/
@JeffreyWay
JeffreyWay / .bash_profile
Created May 8, 2013 18:02
Laravel aliases
# laravel new-app
alias laravel="git clone -o laravel -b develop https://github.com/laravel/laravel.git"
alias artisan="php artisan"
alias migrate="php artisan migrate"
alias serve="php artisan serve"
alias dump="php artisan dump"
alias t="phpunit"
# Generators Package