Skip to content

Instantly share code, notes, and snippets.

View blissdev's full-sized avatar

Jordan Arentsen blissdev

View GitHub Profile
@blissdev
blissdev / dabblet.css
Created April 30, 2013 05:28
Circular Tooltip (SO)
/**
* Circular Tooltip (SO)
* http://stackoverflow.com/q/13132864/1397351
*/
* { margin: 0; padding: 0; }
body {
overflow: hidden;
background: url(http://theearlcarlson.com/experiments/amTooltip/img/bg.jpg);
}
/* generic styles for button & circular menu */
function valueInSet(value, set) {
var deepMatch = function(v){ return v.id == value; };
var shallowMatch = function(v) { return v == value; };
return _.any(set, set[0].id ? deepMatch : shallowMatch);
}
-- be quiet during load of this file
\set QUIET
\encoding unicode
\set PROMPT1 '%[%033[33;1m%]%x%[%033[0m%]%[%033[1m%]%/%[%033[0m%]%R%# '
\set PROMPT2 ''
\pset null ¤
\pset pager off
\timing
\pset format wrapped
@blissdev
blissdev / copy.sh
Created March 17, 2013 04:08
Shell script to copy a directory to another directory.
#!/bin/sh
yes | cp -rf /origin/* /destination
var longstring = "blah blah blah";
longstring += "more blah blah bloh";
longstring += "more blah blah bloh";
longstring += "more blah blah bloh";
$sortByPriority = function($app1, $app2) use ($resident) {
$priority1 = $app1->getResidentApplication($resident)->priority();
$priority2 = $app2->getResidentApplication($resident)->priority();
if(is_null($priority1) && is_null($priority2)) {
return 0;
}
var_dump($priority1); var_dump($priority2);
exit();
if(is_null($priority1)) return -1;
if(is_null($priority2)) return 1;
/* default? ref: executeventures.co */
transition-timing-function: cubic-bezier(0.25, 0.1, 0.25, 1);
var animationHelpers = {
determineTransition: function() {
// technique from:
// https://github.com/dmotz/oriDomi/blob/master/oridomi.js#L80
// @TODO cache value so it doesn't keep getting looked up
var prefixList, testEl, supportedProp;
prefixList = ['webkit', 'Moz', 'O', 'ms', 'Khtml'];
testEl = document.createElement('div');
$toArray = function($record) {
return $record->toArray();
}
$dynamicCollectionData = array_map($toArray, $dynamicCollectionData);