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
if process? | |
Obj: exports | |
Hash: require './hash' | |
else | |
Obj: window.Obj: {} | |
Hash: window.Hash: {} |
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
if process? | |
Obj: exports | |
Hash: require './hash' | |
else | |
window.Obj: {} | |
window.Hash: {} |
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
when World.Surface.CANVAS.FORE | |
g: context.createRadialGradient 0, 0, 0, 0, 0, 50 | |
g.addColorStop 0.4, "rgba(150, 183, 51, 1)" | |
g.addColorStop 0.9, "rgba(150, 183, 51, 0)" | |
context.fillStyle: g2 | |
context.beginPath() | |
context.arc 0, 0, 45, 0, Math.PI*2, true | |
context.closePath() | |
context.fill() |
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 -> | |
gSmallShadow: new google.maps.MarkerImage("http://labs.google.com/ridefinder/images/mm_20_shadow.png", new google.maps.Size(22, 20), new google.maps.Point(0, 0), new google.maps.Point(6, 20)) | |
gYellowIcon: new google.maps.MarkerImage("http://labs.google.com/ridefinder/images/mm_20_yellow.png", new google.maps.Size(12, 20), new google.maps.Point(0, 0), new google.maps.Point(6, 20)) | |
places: {} | |
updatePlaces: -> | |
bounds: map.getBounds() | |
ne: bounds.getNorthEast() | |
sw: bounds.getSouthWest() | |
$.ajax({ |
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 Base | |
someMethod: -> | |
puts "hello from Base" | |
class Derived extends Base | |
someOtherMethod: -> | |
@someMethod() | |
x: new Derived() | |
x.someOtherMethod() |
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
attributes_value: self.template_eval "\$H($attributes_hash)" |
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
# This Python: | |
@cache('public') | |
@get('/') | |
def hello(): | |
return 'Hello World!' | |
# Can be done like this with CoffeeScript: |
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
func: (should_i) -> | |
do_it() if should_i = true | |
somevar: 0 | |
while should_i = true | |
do_it() | |
somevar: somevar + 1 | |
should_i: false | |
# Compared to |
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 __slice = function(array, from, to) { | |
return array.slice( | |
from < 0 ? from + array.length : from || 0, | |
to < 0 ? to + array.length : to == 0 ? to : array.length | |
); | |
}; |
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
routes: {} | |
get: (route, handler) -> | |
routes[route]: handler | |
############################################# | |
get 'greet/:name', (request) -> | |
"Hello " + request.params['name'] |