Skip to content

Instantly share code, notes, and snippets.

@jrf0110
jrf0110 / LICENSE.txt
Created May 24, 2011 17:57 — forked from 140bytes/LICENSE.txt
140byt.es -- Click ↑↑ fork ↑↑ to play!
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@jrf0110
jrf0110 / LICENSE.txt
Created May 24, 2011 17:59 — forked from 140bytes/LICENSE.txt
140byt.es -- Click ↑↑ fork ↑↑ to play!
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@jrf0110
jrf0110 / class.js
Created April 23, 2012 22:05
Simple extendable classes in javascript
/* This WAS a two-line function until an awesome reddit user pointed out my logical flaw. Now It's a 5-line function :( */
var Class = function(d){
d.constructor.extend = function(def){
for (var k in d) if (!def.hasOwnProperty(k)) def[k] = d[k];
return Class(def);
};
return (d.constructor.prototype = d).constructor;
};
@jrf0110
jrf0110 / api-one.js
Created June 21, 2012 21:29
Type Checking with leFunc
// Call api.one with any argument combo
api.one = leFunc({
"String, Function":
function(id , callback){
api.one(new ObjectId(id), {}, callback);
}
, "Object, Function":
function(id , callback){
@jrf0110
jrf0110 / Retinafy.md
Created July 24, 2012 02:47 — forked from nijikokun/Retinafy.md
Retinafy your site, a free book

Retinafy Your Site / Device

By Nijiko Yonskai

=====

I made a book, its one page.

Why Use Larger Images?

Higher resolution, twice the size, more detail, better experience on a device that provides it. There is also that thing where people make the desktop version and go to mobile more often than they do the reverse, why? Because, people like making complicated stuff first.

@jrf0110
jrf0110 / app.js
Created August 8, 2012 03:15
Who says requirejs is ugly?
define(function(require){
var
// Third Party dependencies
jscss = require('jscss')
, domReady = require('domReady')
, PaperBoy = require('paper-boy')
// App Dependencies
, appCss = require('css/css')
, utils = require('utils')
@jrf0110
jrf0110 / gist:3350423
Created August 14, 2012 15:49
Node Resources
http://expressjs.com/
http://nodejs.org/api/
http://blog.nodejs.org/
http://howtonode.org/
http://docs.nodejitsu.com/
http://www.nodebeginner.org/
http://blog.izs.me/
http://tjholowaychuk.com/
https://github.com/visionmedia - Lots of great best practice examples
https://github.com/LearnBoost - Same here
@jrf0110
jrf0110 / gist:3493796
Created August 28, 2012 00:28
Git aliases
[alias]
po = pull origin
co = checkout
ci = commit
rb = rebase
swip = stash save "WIP"
wip = commit -a -m "WIP"
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(magenta)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
@jrf0110
jrf0110 / gist:3802265
Created September 28, 2012 21:52
View Org
var AppView = Backbone.View.extend({
initialize: function(){
this.children = {
header: new Views.Header()
, content: new Views.Content({ model: this.currentPage })
, footer: new Views.Footer()
};
}
, render: function(){
@jrf0110
jrf0110 / app.js
Created September 28, 2012 22:00
Typical app.js
require.config({
hbt: {
extension: 'html'
}
});
define(function(require){
var
domread = require('domReady')
, util = require('utils')