Skip to content

Instantly share code, notes, and snippets.

$("#slider-range").slider
range: true
min: 0
max: 20
values: [5, 11]
slide: (_, ui) -> console.log "#{ui.values[0]} to #{ui.values[1]}"
$("#slider-range").slider({
range: true,
min: 0,
max: 20,
values: [5, 11],
slide: function(_, ui) {
return console.log("" + ui.values[0] + " to " + ui.values[1]);
}
});
$ ->
localStorage.clear()
googleSpreadsheet = new GoogleSpreadsheet()
googleSpreadsheet.url "0AkHpzadx2wordERkOGROYlpNNkJhVkFrQWpWR0VMYUE"
googleSpreadsheet.load (result) ->
ConferenceSpreadsheetParser.parse result.cells, (conferences) ->
map = new google.maps.Map $("#map-canvas")[0],
zoom: 1
mapTypeId: google.maps.MapTypeId.ROADMAP
map.setCenter new google.maps.LatLng(0, 0)
fns = []
for ch in ["A", "B", "C"]
fns.push -> console.log ch
for f in fns
f()
fns = [];
_ref = ["A", "B", "C"];
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
ch = _ref[_i];
fns.push(function() {
return console.log(ch);
});
}
for (_j = 0, _len2 = fns.length; _j < _len2; _j++) {
f = fns[_j];
fns = []
for ch in ["A", "B", "C"]
do (ch) ->
fns.push -> console.log ch
for f in fns
f()
fns = [];
_ref2 = ["A", "B", "C"];
_fn = function(ch) {
return fns.push(function() {
return console.log(ch);
});
};
for (_k = 0, _len3 = _ref2.length; _k < _len3; _k++) {
ch = _ref2[_k];
_fn(ch);
A
B
C
$ ->
map = new google.maps.Map $("#map-canvas")[0],
zoom: 1
mapTypeId: google.maps.MapTypeId.ROADMAP
map.setCenter new google.maps.LatLng(0, 0)
marker = new google.maps.Marker
position: new google.maps.LatLng 56, 32
map: map
$(function() {
var map, marker;
map = new google.maps.Map($("#map-canvas")[0], {
zoom: 1,
mapTypeId: google.maps.MapTypeId.ROADMAP
});
map.setCenter(new google.maps.LatLng(0, 0));
marker = new google.maps.Marker({
position: new google.maps.LatLng(56, 32),
map: map