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
require 'rake/clean' | |
include ::Rake::DSL | |
BIN = "public_html" | |
HAML = FileList['**/*.haml'] | |
LESS = FileList['**/*.less'] | |
COFFEE = FileList['**/*.coffee'] | |
SASS = FileList['**/*.scss'] |
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
Alex Aivars Worldwide! Site is forked from Jacob Åström Worldwide. | |
I help companies and organizations create what they normally don’t, | |
make things they didn’t know they could and do things they | |
wouldn’t think was possible. Always digital to most extent. | |
But then again – what isn’t? | |
☟ | |
Open for inquiries (or, at least, tea). |
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
function zeroFill( number, width ) | |
{ | |
width -= number.toString().length; | |
if ( width > 0 ) | |
{ | |
return new Array( width + (/\./.test( number ) ? 2 : 1) ).join( '0' ) + number; | |
} | |
return number; | |
} | |
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
from fabric.api import env, local, run | |
def vagrant(): | |
# change from the default user to 'vagrant' | |
env.user = 'vagrant' | |
# connect to the port-forwarded ssh | |
env.hosts = ['127.0.0.1:2222'] | |
# use vagrant ssh key | |
result = local('vagrant ssh_config | grep IdentityFile', capture=True) |
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
Function::define = (prop, desc) -> | |
Object.defineProperty this.prototype, prop, desc | |
class GetterSetterTest | |
constructor: (@_obj = {}) -> | |
# 'obj' is defined via the prototype, the definition proxied through | |
# to 'Object.defineProperty' via a function called 'define' providing | |
# some nice syntactic sugar. Remember, the value of '@' is | |
# GetterSetterTest itself when used in the body of it's class definition. |
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
http = require("http") | |
q = require("querystring") | |
url = require("url") | |
server = http.createServer().listen 9006 | |
server.on "request", (req, res) -> | |
params = url.parse(req.url, true).query | |
callbackFn = "callback" | |
if params.url is undefined or params.url is "" |
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
################################################################################ | |
# | |
# [global] localstorage | |
# A simple cookie based polyfill for localStorage | |
# | |
################################################################################ | |
unless Modernizr.localstorage | |
window.localStorage = | |
length: 0 | |
setItem: (key, value) -> |
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
class Teaser extends React.Component { | |
render() { | |
var model = this.props.model; | |
return ( | |
<article className="teaser"> | |
<TeaserLink link={model.link}> | |
<Picture model={model.cover} type="square"/> | |
<div className="teaser__text"> | |
<TeaserCaption>{model.description}</TeaserCaption> | |
<div> |
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
'use strict'; | |
var React = require('react'); | |
var util = { | |
// findPos() by quirksmode.org | |
// Finds the absolute position of an element on a page | |
findPos: function (obj) { | |
/*jshint -W084 */ | |
var curleft = 0, |
OlderNewer