Skip to content

Instantly share code, notes, and snippets.

import json
import csv
import sys
from datetime import datetime
import os
def make_reader(in_json):
# Open location history data
json_data = json.loads(open(in_json).read())
@devdattaT
devdattaT / LocationHistory.md
Last active April 13, 2025 12:58
How to Visualize your Google Location History

Google is extremely transparent about the Location History it has on you. You can check it out on the timeline feature in the Google Maps application on the phone, or on https://www.google.com/maps/timeline It is possible that you have that turned off, and in that case, consider yourself lucky.

If there is data there, you can view it online, or Download and Analyze it yourself.

Note: The conversion script has been updated on 2024-06-24, to match the updated format which is now generated by Google Takeout

@frgomes
frgomes / install-docker.sh
Last active June 6, 2021 18:52
Debian - install docker in Debian Jessie
#!/bin/bash
# compiled from https://docs.docker.com/engine/installation/linux/debian/#/debian-jessie-80-64-bit
sudo apt-get update
sudo apt-get dist-upgrade -y
sudo apt-get install apt-transport-https ca-certificates -y
sudo sh -c "echo deb https://apt.dockerproject.org/repo debian-jessie main > /etc/apt/sources.list.d/docker.list"
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
@desyncr
desyncr / zmq
Last active April 12, 2018 15:57
Monit check pid-less process (without script)
check process zmq with pidfile '/tmp/zmq.pid'
start program '/bin/bash -c "/usr/bin/php /var/www/sm/public/index.php zmq daemon execute & echo $! > /tmp/zmq.pid"'
stop program '/usr/bin/killall --full "zmq daemon execute"'
@korjavin
korjavin / MyConfig.pm
Last active May 6, 2019 15:46
perl reload
package MyConfig;
use strict;
use base 'Exporter';
BEGIN {
our @EXPORT = qw($DB_USER );
}
our @EXPORT;
@creaktive
creaktive / mojo-crawler.pl
Last active November 28, 2020 13:15
Simple web crawler/scraper implemented using Mojolicious
#!/usr/bin/env perl
use 5.010;
use open qw(:locale);
use strict;
use utf8;
use warnings qw(all);
use Mojo::UserAgent;
# FIFO queue
#!/usr/bin/env perl
use Mojolicious::Lite;
use EV;
use AnyEvent;
# Simple delayed rendering
get '/' => sub {
my $self = shift;
my $w;
$w = AE::timer 3, 0, sub {