This file contains hidden or 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{ | |
font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Verdana, Arial, sans-serif; | |
} | |
#wrapper{ | |
background: url("http://m-local.wavii.com:3000/assets/mobile/[email protected]"); | |
height: 100%; | |
width: 320px; | |
padding: 20px; | |
} |
This file contains hidden or 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
_ _ | |
.-""-. ( )-"```"-( ) .-""-. | |
/ O O \ / \ / O O \ | |
|O .-. \ / 0 _ 0 \ / .-. O| | |
\ ( ) '. _| (_) | .' ( ) / | |
'.`-' '-./ | |`\.-' '-'.' | |
\ | \ \ / / | / | |
\ \ '. '._.' .' / / | |
\ '. `'-----'` .' / | |
\ .' '-._ .-'\ '. / |
This file contains hidden or 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
space: 00101010 | |
pong: 10000001 | |
simone: 11010011 | |
eightbit: 01010011 | |
song: 11011011 | |
synth: 10001000 | |
ascii: 01111111 | |
bowling: 01110101 | |
rocket: 01000101 | |
burger: 00111001 |
This file contains hidden or 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
url_domain (data) -> | |
a = document.createElement 'a' | |
a.href = data | |
a.hostname |
This file contains hidden or 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
console.log("%c ", 'background: url("http://placekitten.com/200/200"); padding: 5000px') |
This file contains hidden or 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
<link rel="import" href="../../bower_components/polymer/polymer.html"> | |
<link rel="import" type="text/css" href="../sub-element/sub-element.html"> | |
<link rel="import" type="text/css" href="../my-super/my-super.html"> | |
<polymer-element name="my-app" extends="my-super"> | |
<template>root <content></content><shadow></shadow></template> | |
<script type="text/javascript"> | |
Polymer('my-app', { | |
ready: function() { | |
this.subElement = new SubElement(); |
This file contains hidden or 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
// old fashion way to pass a sorting function | |
func backwards(s1: String, s2: String) -> Bool { | |
return s1 > s2 | |
} | |
var reversed = sort(names, backwards) | |
// with closures, the {} denotes a function, everythig before 'in' keyword is function definition | |
reversed = sort(names, { (s1: String, s2: String) -> Bool in | |
return s1 > s2 | |
}) |
This file contains hidden or 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
extension Double { | |
var km: Double { return self * 1_000.0 } | |
var m: Double { return self } | |
var cm: Double { return self / 100.0 } | |
var mm: Double { return self / 1_000.0 } | |
var ft: Double { return self / 3.28084 } | |
} | |
let oneInch = 25.4.mm | |
println("One inch is \(oneInch) meters") | |
// prints "One inch is 0.0254 meters" |
This file contains hidden or 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 Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains hidden or 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
CSS animations (and the GPU) are really good at animating position, rotation, or | |
scale, this combined with beautiful bezier curve transitions and if you're | |
creative you can come up with some pretty amazing animations. However if you've | |
ever worked on any large or more complex web animations, especially if you're | |
porting them over from after effects you're bond to run into some limit of the | |
web and pretty quickly and have to resort to expensive hacks. | |
The main walls I ran into with CSS can be solved by this; If CSS has the ability | |
to compose animations into a hierarchy of groups. After effects calls these | |
compositions. (http://helpx.adobe.com/after-effects/using/composition- |
OlderNewer