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
#!/usr/bin/perl | |
# configure here: | |
# first top left (north west) | |
my $startlon = 13.40991; | |
my $startlat = 52.48905; | |
# then bottom right (south east) | |
my $endlon = 13.42209; | |
my $endlat = 52.47982; | |
#zoom level: |
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
#!/usr/bin/python | |
# Python script for downloading all images from dropbox a gallery into a folder. | |
# use it like this: | |
# python dropbox_gallery_downloader.py https://www.dropbox.com/gallery/3104986/1//Processing?h=ea3455&p=0 | |
import urllib, urllib2, re, os, json, sys | |
if (len(sys.argv) == 1): | |
print "Please provide the dropbox gallery URL as a command line argument. \nA sceond argument may be provided for a folder name, if none is given the dropbox name will be used." | |
exit() |
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
set nocompatible " disable vi compatibility mode | |
set nowrap " don't wrap lines | |
set tabstop=2 | |
set shiftwidth=2 | |
set softtabstop=2 | |
set expandtab | |
set showmode |
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
javascript:(function(){ | |
if (document.location.href.match(/google/)) { | |
var link = document.getElementById("link").getAttribute("href"); | |
var llzrx = /ll=(\d*\.\d*),(\d*\.\d*).*&z=(\d+)/; | |
var match = llzrx.exec(link); | |
var lat = match[1]; | |
var lon = match[2]; | |
var zoom = match[3]; | |
window.open("http://www.openstreetmap.org/?lat="+lat+"&lon="+lon+"&zoom="+zoom); | |
} |
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
#!/usr/bin/python | |
import urllib, urllib2 | |
from BeautifulSoup import BeautifulSoup | |
def __main__(): | |
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor()) | |
urllib2.install_opener(opener) |
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 mp3 = document.createElement("audio"); | |
mp3.setAttribute('src', 'http://example.com/track.mp3'); | |
mp3.load(); | |
document.documentElement.appendChild(mp3); | |
mp3.play(); | |
// use mp3.pause() to pause :=) | |
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
javascript:(function(){ | |
var s = document.createElement("script"); | |
s.setAttribute("src", "http://code.jquery.com/jquery.js"); | |
document.body.appendChild(s); | |
s.addEventListener("load", function() { | |
var $ = jQuery; | |
var max = 0; | |
var table = "table tr:eq(3) table:eq(1) "; | |
$(table).width("100%"); | |
$(table + "tr td:eq(0)").width("15px"); |
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
/* | |
* Date Format 1.2.3 | |
* (c) 2007-2009 Steven Levithan <stevenlevithan.com> | |
* MIT license | |
* | |
* Includes enhancements by Scott Trenda <scott.trenda.net> | |
* and Kris Kowal <cixar.com/~kris.kowal/> | |
* | |
* Accepts a date, a mask, or a date and a mask. | |
* Returns a formatted version of the given date. |
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 d = new Date(); | |
var usertime = d.toLocaleString(); | |
// Some browsers / OSs provide the timezone name in their local string: | |
var tzsregex = /\b(ACDT|ACST|ACT|ADT|AEDT|AEST|AFT|AKDT|AKST|AMST|AMT|ART|AST|AWDT|AWST|AZOST|AZT|BDT|BIOT|BIT|BOT|BRT|BST|BTT|CAT|CCT|CDT|CEDT|CEST|CET|CHADT|CHAST|CIST|CKT|CLST|CLT|COST|COT|CST|CT|CVT|CXT|CHST|DFT|EAST|EAT|ECT|EDT|EEDT|EEST|EET|EST|FJT|FKST|FKT|GALT|GET|GFT|GILT|GIT|GMT|GST|GYT|HADT|HAEC|HAST|HKT|HMT|HST|ICT|IDT|IRKT|IRST|IST|JST|KRAT|KST|LHST|LINT|MART|MAGT|MDT|MET|MEST|MIT|MSD|MSK|MST|MUT|MYT|NDT|NFT|NPT|NST|NT|NZDT|NZST|OMST|PDT|PETT|PHOT|PKT|PST|RET|SAMT|SAST|SBT|SCT|SGT|SLT|SST|TAHT|THA|UYST|UYT|VET|VLAT|WAT|WEDT|WEST|WET|WST|YAKT|YEKT)\b/gi; | |
// In other browsers the timezone needs to be estimated based on the offset: | |
var timezonenames = {"UTC+0":"GMT","UTC+1":"CET","UTC+2":"EET","UTC+3":"EEDT","UTC+3.5":"IRST","UTC+4":"MSD","UTC+4.5":"AFT","UTC+5":"PKT","UTC+5.5":"IST","UTC+6":"BST","UTC+6.5":"MST","UTC+7":"THA","UTC+8":"AWST","UTC+9":"AWDT","UTC+9.5":"ACST" |
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
String.prototype.toUnicode = function (){ | |
function pad(t) { | |
return t.length == 4 ? t : pad("0" + t); | |
} | |
var r=""; | |
for (var i = 0; i < this.length; i++) { | |
r += "\\u" + pad(this.charCodeAt(i).toString(16)); | |
} | |
return r; | |
} |
OlderNewer