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 palette = require('./') | |
, fs = require('fs') | |
, Canvas = require('canvas') | |
, Image = Canvas.Image | |
, canvas = new Canvas | |
, ctx = canvas.getContext('2d') | |
, path = process.argv[2] | |
, out = '/tmp/out.png'; | |
if (!path) { |
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
section { | |
position: relative; | |
margin-top: -140px; | |
} | |
p, p:before { | |
position: absolute; | |
top: 0; | |
left: 0; | |
-webkit-box-reflect: below -120px -webkit-linear-gradient(top,rgba(0,0,0,0),rgba(0,0,0,0)50%,rgba(0,0,0,0.75)) |
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
$(document).ready(function() { | |
$(document).mousemove(function(e) { | |
var horizontal = e.pageX / $(document).width(); | |
var vertical = e.pageY / $(document).height(); | |
$('.ipad').css({ | |
'-webkit-transform': 'rotateX(' + (7 - (vertical * 14)) + 'deg) rotateY(' + ( - 10 + (horizontal * 20)) + 'deg)' | |
}); | |
$('.specular').css({ |
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
// Remove the image views that cause shadow on the overscroll | |
// Based on: http://stackoverflow.com/questions/1074320/remove-uiwebview-shadow | |
NSArray *subViews = [webView subviews]; | |
if ([subViews count] > 0) { | |
for (UIView* aView in [[subViews objectAtIndex:0] subviews]) { | |
if ([aView isKindOfClass:[UIImageView class]]) { | |
[aView setHidden:YES]; | |
} | |
} | |
} |
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
# in and out | |
average :: ({name: Str, age: Num}, [...Num]) -> Str | |
average = (person, loc) -> | |
sum = loc.reduce (s1, s2) -> s1 + s2 | |
"#{person.name} wrote on average | |
#{sum / loc.length} lines of code." | |
# using your own functions to enforce (just need to handle true or false) | |
Even = (x) -> x % 2 is 0 | |
Odd = (x) -> x % 2 isnt 0 |
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
html = b.html { | |
b.head { | |
b.title "XML Builder Test" | |
} | |
b.body { | |
b.h1 "Title of Page" | |
b.p "Sample paragraph text" | |
} | |
} |
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
w.html() | |
.head().title().text("Example & Test").xtitle().xhead() | |
.body().text("Hello world!").xbody() | |
.xhtml(); |
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
/* simple */ | |
document.body.appendChild( | |
Fox.makeTable([ | |
"+---+---+---+", | |
"|A |B |C |", | |
"| +---+---+", | |
"| |D |E |", | |
"| +---+ |", | |
"| |F | |", | |
"+---+---+---+", |
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
$('#forward').click(function() { | |
$('#test').animate({ | |
translateX:'-=150', | |
translateY:'+=150', | |
scale:'+=2', | |
rotateY: '+='+(2*Math.PI), | |
rotateX: '+='+Math.PI, | |
rotateZ: '+='+Math.PI | |
}, 1500); | |
}); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Android Style</title> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> | |
</head> | |
<body> | |
<style type="text/css"> | |
input[type=radio] { |