Skip to content

Instantly share code, notes, and snippets.

View jingman's full-sized avatar

Jake Ingman jingman

View GitHub Profile
@jingman
jingman / gist:215c60c8e2dc6e91ea2f
Created November 21, 2014 19:23
Generate a "pure" random color
p = random(3);
c = random(2);
m = random(255);
switch (p) {r = 255; g = 255; b = 255;};
if (p == 0) {
if (c == 0) {g = m; b = 0;} else {g = 0; b = m;}
} else {
if (p == 1) {
@jingman
jingman / Bootstrap-MPU9150.ino
Created September 11, 2014 16:21
Bootstrap Sketch for Yaw Pitch Rollerchair
/**************************************************************************\
* Pinoccio Library *
* https://github.com/Pinoccio/library-pinoccio *
* Copyright (c) 2014, Pinoccio Inc. All rights reserved. *
* ------------------------------------------------------------------------ *
* This program is free software; you can redistribute it and/or modify it *
* under the terms of the MIT License as described in license.txt. *
\**************************************************************************/
#include <SPI.h>
#include <Wire.h>
First, you should go to HQ,
for instructions on just what to do.
Go there in Chrome, for you see,
we'll make do without an I-D-E.
Then you'll want to create a new Troop,
upon which, your Lead Scout will snoop.
Plug your Lead Scout in with the cord,
<?php
// So when I write
$foo = 'bar';
// It will look awesome in my comment? We'll see about that...
// Update: Ha, totally worked!
#position {
.at(@top, @right, @bottom, @left) {
top: @top;
right: @right;
bottom: @bottom;
left: @left;
}
.at(@width, @height, @top, @right, @bottom, @left) {
#position > .at(@top, @right, @bottom, @left);
}
@jingman
jingman / gist:2080287
Created March 18, 2012 19:43
What I Use
ForI Use
Code EditingSublimeText
@jingman
jingman / LESS_CSS_methods.less
Created March 24, 2011 14:21
Some LESS.js methods I use, and some that are just fun.
/* Gives an element the appearance depth by stacking shadows. */
.depth(@c: #ccc) {
@c_d: darken(@c, 40);
@c_l: darken(@c, 20);
@shadow: 0px 1px @c_d,
1px 0px @c_l, 2px 1px @c_l,
1px 2px @c_d,
3px 2px @c_l, 2px 3px @c_d,
4px 3px @c_l, 3px 4px @c_d,
5px 4px @c_l, 4px 5px @c_d,
<?php
/**
* Custom configuration bootsrtap file for ExpressionEngine
*
* Place config.php in your site root
* Add require(realpath(dirname(__FILE__) . '/../../config_bootstrap.php')); to the bottom of system/expressionengine/config/config.php
* Add require(realpath(dirname(__FILE__) . '/../../config_bootstrap.php')); to the bottom of system/expressionengine/config/database.php
* If you have moved your site root you'll need to update the require_once path
*
@jingman
jingman / Tweetie for Mac Filters
Created February 2, 2010 19:53
A list of Tweetie for Mac filters
# Tweetie for Mac filters let you filter out tweets with certain terms.
# Method described in detail here: http://atebits.posterous.com/test-filtering-in-tweetie-for-mac
# Note that you'll have to download the version of Tweetie for Mac linked above.
# Foursquare ("I just unlocked the spam badge on @foursquare!")
defaults write com.atebits.tweetie-mac filterTerms -array-add "on @foursquare\!"
# YouTube ("I just did blah on YouTube")
defaults write com.atebits.tweetie-mac filterTerms -array-add "I favorited a YouTube video" "channel on YouTube" "I rated a YouTube video"