Skip to content

Instantly share code, notes, and snippets.

@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;
}
@paulirish
paulirish / 0readme.md
Created August 22, 2011 05:26
For converting adium logs to decently sexy HTML

adium log export to HTML

this shit is for exporting this weirdass xml out into some sane HTML.

  • run rename.sh to kill the whitespaces in your xml filenames
    • alternatively fix my htmlify.sh to not break on whitespace'd filenames
      • UPDATE: check this comment on a quick fix to avoid this rename script. BOOM! thx @kwef!
  • run htmlify.sh
    • htmlify has a hardcoded destination directory.
  • htmlify also expects the format-html.* files to be up one folder from it.
@chriseppstein
chriseppstein / 0_selector_hacks.scss
Created September 14, 2011 04:27
This gist demonstrates some uses of the new sass feature: Passing content blocks to mixins.
@mixin ie6 { * html & { @content } }
#logo {
background-image: url("/images/logo.png");
@include ie6 { background-image: url("/images/logo.gif"); }
}
@simme
simme / Install_tmux
Created October 19, 2011 07:55
Install and configure tmux on Mac OS X
# First install tmux
brew install tmux
# For mouse support (for switching panes and windows)
# Only needed if you are using Terminal.app (iTerm has mouse support)
Install http://www.culater.net/software/SIMBL/SIMBL.php
Then install https://bitheap.org/mouseterm/
# More on mouse support http://floriancrouzat.net/2010/07/run-tmux-with-mouse-support-in-mac-os-x-terminal-app/
@paulirish
paulirish / rAF.js
Last active June 11, 2024 14:29
requestAnimationFrame polyfill
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel
// MIT license
(function() {
var lastTime = 0;
var vendors = ['ms', 'moz', 'webkit', 'o'];
@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\
@jlong
jlong / uri.js
Created April 20, 2012 13:29
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"