Skip to content

Instantly share code, notes, and snippets.

diff --git a/riot.js b/riot.js
index 27e5162..fa0d017 100644
--- a/riot.js
+++ b/riot.js
@@ -491,7 +491,7 @@
}
}
}
- for (var key in a) {
+ for (var key in b) {
@aron
aron / ember-badge.js
Created March 21, 2010 13:26
jQuery plugin to get the latest public images from your Ember account
(function ($) {
$.emberBadge = function (selector, username, options) {
var $badge = $(selector);
options = $.extend(options || {}, $.emberBadge.defaults);
// Source: http://javascript.crockford.com/remedial.html
function renderTemplate(values) {
return options.template.replace(/{([^{}]*)}/g, function (a, b) {
var r = values[b];
# Adds an array of folders to the global path array.
['lib', '../vendor'].each { |path| $:.unshift File.expand_path(path) }
@aron
aron / placholder.js
Created January 5, 2010 09:52
Function to clear placeholder text in an input element.
/**
* Function to clear placeholder text in an input element.
*
* Clears the input on focus unless the user has already
* entered data, if the input is blank on blur the placeholder
* will be reinserted.
*
* Uses the value supplied in the _placeholder_ attribute on
* the input element. If this is not present it will default
* to the _value_ attribute.
function split_array($array, $key_values) {
$sorted_array = array();
foreach($array as $key => $value) {
if(in_array($key, $key_values)) {
$sorted_array[$key] = $value;
}
}
return $sorted_array;
}
/* @group JS-Kit Override */
.js-singleCommentBodyT {
display: block;
padding-top: 17px !important;
}
.js-singleCommentHeader {
padding: 0 8px !important;
@aron
aron / display.html
Created February 25, 2009 09:35
Simplified style for the ticket view in Lighthouse Keeper
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
<title>Lighthouse Keeper Template</title>
<style type="text/css" charset="UTF-8">
body {
font: 16px/1 'Helvetica Neue', 'Helvetica-Neue';
padding: 0;
@aron
aron / email_switcher.js
Created January 16, 2009 17:41
Simple jQuery plugin to fill in mailto links.
$(document).ready(function(){
$("a[href^=mailto]").emailSwitcher();
});
// Switches emails in the form <a href="mailto:">bill at ben dot com</a>
// to <a href="mailto:bill@ben.com">bill@ben.com</a>.
$.fn.emailSwitcher = function () {
var regex = /^([^\s]+)\s+at\s+([^\s]+)\s+dot\s+([^\s]+)$/gi;
this.each(function () {
var $this = $(this),