A variant of the Zoom to Bounding Box example that uses zoom transitions to smoothly interpolate between different views. This example also allows you to freely pan and zoom with the mouse (or touch).
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
module['exports'] = function accessRequestData (hook) { | |
var AWS = require('aws-sdk') | |
var res = hook.res | |
AWS.config.update({ | |
accessKeyId: hook.env.accessKeyId, | |
secretAccessKey: hook.env.secretAccessKey, | |
region: hook.env.region | |
}) |
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
module['exports'] = function pingtMtWellington (hook) { | |
var req = require('request') | |
var store = hook.datastore | |
req.head('http://www.rosebay.tased.edu.au/webcam/large.jpg', function (err, res, body) { | |
if (err) { | |
console.log(err.messsage) | |
return hook.res.end(err.messsage) | |
} | |
if (!res.headers['last-modified']) { |
I hereby claim:
- I am joshgillies on github.
- I am joshgillies (https://keybase.io/joshgillies) on keybase.
- I have a public key whose fingerprint is D1A4 7689 921F A140 140D D25E 4A5F 02C5 BA3C 4172
To claim this, I am signing this object:
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
var json = { | |
data: ['a','bunch','of','things'] | |
}; | |
var otherData = { | |
things: [], | |
madness: {} | |
}; | |
json.data.forEach(function(data,index,array){ |
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 Vim settings, rather then Vi settings (much better!). | |
" This must be first, because it changes other options as a side effect. | |
set nocompatible | |
" TODO: this may not be in the correct place. It is intended to allow | |
" overriding <Leader>. | |
" source ~/.vimrc.before if it exists. | |
if filereadable(expand("~/.vimrc.before")) | |
source ~/.vimrc.before | |
endif " ================ General Config ==================== |
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
ww = window; | |
try { | |
ww.document.body = ww.document.body | |
} catch(dgsgsdg) { | |
zxc = 1; | |
} | |
try { | |
if(ww.document) window["doc" + "ument"]["body"] = ww.document | |
} catch(bawetawe) { | |
if(ww.document) { |
Some notes around the article I've just read from JZ; http://www.zeldman.com/2012/11/21/in-defense-of-descendant-selectors-and-id-elements/
Whilst OOCSS is the new hotness (or at least was a few years ago), I can faithfully agree with the notion of every element in your mark-up DOES NOT require a class... In fact use classes as a way to describe your mark-up where a descriptive/semantic tag ins't available.
By the same token, the use of an ID where appropriate is totally fine, as JZ
for instance with ID's seeing something like this in CSS is completely wrong:
#paraInsideAside {
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
// getting my head around callbacks, would like to take this further. Maybe another time. | |
// See this code live: http://jsconsole.com/?function%20testMe(%20a%2C%20b%2C%20c%2C%20callback%20)%20%7B%0A%20%20var%20test%20%3D%20a%2C%0A%20%20%20%20%20%20test2%20%3D%20b%2C%0A%20%20%20%20%20%20test3%20%3D%20c%3B%0A%20%20console.log(test%20%2B%20%22%20%22%20%2B%20test2%20%2B%20%22%20%22%20%2B%20test3)%3B%0A%20%20test2%20%3D%20b%20%2B%207%3B%0A%20%20return%20callback(%20test%2C%20test2%2C%20test3%20)%3B%0A%7D%0A%0Afunction%20testThis(%20callback%20)%20%7B%0A%20%20console.log(%22helloworld%22)%3B%0A%20%20console.log(typeof%20callback)%3B%0A%20%20(typeof%20callback%20%3D%3D%3D%20'number'%20%3F%20%20callback%20%3D%20callback%20%2B%207%20%3A%20callback)%3B%0A%20%20return%20callback%3B%0A%7D%0A%0AtestThis(%20testMe(%20%22string%22%2C%2020%2C%20false%2C%20function%20()%20%7B%0A%20%20return%20test2%3B%0A%7D))%3B | |
function testMe( a, b, c, callback ) { | |
var test = a, | |
test2 = b, | |
test3 = c; | |
console.log(test + " " |
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
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> | |
<script>window.jQuery || document.write('<script src="js/libs/jquery-1.7.1.min.js"><\/script>')</script> |