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;

by Dale Sande

CSS has had a long and sordid past. A developer never sets out with the goal of making a complete and total mess of things. Their intention is not to build something that is practically illegible, impractical to maintain and is limited in scale. But somehow, this is where many inevitably end up. Luckily, all is not lost. With some simple strategies, organizational methods and out-of-the box tools, we can really help get that junk-drawer inline.

For many of us getting started with Sass, at one time or another have created a junk-drawer of files. For most, this was a rookie mistake, but for others, this is a continuing issue with our architecture and file management techniques. Sass doesn't come with any real rules for file management so developers are pretty much left to their own devices.

Large CSS files and increased complexity

CSS started out with very simple intentions, but as [tableless web design][1.1] began to really take a foothold, our styleshe

/* 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);