This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var http = require('http'); | |
var fs = require('fs'); | |
var path = require('path'); | |
http.createServer(function (request, response) { | |
var filePath = '.' + request.url; | |
if (filePath == './') | |
filePath = './index.htm'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
assets = %w{application} | |
task :compile do | |
require 'sprockets' | |
environment = Sprockets::Environment.new(File.dirname(__FILE__)) | |
environment.append_path 'src/' | |
assets.each do |asset| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('body').on('click', '.partial', function() { | |
if (Modernizr.history) { | |
$('#content').load(this.href, function() { | |
history.pushState(null, this.title, this.href); | |
}); | |
return false; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* The first commented line is your dabblet’s title | |
*/ | |
div { | |
background: #eee; | |
height: 650px; | |
background-image: linear-gradient( | |
transparent, | |
transparent 50px, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* webkit y u blur with large background-size? | |
*/ | |
div { | |
height: 1200px; | |
background-color: #eee; | |
background-image: linear-gradient(top, | |
transparent, | |
transparent 250px, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* webkit y u know 1px rule with linear-gradient? | |
*/ | |
div { | |
background: #eee; | |
height: 650px; | |
background-image: linear-gradient( | |
transparent, | |
transparent 50px, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* -webkit-background-clip: text; causes blurry text on retina display | |
*/ | |
html { -webkit-text-size-adjust: none } | |
h1 { | |
color: #535353; | |
font: lighter 50px/1 Helvetica; | |
background: -webkit-gradient(linear, left top, left bottom, from(#000), to(#535353)); | |
-webkit-background-clip: text; | |
-webkit-text-fill-color: transparent; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* svg in webkit cropping content with rotation | |
*/ | |
.pie { | |
width: 152px; | |
height: 152px; | |
margin: 0 auto; | |
background: rgba(0,0,0, .05); | |
box-shadow: 0 0 20px rgba(0,0,0, .2) inset; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>author</key> | |
<string>Mark Brown</string> | |
<key>name</key> | |
<string>Rogie</string> | |
<key>settings</key> | |
<array> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// borrowed from https://github.com/samflores | |
Prism.languages.ruby = { | |
'comment': /#[^\r\n]*(\r?\n|$)/g, | |
'string': /("|')(\\?.)*?\1/g, | |
'regex': { | |
pattern: /(^|[^/])\/(?!\/)(\[.+?]|\\.|[^/\r\n])+\/[gim]{0,3}(?=\s*($|[\r\n,.;})]))/g, | |
lookbehind: true | |
}, | |
'keyword': /\b(alias|and|BEGIN|begin|break|case|class|def|define_method|defined|do|each|else|elsif|END|end|ensure|false|for|if|in|module|new|next|nil|not|or|raise|redo|rescue|retry|return|self|super|then|throw|true|undef|unless|until|when|while|yield)\b/g, | |
'builtin': /\b(Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Stat|File|Fixnum|Fload|Hash|Integer|IO|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|String|Struct|TMS|Symbol|ThreadGroup|Thread|Time|TrueClass)\b/, |