Skip to content

Instantly share code, notes, and snippets.

@developit
developit / example.js
Last active December 25, 2018 22:01
mongoose-resource
import mongooseResource from '../lib/mongoose-resource';
import Foo from '../models/foo'; // a mongoose Model
export default mongooseResource('foo', Foo);
@amjd
amjd / gist:acc5e108bfb2f29f050c
Created June 6, 2014 05:30
List of websites used in Conlectus's WhoAmI - http://tinsnail.neocities.org/
var rawSites = {
'programming': [
'http://blog.codinghorror.com/',
'http://thedailywtf.com/',
'http://www.hanselman.com/blog/',
'http://code.tutsplus.com',
'https://news.ycombinator.com/',
'http://www.reddit.com/r/programming/',
'http://codebetter.com',
'http://android-developers.blogspot.com/',
@danklammer
danklammer / Flat Pinboard v1
Created February 2, 2014 21:16
A simple userstyle for pinboard.in bookmarking site
/* Theme Name: Flat Pinboard */
/* Theme URL: http://tackk.com/flat-pinboard */
/* Version: v1.0 */
/* Created by: Dan Klammer */
/* Broswer: Chrome + Stylish Extension */
html {
-webkit-font-smoothing:antialiased;
height:100%;
}
@d1manson
d1manson / bridged-worker.js
Last active August 31, 2022 16:18
BuildBridgedWorker is a function that makes communication between worker and main thread simple. It also means you can keep all related code in the same file, which is convenient.
/* EXAMPLE:
var workerCode = function(){
"use strict;" //this will become the first line of the worker
CalculateSomething(a,b,c,d){
var v = a+b+c+d; //trivial calculation
main.DisplayResult(v,"hello");
}
@elliottkember
elliottkember / app.js
Last active December 17, 2015 05:09
Ever wanted to repeat parts of your markup while building templates? Do it like this!
$(function(){
$('*[data-repeat]').each(function(){
var n = $(this).data('repeat');
var parent = $(this).parent();
self = $(this);
for (var i = 0; i < n; i++) {
self.after(self.clone());
}
})
});
@malarkey
malarkey / Contract Killer 3.md
Last active May 8, 2024 16:02
The latest version of my ‘killer contract’ for web designers and developers

When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.

Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008

…………………………

@jimbojsb
jimbojsb / gist:1630790
Created January 18, 2012 03:52
Code highlighting for Keynote presentations

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2: