Skip to content

Instantly share code, notes, and snippets.

@visnup
visnup / dabblet.css
Created June 19, 2014 00:27 — forked from anonymous/dabblet.css
Untitled
.loading {
border-bottom: 6px solid rgba(0, 0, 0, .1);
border-left: 6px solid rgba(0, 0, 0, .1);
border-right: 6px solid rgba(0, 0, 0, .1);
border-top: 6px solid rgba(0, 0, 0, .4);
border-radius: 100%;
height: 50px;
width: 50px;
animation: rot .6s infinite linear;
}
@visnup
visnup / dabblet.css
Created April 4, 2014 05:03 — forked from LeaVerou/dabblet.css
(C)Leanest CSS spinner ever
/**
* (C)Leanest CSS spinner ever
*/
@keyframes spin {
to { transform: rotate(1turn); }
}
.progress {
position: relative;
@visnup
visnup / -
Last active December 28, 2015 09:19 — forked from huned/-
/\___/\
( .\ /. )
@visnup
visnup / statebird
Created November 2, 2012 18:00 — forked from visnup/statebird
check state bird provisions for availability
#!/bin/sh
# state bird provisions never has a reservation open. I hate having to go to their website to
# check. this checks for me.
curl -s 'http://rez.urbanspoon.com/b/widget/2086?use_calendar=0' | fgrep "'availableDates': []" > /dev/null && echo 'nothing' || (echo 'omg! available reservations!' && open 'http://statebirdsf.com/reservations/')
@visnup
visnup / selection.js
Created August 24, 2012 22:05 — forked from Munawwar/test.html
IE8 equivalent of HTML5/W3C Range object's startContainer,startOffset,endContainer and endOffset properties
(function selectionPolyfill(window, document) {
if (window.getSelection || !document.selection) return;
// convert an IE TextRange to a W3C one
function convert(range, startOrEnd) {
var point = range.duplicate()
, result = {};
// point is either the start or end of the range
point.collapse(startOrEnd);
#!/bin/sh
# on osx lion, this is a great way to listen to this in the background. make sure to download and
# install sangeeta and tom and karen in system preferences. feel free to change the voices to your
# suiting, but sangeeta is a fave of mine for almost everything.
say -v Sangeeta "hey"
say -v Sangeeta "I'm sorry"
say -v Sangeeta "how would you like me to describe backbone?"
say -v Sangeeta "let's work this out for once and for all :)"
@visnup
visnup / top-domains.js
Created January 26, 2012 19:57 — forked from gerad/top-domains.js
query time spent by domain using tractor
var map = function() {
var domain = this.info.url.match(/^https?:\/\/([^\/]*)/)[1];
emit(domain, { duration: this.duration });
};
var reduce = function(key, values) {
var result = { duration: 0 };
values.forEach(function(value) {
result.duration += value.duration
});
@visnup
visnup / out.css
Created February 25, 2011 06:21 — forked from tj/out.css
header nav {
-webkit-box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.4);
-moz-box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.4);
box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.4); }
html.ie8 header nav, html.ie7 header nav, html.ie6 header nav {
border: solid 1px #cccccc; }
require "spec_helper"
class ValInheritanceParent
include Mongoid::Document
field :parent_value
embeds_many :val_inheritance_embed
references_many :val_inheritance_ref
@visnup
visnup / README.js
Created November 15, 2010 21:36 — forked from igrigorik/webapp.rb
node.js version inspired by igrigorik's any ruby object, as a webapp! 'cause we can too.
#!/usr/bin/env node
var http = require('http')
, webapp = require('webapp');
http.createServer(webapp.bind([])).listen(8000);
// ^^^^^^^^^^^^^^^
// | (x)
// ROFLSCALE DEQUE ---/