Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Addy Osmani addyosmani

🎯
Focusing
Block or report user

Report or block addyosmani

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@mklabs
mklabs / Gruntfile.js
Last active Dec 10, 2015
A simple example of using yeoman on an express app
View Gruntfile.js
module.exports = function(grunt) {
function noop() {}
grunt.initConfig({
watch: {
reload: {
files: ['public/**', 'views/**'],
tasks: 'reload'
}
@tbranyen
tbranyen / backbone.cacheit.js
Created Oct 25, 2012
Cache Backbone Model and Collection fetch calls with a deferred, simple and intuitive.
View backbone.cacheit.js
/*!
* backbone.cacheit.js v0.1.0
* Copyright 2012, Tim Branyen (@tbranyen)
* backbone.cacheit.js may be freely distributed under the MIT license.
*/
(function(window) {
"use strict";
// Localize global dependency references.
@pete-otaqui
pete-otaqui / css-onload.js
Created Oct 18, 2012
Load External Domain CSS, and get a Callback in IE7, IE8, IE9, FF, Chrome & Safari
View css-onload.js
function cssLoad(url, callback) {
var promise,
resolutions = [],
rejections = [],
resolved = false,
rejected = false,
count, id;
View backbone-tutorial.md

Backbone.js and yeoman

description

this is a list tutorials for building web application using backbone.js and yeoman. We are building a Photo Gallery JS App from Backbone Fundamentals

Requirements

@afabbro
afabbro / webkit-pseudo-elements.md
Created Sep 21, 2012
Webkit Pseudo-Element Selectors (Shadow DOM Elements)
View webkit-pseudo-elements.md

An ongoing project to catalogue all of these sneaky, hidden, bleeding edge selectors as I prepare my JSConf EU 2012 talk.

Everything is broken up by tag, but within each the selectors aren't particularly ordered.

I have not tested/verified all of these. Have I missed some or got it wrong? Let me know. - A

A friendly reminder that you may need to set this property on your target/selected element to get the styling results you want:

-webkit-appearance:none;

@zegilooo
zegilooo / backbone.localCache.js
Created Jul 23, 2012 — forked from lukecanvin/backbone.localCache.js
Online/offline syncing for Backbone
View backbone.localCache.js
Backbone.serverSync = Backbone.sync;
Backbone.pingUrl = '/Ping';
Backbone.localID = function() {
var localID = (localStorage.localID ? parseInt(localStorage.localID) : 0);
localID++;
localStorage.localID = localID.toString()
return -localID;
}
@sindresorhus
sindresorhus / LICENSE.txt
Created Jun 4, 2012 — forked from 140bytes/LICENSE.txt
Photo Booth (140byt.es)
View LICENSE.txt
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2012 Sindre Sorhus <http://sindresorhus.com>
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
View gist:2613483
maria.SetModel.subclass(checkit, 'TodosModel', {
methods: {
getDone: function() {
return this.filter(function(todo) {
return todo.isDone();
});
},
getUndone: function() {
return this.filter(function(todo) {
return !todo.isDone();
@piatra
piatra / index.html
Created Apr 29, 2012
Record stream from getUserMedia() stream
View index.html
<!DOCTYPE HTML>
<html>
<head>
<title>Video recording demo</title>
<link rel="stylesheet" type="text/css" href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css">
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div class="container">
@lukehoban
lukehoban / gist:2246758
Created Mar 30, 2012
ES6 module loader API polyfill experiment
View gist:2246758
(function (global) {
// TODO: Delegate to parent loader in various places
// TODO: Canonicalization
// TODO: Can we do better for 'eval'?
/// Module loader constructor
function Loader(parent, options) {
// Initialization of loader state from options
You can’t perform that action at this time.