Skip to content

Instantly share code, notes, and snippets.

View makenosound's full-sized avatar

Max Wheeler makenosound

View GitHub Profile
@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.

<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 / 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="* | @*"/>