Batch file to map your Android phone as network drive in Windows.
- An Android phone
- WebDAV Server or WebDAV Server Ultimate
- WiFi router (PC and phone on the same network)
/* The solution found here: http://www.aspsnippets.com/Articles/Change-URL-in-Browser-Address-Bar-without-reloading-using-JavaScript-and-jQuery.aspx */ | |
/** HTML5 History pushState method | |
* The pushState method works similar to window.location but it does not refresh or reload the page and it will modify the URL even if the page does not exists. The pushState method actually inserts an entry into the history of the browsers which allows us to go back and forth using the browser’s forward and back buttons. | |
* The pushState method accepts the following three parameters. | |
* 1. State object: - The state object is a JavaScript object which can contain any details about the page and must be serializable. | |
* 2. Title: - The title of the page. | |
* 3. URL – The URL of the page. | |
*/ |
INSERT INTO <my_table_name> (cartodb_id, the_geom, the_geom_webmercator) | |
WITH inputs AS (SELECT | |
ST_Transform(ST_SetSRID(ST_MakeEnvelope( | |
-126.21093749999999, 23.241346102386135, | |
-63.28125, 50.064191736659104 | |
), 4326), 5070) geom, | |
500000 width, | |
500000 height | |
), rast AS (SELECT | |
(st_pixelaspolygons( |
<html> | |
<head> | |
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.css"/> | |
<style> | |
#mapid{ | |
height: 480px; | |
} | |
#download { | |
position:absolute; |
#!/usr/bin/env python | |
from __future__ import print_function, unicode_literals | |
import operator | |
import psycopg2 | |
import psycopg2.extras | |
import io | |
import json | |
import sys | |
import logging |
/* | |
* Copyright 2017 Mohsen Mesgarpour | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
<?php | |
// apitest.php | |
// by Karl Kranich - karl.kranich.org | |
// version 3.1 - edited query section | |
require_once realpath(dirname(__FILE__) . '/vendor/autoload.php'); | |
include_once "google-api-php-client/examples/templates/base.php"; | |
$client = new Google_Client(); |
# This is just a cheat sheet: | |
# On production | |
sudo -u postgres pg_dump database | gzip -9 > database.sql.gz | |
# On local | |
scp -C production:~/database.sql.gz | |
dropdb database && createdb database | |
gunzip < database.sql.gz | psql database |
Batch file to map your Android phone as network drive in Windows.
/** | |
* Get values in range | |
* | |
* @param {String} rangeA1 The range in A1 notation | |
* | |
* @return {Array} array with non-filtered values | |
*/ | |
function getValues (rangeA1) { | |
// Get range |