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
# . . ... ........... . ... | |
#. ................. . .. ..... ...... ..... ....................... | |
# . .......... ... ... .......................... . | |
# ............. . ............................... | |
# ............ .. X .. X.... ................. | |
# ....... ..... .. ................... | |
# .. . ............ .... .......... | |
# . ............. . .. . | |
# ..... .......... .. . | |
# .......... ...... . .. |
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
import urllib.parse | |
def urlencode(str): | |
return urllib.parse.quote(str) | |
def urldecode(str): | |
return urllib.parse.unquote(str) | |
str = '{"name": "Kinkin"}' |
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
<!DOCTYPE html> | |
<head> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0-alpha1/jquery.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-csv/0.71/jquery.csv-0.71.min.js"></script> | |
<script type="text/javascript"> | |
$(document).ready(function() { | |
// The event listener for the file upload | |
document.getElementById('txtFileUpload').addEventListener('change', upload, false); |
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
-- Create tables | |
CREATE TABLE groups (id serial NOT NULL, name character varying NOT NULL); | |
CREATE TABLE network_group_members (pid integer, cid integer NOT NULL); | |
-- Insert the groups | |
INSERT INTO groups (name) VALUES ('GROUP 1'),('GROUP 2'),('GROUP 3'),('GROUP 4'),('GROUP 5'),('GROUP 6'),('GROUP 7'),('GROUP 8'),('GROUP 9'),('GROUP 10'),('GROUP 11'),('GROUP 12'),('GROUP 13'); | |
-- Build the "Network" | |
INSERT INTO network_group_members(pid,cid) VALUES (1,2),(1,3),(1,4),(2,5),(5,6),(5,7),(7,8),(3,9),(4,10),(4,11),(11,12),(12,13); |
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
# Assume we are in your home directory | |
cd ~/ | |
# Clone the repo from GitLab using the `--mirror` option | |
$ git clone --mirror git@your-gitlab-site.com:mario/my-repo.git | |
# Change into newly created repo directory | |
$ cd ~/my-repo.git | |
# Push to GitHub using the `--mirror` option. The `--no-verify` option skips any hooks. |
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
<?php | |
/** | |
* Spatialite to GeoJSON | |
It needs: | |
* apache2 | |
* php5-cli | |
* php5-sqlite |