Skip to content

Instantly share code, notes, and snippets.

@remy
remy / gist:349069
Created March 30, 2010 12:46
Early version of XUI native animations with drop back on to Emile/timer based
(function ($, window, undefined) {
var m = document.createElement('i'),
m_style = m.style,
// TODO support other browsers easings - based on Safari's easing options and ported to Emile easing.
stanardEasing = {
'ease-in-out' : function(pos){if((pos/=0.5)<1){return 0.5*Math.pow(pos,4);}return -0.5*((pos-=2)*Math.pow(pos,3)-2);},
'ease-in' : function(pos){return Math.pow(pos,4);},
'ease-out' : function(pos){return Math.pow(pos,0.25);},
'linear': function (i) {return i;}
@chriseppstein
chriseppstein / compass.rb
Created December 18, 2010 07:41
In compass v0.11 you can watch arbitrary files and react to them yourself. Just add one or more watch commands to your configuration file:
watch "images/*" do |base, relative|
puts "File size of #{relative} is: #{File.size(File.join(base, relative))}"
end
@paraboul
paraboul / gist:866345
Created March 11, 2011 18:40
Add latency to localhost
#!/bin/bash
# Copyright 2010 Eric Ryan Harrison <me@ericharrison.info>
# Inspired by:
# http://daniel.haxx.se/blog/2010/12/14/add-latency-to-localhost/
if [ -n "$1" ]
then
if [ "$1" = "off" ]
then
tc qdisc del dev lo root
@Akkuma
Akkuma / jquery.innershiv.js
Created March 25, 2011 20:15
An integrated innershiv
// jQuery patch for HTML5 elements using innerShiv by https://github.com/andy-clusta
(function ($) {
var init = jQuery.fn.init; rootjQuery = jQuery(document);
// http://jdbartlett.github.com/innershiv | WTFPL License
var innerShiv = (function() {
var div, frag,
inaTable = /^<(tbody|tr|td|col|colgroup|thead|tfoot)/i,
remptyTag = /(<([\w:]+)[^>]*?)\/>/g,
rselfClosing = /^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,
@doctyper
doctyper / _loading-indicator.scss
Created June 26, 2011 18:42
Jordan Dobson's Loading Indicator
// Jordan Dobson's Loading Indicator
// Development, design, HTML and CSS by Jordan Dobson
// http://jordandobson.tumblr.com/post/905003090/resizable-animated-loading-indicator
// Loader width/height
$spin-size: 40px !default;
// Pick a color and set the alpha value to 1
$spin-color: #fff !default;
@rwaldron
rwaldron / fn arrEach and objEach
Created July 25, 2011 16:14 — forked from 1Marc/fn arrEach and objEach
"But $.each is slow!" ..use fn arrEach and objEach then!!
// arrEach and objEach plugins
// code under MIT license by Marc Grabanski http://marcgrabanski.com
// jsperf tests: http://jsperf.com/each-vs-fn-arreach-and-objeach
$.arrEach = function(arr, cb){
for (var i = 0, item; item = arr[i]; ++i) {
cb.apply(item, [i, item]);
}
return arr;
}
@gigafied
gigafied / gist:1766037
Created February 8, 2012 06:24
RED Boilerplate Features + Requirements

####Requirements:

  • Scalable module system. Ability to easily create and maintain modules/components for use in projects.

  • Base boilerplate simplified & stripped down to bare essentials.

  • JavaScript based. This gives any frontend dev the ability to contribute easily if they so desire.

  • Dependency management without kludging up project repos. Config files and whatnot should be checked into the repo, actual node modules or other dependencies, should not.

@adamesque
adamesque / 2012.txjs.sh
Created March 9, 2012 19:13
Notify folks as soon as the 2012 txjs site is updated.
#!/bin/bash
CHECK=`/usr/bin/curl --write-out %{size_download} --silent --output /dev/null 2012.texasjavascript.com`
cd ~
if [ $CHECK != 123 ] && [ ! -e '.2012.txjs.sent' ]
then
/usr/bin/curl -s -k --user api:key-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \
https://api.mailgun.net/v2/xxxxxxxxxxx.mailgun.org/messages \
-F from=' <txjsbot@xxxxxxxxxxx.mailgun.org>' \
-F to=xx@xxxxxxxxxxx.com\
@doctyper
doctyper / gist:3718320
Created September 13, 2012 22:50
Uninstall all NPM modules
npm list -g | awk '/@/ {print $2}' | grep '@' | awk -F@ '{print $1}' | xargs npm -g uninstall
@timrwood
timrwood / steps.md
Last active December 14, 2015 07:49
Grunt upgrade steps

Switch to the new grunt CLI

npm uninstall -g grunt
npm install -g grunt-cli

Add the correct grunt version to your package.json