NOTE I now use the conventions detailed in the SUIT framework
Used to provide structural templates.
Pattern
t-template-name
NOTE I now use the conventions detailed in the SUIT framework
Used to provide structural templates.
Pattern
t-template-name
/* | |
* This work is free. You can redistribute it and/or modify it under the | |
* terms of the Do What The Fuck You Want To Public License, Version 2, | |
* as published by Sam Hocevar. See the COPYING file for more details. | |
*/ | |
/* | |
* Easing Functions - inspired from http://gizma.com/easing/ | |
* only considering the t value for the range [0, 1] => [0, 1] | |
*/ | |
EasingFunctions = { |
<ifModule mod_rewrite.c> | |
Options +FollowSymLinks | |
IndexIgnore */* | |
RewriteEngine On | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule (.*) index.html | |
</ifModule> |
# PRIVATE METHODS/PROPERTIES - COFFEESCRIPT | |
# ------------------------------------------------------------------------------ | |
# Simple hack to protect private methods and properties from outside classes, | |
# all props and methods starting with '_' will be unaccessible from outside. | |
class AccessModifiers | |
@for:( scope )-> | |
api = {} |
#!/bin/sh | |
# This shell script is used to bootstrap the app and update external libraries | |
# | |
# ====== IMPORTANT ====== | |
# | |
# it may break application if 3rd party libs aren't backwards compatible | |
# or if libs were edited locally, use with care !!! |
/*########################################################################*/ | |
/*###### using jQuery selector for a fast/cross-browser resolution #######*/ | |
/*########################################################################*/ | |
var totalAreas = 6, // this value is obviously arbitrary | |
winH = $(window).height, // the window height | |
top = $(window).scrollTop(), // the current scroll value | |
maxScroll = $(document).height() - winH, // the maximum scroll value | |
scrollPerc = top/maxScroll, // the current scroll percentage | |
areaPercent = 0; // init variable |
eXtreme Go Horse (XGH) Process | |
Source: http://gohorseprocess.wordpress.com | |
1. I think therefore it's not XGH. | |
In XGH you don't think, you do the first thing that comes to your mind. There's not a second option as the first one is faster. | |
2. There are 3 ways of solving a problem: the right way, the wrong way and the XGH way which is exactly like the wrong one but faster. | |
XGH is faster than any development process you know (see Axiom 14). |
The spec has moved to a repo: https://github.com/defunctzombie/package-browser-field-spec to facilitate collaboration.
### | |
Port of MicroEvent in Coffeescript with some naming modifications | |
and a new 'once' method. | |
Original project: | |
https://github.com/jeromeetienne/microevent.js | |
### | |
class MicroEvent | |
_init:-> @_listn or @_listn = {} | |
_create:(e)-> @_init()[e] or @_init()[e] = [] |
gifify() { | |
if [[ -n "$1" ]]; then | |
if [[ $2 == '--good' ]]; then | |
ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png | |
time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > $1.gif | |
rm out-static*.png | |
else | |
ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif | |
fi | |
else |