Skip to content

Instantly share code, notes, and snippets.

@staltz
staltz / introrx.md
Last active May 10, 2024 12:08
The introduction to Reactive Programming you've been missing
<template name="ForgotPassword">
<form action="/forgot" id="forgotPasswordForm" method="post">
<input id="forgotPasswordEmail" type="text" name="email" placeholder="Email Address">
<input class="btn-submit" type="submit" value="Send">
</form>
<!-- end #forgot-password-form -->
</template>
@dergachev
dergachev / README.md
Created October 10, 2012 16:49
Vagrant tutorial

Vagrant Setup

This tutorial guides you through creating your first Vagrant project.

We start with a generic Ubuntu VM, and use the Chef provisioning tool to:

  • install packages for vim, git
  • create user accounts, as specified in included JSON config files
  • install specified user dotfiles (.bashrc, .vimrc, etc) from a git repository

Afterwards, we'll see how easy it is to package our newly provisioned VM

@ddesilva
ddesilva / youtube-helper.js
Created July 9, 2012 23:22
Require.js Module for the YouTube Iframe API
define(["require", "exports"], function (require, exports) {
exports.YouTubeHelper = function (settings) {
// MEMBERS & DEFAULTS #################################################################################################################################################
var documentRef;
var originURL = ""; // for cross site checks
var targetContainer;
var target;
var parentContainer; // used for adding popups back into the original spot
@jonnyreeves
jonnyreeves / index.html
Created April 23, 2012 21:38
JavaScript Class Structure using requireJS. The following code shows you how to create a Class definition in one JavaScript file and then import it for use in another; coming from an ActionScript 3 background this (and some of JavaScript specific traits)
<!DOCTYPE html>
<html>
<head>
<script data-main="usage" src="http://requirejs.org/docs/release/1.0.8/comments/require.js"></script>
</head>
<body>
<p>Check your JavaScript console for output!</p>
</body>
</head>
@scopevale
scopevale / fiddle.css
Created January 23, 2012 14:41
jsFiddle demo - Table Sort (vanilla JS)
table {
border: solid 1px #fc0;
border-collapse: collapse;
}
table caption {
font-weight: bold;
font-size: 125%;
text-transform: uppercase;
}
@mfkp
mfkp / index.html
Created December 17, 2011 01:39
mailchimp ajax signup form example
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="jquery.ketchup.all.min.js" type="text/javascript"></script>
</head>
<body>
<div id="email">
<span>Enter your email to sign up</span>
<form action="/subscribe.php" id="invite" method="POST">
@paulirish
paulirish / data-markdown.user.js
Last active February 6, 2024 10:41
*[data-markdown] - use markdown, sometimes, in your HTML
// ==UserScript==
// @name Use Markdown, sometimes, in your HTML.
// @author Paul Irish <http://paulirish.com/>
// @link http://git.io/data-markdown
// @match *
// ==/UserScript==
// If you're not using this as a userscript just delete from this line up. It's cool, homey.
@roidrage
roidrage / oauth.coffee
Created May 23, 2011 08:21
Example of using Express and node-oauth to do OAuth with Twitter
express = require "express"
sys = require "sys"
util = require "util"
oauth = require "oauth"
fs = require "fs"
app = module.exports = express.createServer()
app.configure('development', () ->
app.use(express.errorHandler({ dumpExceptions: true, showStack: true }))
@jeresig
jeresig / .vimrc
Created May 4, 2011 16:46
VIM Config
au BufRead,BufNewFile jquery.*.js set ft=javascript syntax=jquery
set nocompatible
set autoindent
set tabstop=2
set showmatch
set vb t_vb=
set ruler
set nohls
set incsearch
syntax on