Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View meritt's full-sized avatar
🎯
Focusing

Alexey Simonenko meritt

🎯
Focusing
View GitHub Profile
@paulirish
paulirish / bling.js
Last active April 20, 2024 17:39
bling dot js
/* bling.js */
window.$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn);
}
NodeList.prototype.__proto__ = Array.prototype;
@bhaberer
bhaberer / submodule_strategy.rb
Last active January 29, 2019 20:13 — forked from stevenscg/submodule_strategy.rb
Capistrano 3.1.x Strategy to deploy git projects with submodules.
# Usage:
# 1. Drop this file into lib/capistrano/submodule_strategy.rb
# 2. Add the following to your Capfile:
# require 'capistrano/git'
# require './lib/capistrano/submodule_strategy'
# 3. Add the following to your config/deploy.rb
# set :git_strategy, SubmoduleStrategy
module SubmoduleStrategy
# do all the things a normal capistrano git session would do
@rauchg
rauchg / ms.md
Created December 21, 2011 00:25
Milliseconds conversion utility.
@ded
ded / app.js
Created October 21, 2011 23:14
Rails-like routes for Express
var express = require('express')
, app = express.createServer()
require('./config/routes').initialize(app)
@mrdoob
mrdoob / RequestAnimationFrame.js
Created February 22, 2011 14:50
Provides requestAnimationFrame in a cross browser way.
/**
* Provides requestAnimationFrame in a cross browser way.
* @author paulirish / http://paulirish.com/
*/
if ( !window.requestAnimationFrame ) {
window.requestAnimationFrame = ( function() {
return window.webkitRequestAnimationFrame ||
window.onload = function () {
if (! document.querySelectorAll) { // Quick & Dirty way to tell the good browsers from the bad ones.
alert("Please upgrade your browser to view this site.");
}
};
@remy
remy / gist:330318
Created March 12, 2010 13:59
autofocus and placeholder support
/**
* Add this script to the end of your document that use <input autofocus type="text" />
* or <input type="text" placeholder="username" /> and it'll plug support for browser
* without these attributes
* Minified version at the bottom
*/
(function () {
function each(list, fn) {
var l = list.length;