Skip to content

Instantly share code, notes, and snippets.

View makenosound's full-sized avatar

Max Wheeler makenosound

View GitHub Profile
@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);
}
@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>
<?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="* | @*"/>
<!-- 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" />
@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);
}
});
@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;
<figure class="left">
![Alternate text](/path/to/image.jpg)
<footer><p>Caption goes here.</footer>
</figure>
<figure>
![Alternate text](/path/to/image.jpg)
<footer><p>Caption goes here.</footer>
</figure>
@makenosound
makenosound / gist:1308073
Created October 23, 2011 23:37
Windows Vista/7 local server

Built-in Servers: IIS on Windows

Windows Vista and Windows 7 can both run versions of the IIS web server. To install it, open the Control Panel and choose Programs and Features; then select Turn Windows features on or off from the left column. Next, select Internet Information Services, and click OK. This will install IIS. After that, you need to set up a site. Again from the Control Panel, select Administrative Tools, then Internet Information Services (IIS) Manager. The easiest way to get things running is to create a project directory inside C:\Inetpub\wwwroot, and then point your browser at that directory: http://192.168.0.1/your-directory.

@makenosound
makenosound / preview.js
Created February 10, 2012 03:47 — forked from virginia/preview.js
Google Preview
$(document).ready(function() {
google.load("books", "0");
var viewerHeight;
var headerHeight;
var btn = $('#viewerButton'); // Single ref.
var viewer = $('#viewerContainer');
function viewerInit() {
@makenosound
makenosound / flexi.css.scss
Created October 14, 2012 21:14
flexi grid thing
// Configurables
$flexiColumns: 24 !default;
$flexiColumnWidth: 30px !default;
$flexiGutterWidth: 18px !default;
// Full width of a row
$flexiRowWidth: ($flexiColumns * $flexiColumnWidth) + ($flexiGutterWidth * ($flexiColumns - 1));
// The width of a column
$flexiGridWidth: percentage($flexiColumnWidth / $flexiRowWidth);