Skip to content

Instantly share code, notes, and snippets.

View keithxm23's full-sized avatar
¯\_(ツ)_/¯

Keith Mascarenhas keithxm23

¯\_(ツ)_/¯
View GitHub Profile
@keithxm23
keithxm23 / chrome_to_time.py
Created January 13, 2016 16:11
Tiny Python script to convert the 'date_added' field in the Chrome Bookmarks file to a readable format. Usage: python chrome_to_time.py 13024882639633631 Credits to Zaw Lin http://stackoverflow.com/a/19076132/1415352 for this!
import datetime
import sys
def getFiletime(dt):
microseconds = int(dt, 16) / 10
seconds, microseconds = divmod(microseconds, 1000000)
days, seconds = divmod(seconds, 86400)
return datetime.datetime(1601, 1, 1) + datetime.timedelta(days, seconds, microseconds)
var players = {}
$("table#clubplayer > tbody > tr:not(:first-child) > td:first-child > a").each(function(){
console.log(players);
var player = $(this).text();
if (player in players){
players[player] += 1;
}
else{
players[player] = 1;
}