Skip to content

Instantly share code, notes, and snippets.

View hemanth's full-sized avatar
🐜
🧘‍♂️

Hemanth HM hemanth

🐜
🧘‍♂️
View GitHub Profile
@codeschool-courses
codeschool-courses / challenge-1-7.js
Created March 7, 2012 21:25
Anatomy of Backbone 1-7
var Appointment = Backbone.Model.extend({});
var appointment = new Appointment();
appointment.set('title', 'My knee hurts');
var AppointmentView = Backbone.View.extend({
render: function(){
$(this.el).html('<li>' + this.model.get('title') + '</li>');
}
});
var appointmentView = new AppointmentView({model: appointment});
@davatron5000
davatron5000 / gist:2254924
Created March 30, 2012 20:57
Static Site Generators

Backstory: I decided to crowdsource static site generator recommendations, so the following are actual real world suggested-to-me results. I then took those and sorted them by language/server and, just for a decent relative metric, their Github Watcher count. If you want a heap of other projects (including other languages like Haskell and Python) Nanoc has the mother of all site generator lists. If you recommend another one, by all means add a comment.

Ruby

require 'watir-webdriver'
browser = Watir::Browser.new :ie
p browser.driver.capabilities
File.open("test.html", "w") { |file| file << DATA.read }
browser.goto "file://#{File.expand_path 'test.html'}"
browser.button(:name => "save").click
@paulmillr
paulmillr / active.md
Last active May 15, 2025 11:20
Most active GitHub users (by contributions). https://paulmillr.com

Most active GitHub users (git.io/top)

The list would not be updated for now. Don't write comments.

The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at GitHub.com from Wed, 21 Sep 2022 till Thu, 21 Sep 2023.

Because of GitHub search limitations, only 1000 first users according to amount of followers are included. If you are not in the list you don't have enough followers. See raw data and source code. Algorithm in pseudocode:

githubUsers
@hemanth
hemanth / webdev.md
Created June 9, 2012 03:00 — forked from dideler/bootstrapping.md
Bootstrapping
@hemanth
hemanth / data-markdown.user.js
Created June 9, 2012 05:42 — forked from paulirish/data-markdown.user.js
*[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.
@hemanth
hemanth / Object.protectProperty.js
Created June 17, 2012 05:33
Protected properties using Name objects
// The following depends on a quirk in V8 to work.
// Depends on Map and WeakMap, which can be:
// * turned on in Chrome's about:flags
// * enabled in node using --harmony_collections or --harmony
// * shimmed via https://github.com/Benvie/ES6-Harmony-Collections-Shim
// Provides:
// * Name
// * Object.protectProperty
@hemanth
hemanth / ebooks.md
Created July 24, 2012 13:56 — forked from roidrage/ebooks.md
Self-published and awesome
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = [email protected]:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this: