Skip to content

Instantly share code, notes, and snippets.

@nimbupani
nimbupani / yaml.txt
Created December 29, 2011 23:00 — forked from anonymous/yaml.txt
a really useless fucking yaml cheat sheet
Collection indicators:
'? ' : Key indicator.
': ' : Value indicator.
'- ' : Nested series entry indicator.
', ' : Separate in-line branch entries.
'[]' : Surround in-line series branch.
'{}' : Surround in-line keyed branch.
Scalar indicators:
'''' : Surround in-line unescaped scalar ('' escaped ').
'"' : Surround in-line escaped scalar (see escape codes below).
(function() { console.log('hello'); })();
@nimbupani
nimbupani / cat.js
Created December 5, 2011 00:54 — forked from padolsey/cat.js
Improving Jeremy Keith's CAT news example from http://24ways.org/2011/conditional-loading-for-responsive-designs
var cat = {};
/**
* cat.NewsBox
* Retrieves news from Google
*/
cat.NewsBox = (function(){
function NewsBox(searchTerm, injectFn) {
this.searchTerm = searchTerm;
@nimbupani
nimbupani / index.html
Created December 2, 2011 05:00
Showing latest post on home page with Jekyll
---
layout: default
---
<div class="blog-index">
{% assign post = site.posts.first %}
{% assign content = post.content %}
{% include post_detail.html %}
</div>
@nimbupani
nimbupani / archives.html
Created December 2, 2011 02:15
Octopress archives with pagination
<div class="blog-archives">
{% for post in paginator.posts %}
{% assign content = post.content %}
{% capture this_year %}{{ post.date | date: "%Y" }}{% endcapture %}
{% unless year == this_year %}
{% assign year = this_year %}
<h2>{{ year }}</h2>
{% endunless %}
<article>
{% include archive_post.html %}
@nimbupani
nimbupani / HTML language
Created November 22, 2011 17:00 — forked from kornelski/HTML language
TextMate HTML language tweaked to support unquoted attributes
{ scopeName = 'text.html.basic';
firstLineMatch = '<!DOCTYPE|doctype<(?i:html)|<\?(?i:php)';
fileTypes = ( 'html', 'htm', 'shtml', 'xhtml', 'phtml', 'php', 'inc', 'tmpl', 'tpl', 'ctp' );
foldingStartMarker = '(?x)
(<(?i:head|body|table|thead|tbody|tfoot|tr|div|select|fieldset|style|script|ul|ol|li|form|dl|section|article|header|footer|nav|aside)\b.*?>
|<!--(?!.*--\s*>)
|^<!--\ \#tminclude\ (?>.*?-->)$
|<\?(?:php)?.*\b(if|for(each)?|while)\b.+:
|\{\{?(if|foreach|capture|literal|foreach|php|section|strip)
|\{\s*($|\?>\s*$|//|/\*(.*\*/\s*$|(?!.*?\*/)))
@nimbupani
nimbupani / gist-clone.js
Created September 30, 2011 17:59 — forked from tbranyen/gist-clone.js
clone all gists
#!/usr/bin/env node
var request = require("request");
var exec = require("child_process").exec;
if (process.argv.length < 3) {
console.log("Missing username argument");
}
var username = process.argv[2];
@nimbupani
nimbupani / style.css
Created August 25, 2011 17:21
Style for whatwg blog
/*
Theme Name: org.whatwg.awesome
Theme URI: http://www.whatwg.org/
Description: Super awesome WHATWG blog theme.
Version: 5.0
Author: Ben (with modifications by Anne, Divya)
Author URI: http://projectcerbera.com/
*/
/*
@nimbupani
nimbupani / draw-svg.js
Created June 7, 2011 20:33 — forked from johan/draw-svg.js
Draw an SVG bit by bit
var steps = 0 // steps drawn on the current element, so far
, info = document.getElementById('next_step')
, svgs = [].slice.call(document.getElementsByTagName('svg'))
, svg, walker, current;
function lexSVGPath(d) {
function command(seg) {
var cmd = seg.match(/[a-z]/i), arg, cnt;
if (cmd) {
cmd = cmd[0]; // which subcommand
#!/bin/bash
#
# Copyright 2011, Tim Branyen @tbranyen <tim@tabdeveloper.com>
# Dual licensed under the MIT and GPL licenses.
#
# Automatically clone single or multiple repos into a folder,
# great for setting up a git projects folder.
#
# Install: curl http://t.no.de/gist/github.sh | sh
#