Skip to content

Instantly share code, notes, and snippets.

View makenosound's full-sized avatar

Max Wheeler makenosound

View GitHub Profile
@makenosound
makenosound / eleven40.scss
Created July 18, 2011 01:04
SASS plugin for Andy Taylor's 1140 grid
$eleven40-grid-width: 4.85% !default; // The width of a column
$eleven40-grid-margin: 3.8% !default; // The amount of margin between columns
@mixin eleven40-container {
padding-left: 20px;
padding-right: 20px;
}
@mixin eleven40-row {
margin: 0 auto;
@makenosound
makenosound / gist:1046087
Created June 25, 2011 03:10 — forked from liquorice/gist:1041979
bare bones method for grabbing and updating a users latest tweet (with no error handling whatsoever)
$.ajax({
url: 'http://api.twitter.com/1/statuses/user_timeline.json?screen_name=someonesplendid',
dataType: 'jsonp',
success: function(data) {
var tweet = data[0].text;
tweet = tweet.replace(/(http\:\/\/[A-Za-z0-9\.\/_]+)/g, '<a href="$1">$1</a>');
tweet = tweet.replace(/@([a-zA-Z0-9_]+)/g, '<a href="http://twitter.com/$1">@$1</a>');
$('#tweet').html(tweet);
}
});
<!-- Call the template -->
<xsl:call-template name="replace-node-set">
<xsl:with-param name="input" select="hints/text()" />
<xsl:with-param name="node" select="//pattern" />
<xsl:with-param name="total" select="count(//pattern)" />
</xsl:call-template>
<!-- Recursive template that iterates through the pattern nodes -->
<xsl:template name="replace-node-set">
<xsl:param name="node" />
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:exsl="http://exslt.org/common"
extension-element-prefixes="exsl">
<xsl:import href="../../utilities/generic/string-replace.xsl" />
<xsl:strip-space elements="* | @*"/>
@makenosound
makenosound / jsx.html
Created June 19, 2014 00:44
Touch preview
<!-- Pretend this is a JSX block -->
<div>
<TouchPreview previewClassName="link--preview">
<a href="/foo">
Hello
</a>
</TouchPreview>
</div>
@makenosound
makenosound / app.js
Last active August 29, 2015 13:58 — forked from anonymous/app.js
Viewloader rewrite
var views = {
foo: function($el, el, props) {
console.log(props);
},
bar: function($el, el, props) {
console.log(props);
},
fooBar: function($el, el, props) {
console.log(props);
}