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 Foo(object): | |
def foo(arg): | |
pass | |
# comment |
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(){ | |
var promptURL=function (url){ | |
window.prompt("Copy short URL to clipboard:",url); | |
}; | |
var links=document.getElementsByTagName('link'); | |
for(var i=0;i<links.length;i++){ | |
var tag=links[i]; | |
if(tag.getAttribute('rel')=='shorturl' || tag.getAttribute('rel')=='shortlink' || tag.getAttribute('id')=='shorturl' || tag.getAttribute('id')=='shortlink'){ | |
promptURL(tag.getAttribute('href')); | |
return; |
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
#!/usr/bin/env python | |
import sys | |
import os | |
import os.path | |
for a in sys.argv[1:]: | |
for root, dirs, files in os.walk(a): | |
for f in files: | |
if f.startswith(':2e_') or f.startswith('._') or f.endswith('~') or f == '.DS_Store': | |
print "rm %r" % os.path.join(root, f) |
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
> db.dropDatabase(); | |
{ "dropped" : "test", "ok" : 1 } | |
> | |
> // These points are one degree apart, which (according to Google Maps) is about 110 km apart | |
> // at this point on the Earth. | |
> db.points.insert({location: [-122, 37]}); | |
> db.points.insert({location: [-122, 38]}); | |
> db.points.ensureIndex({location:"2d"}); | |
> | |
> |
NewerOlder