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
➜ psd.js git:(master) ✗ coffee test/test.coffee | |
Beginning parsing | |
### Header ### | |
{ sig: '8BPS', | |
version: 1, | |
r0: 0, | |
r1: 0, | |
r2: 0, | |
r3: 0, |
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
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="apple-touch-icon" href="/path/to/icon.png" /> | |
<link rel="apple-touch-startup-image" href="/path/to/startup-image.png"> | |
<meta name="apple-mobile-web-app-capable" content="yes" /> | |
<meta name="apple-mobile-web-app-status-bar-style" content="black" /> |
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
.background-gradient(@start, @stop) { | |
background-image:-moz-linear-gradient(top, @start, @stop); | |
background-image:-o-linear-gradient(top, @start, @stop); | |
background-image:-webkit-gradient(linear, left top, left bottom, from(@start), to(@stop)); | |
background-image:-webkit-linear-gradient(@start, @stop); | |
background-image:linear-gradient(top, @start, @stop); | |
filter: ~"progid:DXImageTransform.Microsoft.gradient(startColorStr='@{start}', EndColorStr='@{stop}')"; | |
} | |
.transition(@element, @duration, @easing) { |
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
class Singleton | |
# We can make private variables! | |
instance = null | |
# Static singleton retriever/loader | |
@get: -> | |
if not @instance? | |
instance = new @ | |
instance.init() | |
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
uniqid = (-> | |
id = 0 | |
{ get: -> id++ } | |
)() | |
uniqid.get() #= 0 | |
uniqid.get() #= 1 | |
uniqid.get() #= 2, and so on... |
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
.background-gradient(@start, @stop) { | |
background-image:-moz-linear-gradient(top, @start, @stop); | |
background-image:-o-linear-gradient(top, @start, @stop); | |
background-image:-webkit-gradient(linear, lefttop, leftbottom, color-stop(0, @start), color-stop(1, @stop)); | |
background-image:-webkit-linear-gradient(@start, @stop); | |
background-image:linear-gradient(top, @start, @stop); | |
filter: e("progid:DXImageTransform.Microsoft.gradient(startColorStr='") @start e("',EndColorStr='") @stop e("')"); | |
} | |
.transition(@element, @duration, @easing) { |
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
function render() { | |
var pixels = get_pixels(); | |
new Thread(function () { | |
for (i = 0, len = pixels.length; i < len; i +=4) { | |
// holy shared process memory batman! | |
// manipulate pixels here | |
} | |
finished(); | |
}); |
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
short_id | views | |
---------------------- | |
1NOZY | 6046885 | |
1LRVYZ | 5500375 | |
402GUX | 4774205 | |
3VT0AX | 4014450 | |
39P29E | 3621020 | |
2TQFKV | 3075355 | |
I98R2 | 1782350 | |
3XS45P | 1749605 |
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
<!-- Place in your the <head> of your page --> | |
<script src='https://githubanywhere.appspot.com/github-anywhere.js'></script> | |
<script> | |
GitHubAnywhere(function() { | |
// use `this` instead of passing the object? | |
this.buttons(); | |
}); | |
</script> | |
<!-- Place anywhere on your page replaceing :name with a GitHub username and :repo with a repository name. --> |
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
<? | |
/* | |
* This example would probably work best if you're using | |
* an MVC framework, but it can be used standalone as well. | |
* | |
* This example also assumes you are using Predis, the excellent | |
* PHP Redis library available here: | |
* https://github.com/nrk/predis | |
*/ |