Skip to content

Instantly share code, notes, and snippets.

View abhoopathy's full-sized avatar

Aneesh Bhoopathy abhoopathy

View GitHub Profile
@abhoopathy
abhoopathy / wpfs.md
Created September 7, 2022 17:40
WPFS

West Philadelphia Film Society - Draft Bylaws

Article 1. Organization

The West Philadelphia Film Society (WPFS) shall exist for the purpose of watching movies. The society shall maintain a list of movies to watch and furnish the general enjoyment of all members.

Article 2. Membership

There are no official members of this society - a member is merely whoever shows up to a given meeting of WPFS. A meeting of WPFS requires a quorum of no fewer than 3 people (or a combination of no fewer than 2 people AND no fewer than 2 cats. All present at a meeting are considered de facto members.

Article 3. The List & Meetings

Section A. The List

// Duplicate Artboard Below (alt ↓)
current_selection = selection[0];
if (current_selection.className() == "MSArtboardGroup") {
var parent = current_selection;
} else {
var parent = [current_selection parentGroup];
}
@abhoopathy
abhoopathy / 0_reuse_code.js
Created August 31, 2014 03:52
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
module.exports = (grunt) ->
# Config...
grunt.initConfig
watch:
options:
livereload: true
html:
@abhoopathy
abhoopathy / backbone-tracker.coffee
Last active December 26, 2015 06:19
Easily, declaratively, track backbone events.
define [
'underscore'
'backbone'
], (
_
Backbone
) ->
oldDelegateEvents = Backbone.View.prototype.delegateEvents
@abhoopathy
abhoopathy / wireframe.styl
Created June 15, 2013 01:32
Mixins for quick browser prototyping in greyscale. Each mixin accepts maps values 1-10 to greyscale values from white to black, which is better than fumbling for colors, memorizing hex, or using lighten/darken mixins also helps you remember what needs changing later.
/*
* https://gist.github.com/abhoopathy/5786400
*/
wireframe-bg($x)
$val = (255 - ($x*255 / 10))
background-color rgb($val,$val,$val)
wireframe-txt($x)
$val = (255 - ($x*255 / 10))
define [ 'jquery', 'underscore', 'backbone',
'jade!prototypes/prototype1',
], ($, _, Backbone, Template) ->
Prototype1View = Backbone.View.extend
el: $('<div id="prototype1"></div>')
initialize: () ->
/*
* Person class
*/
function Person(name) {
this.name = name;
this.hi = function() {
console.log(this.name + " says hi!");
};
console.log('made a person');
@abhoopathy
abhoopathy / vcenter.less
Created July 25, 2012 18:33
Less mixin for v-centering
/* A less mixin for vertical centering
* Consider a parent div with { height: 70px, position: relative }
*
* Case 1: Text div with no height
* .textdiv {
* .v-center(70px, text) //where 70px is parent div height
* }
*
* Case 2: Div with it's own height (uses absolute positioning)
* .nontextdiv {