Skip to content

Instantly share code, notes, and snippets.

View chiragchamoli's full-sized avatar
💭
I may be slow to respond.

Chirag Chamoli chiragchamoli

💭
I may be slow to respond.
View GitHub Profile
@numist
numist / irsz.js
Created January 29, 2012 06:58
dynamically resize images to fit viewport (intelligently!)
/*
* Copyright © 2012 by Scott Perry
* Released under the MIT License; its terms are at the end of this file.
*
* This file depends on:
* • jQuery (tested against 1.7.1)
* http://jquery.com/
*
* Basic logic of this file:
* + if irsz_auto is true
@BrendanEich
BrendanEich / minimalist-classes.js
Created November 1, 2011 22:48 — forked from jashkenas/minimalist-classes.js
less minimalism, richer leather
// A response to jashkenas's fine proposal for minimalist JavaScript classes.
// Harmony always stipulated classes as sugar, so indeed we are keeping current
// JavaScript prototype semantics, and classes would only add a syntactic form
// that can desugar to ES5. This is mostly the same assumption that Jeremy
// chose, but I've stipulated ES5 and used a few accepted ES.next extensions.
// Where I part company is on reusing the object literal. It is not the syntax
// most classy programmers expect, coming from other languages. It has annoying
// and alien overhead, namely colons and commas. For JS community members who
@zanshin
zanshin / .zshrc
Created August 12, 2011 19:09
My .zshrc file
# Path to your oh-my-zsh configuration.
export ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
#export ZSH_THEME="robbyrussell"
export ZSH_THEME="zanshin"
@btbytes
btbytes / bestof_edw519.html
Created May 19, 2011 18:49
The best of edw519
<h2>The Best of edw519</h2>
<h2>A Hacker News Top Contributor</h2>
<p>&nbsp;</p>
<h2>by Ed Weissman</h2>
<p><p /><p /><p /></p>
@whit3h4t
whit3h4t / fb share button
Created April 15, 2011 08:33
own share script
<a href="http://www.facebook.com/sharer.php?u=<?php the_permalink();?>&t=<?php the_title(); ?>"><img src="<?php bloginfo('template_url'); ?>/images/icons/facebook.png" alt=""/></a>
@bebraw
bebraw / gameengines.md
Created January 6, 2011 18:07
List of JS game engines. You can find a wikified version at https://github.com/bebraw/jswiki/wiki/Game-Engines. Feel free to modify that. I sync it here every once in a while.

IMPORTANT! Remember to check out the wiki page at https://github.com/bebraw/jswiki/wiki/Game-Engines for the most up to date version. There's also a "notes" column in the table but it simply does not fit there... Check out the raw version to see it.

This table contains primarily HTML5 based game engines and frameworks. You might also want to check out the [[Feature Matrix|Game-Engine-Feature-Matrix]], [[Game Resources]] and [[Scene Graphs]].

Name Size (KB) License Type Unit Tests Docs Repository Notes
Akihabara 453 GPL2, MIT Classic Repro no API github Intended for making classic arcade-style games in JS+HTML5
AllBinary Platform Platform Dependent AllBinary 2D/2.5D/3D n
@mariuz
mariuz / Delicious_Backup.htm
Created December 20, 2010 15:35
Deleted my delicious account (check) , use git for bookmarks (check) imported bookmarks in google chrome check
<!DOCTYPE NETSCAPE-Bookmark-file-1>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<!-- This is an automatically generated file.
It will be read and overwritten.
Do Not Edit! -->
<TITLE>Bookmarks</TITLE>
<H1>Bookmarks</H1>
<DL><p><DT><A HREF="http://blog.curiasolutions.com/2010/11/the-great-web-technology-shootout-%E2%80%93-round-4-pyramid-vs-django-vs-tg-vs-rails-2-3/" ADD_DATE="1292420589" PRIVATE="0" TAGS="rails,python,benchmark,webdev,ruby">The great web technology shootout – Round 4: Pyramid vs ...</A>
<DT><A HREF="http://vimeo.com/17672519" ADD_DATE="1292167054" PRIVATE="0" TAGS="devops">Jacob Kaplan-Moss on DevOps at Boston Django Meetup 2010</A>
<DD>devops = programmer+sysadmin
//
// Regular Expression for URL validation
//
// Author: Diego Perini
// Created: 2010/12/05
// Updated: 2018/09/12
// License: MIT
//
// Copyright (c) 2010-2018 Diego Perini (http://www.iport.it)
//
@isaacs
isaacs / node-and-npm-in-30-seconds.sh
Last active April 14, 2025 11:07
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh
@rmccue
rmccue / gist:250682
Created December 7, 2009 07:15
Normalise SimplePie items to put into a database
<?php
require('simplepie.inc');
$feed = new SimplePie('http://example.com/feed/');
foreach($feed->get_items() as $item) {
$new_item = (object) array(
'hash' => $item->get_id(true),
'timestamp' => $item->get_date('U'),
'title' => $item->get_title(),
'content' => $item->get_content(),