This file contains hidden or 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
// Tableau 10 color theme | |
$themes: ( | |
blue: #5778a4, | |
orange: #e49444, | |
red: #d1615d, | |
teal: #85b6b2, | |
green: #6a9f58, | |
yellow: #e7ca60, | |
purple: #a87c9f, | |
pink: #f1a2a9, |
This file contains hidden or 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
cat FILENAME.json | jq '.KEY' | sed 's/.*postgres:\(.*\)@.*/\1/' |
This file contains hidden or 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
# Paste this in your ~/.bashrc or ~/.bash_profile | |
function panstrap () { | |
# Usage: panstrap input_file output_file | |
DIR="$HOME/Templates" | |
if [ "$#" -eq 2 ] | |
then | |
pandoc "$1" -o "$2" --template $DIR/template.html --css $DIR/template.css --self-contained --toc --toc-depth 2 | |
elif [ "$#" -eq 1 ] | |
then | |
filename=$(basename -- "$1") |
This file contains hidden or 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
# Always feeling like I'm repreating myself when writing prose, | |
# but forcing myself to stay in terminal | |
# Usage: syn $WORD, e.g. `syn car` | |
# Output: ['motor', 'automotive', 'cart'] | |
# Requirements: Python 3+, pip install vocabulary | |
function syn () { python -c "import json;from pprint import pprint;from vocabulary.vocabulary import Vocabulary as vb;syns = json.loads(vb.synonym('$@'));pprint([s['text'] for s in syns]);" ; } |
This file contains hidden or 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
/* | |
Minimal example used to test that PostGIS extention is installed on Postgres. | |
Run with: psql -U $USERNAME -d $GEODB -p $PORT -f postgis_example.sql | |
Should return: | |
''' | |
id | geometry | |
----+-------------- | |
2 | POINT(30 30) | |
(1 row) | |
''' |
This file contains hidden or 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
' This script will export all tables in its MS Access db to UTF-8 CSVs | |
' ----- | |
' The macro can then be run from the command line as: | |
' C:\path\to\Msaccess.exe "C:\path\to\database.accdb" /x "MACRO NAME" | |
Sub ExportTablesToCSV() | |
Const MyPath = "C:\ExportedTables\" | |
Dim db | |
Dim tdf | |
Dim objXl |
This file contains hidden or 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
# leblancfg, 4.01.2018 | |
# This script downloads the latest postgreSQL and postGIS | |
# Windows binaries and installs them embedded, i.e. without admin privileges. | |
# ----------------- | |
# For use with MinGW and Cygwin, | |
# Not tested. Use at your own risk. | |
# See https://gis.stackexchange.com/questions/41060/how-to-install-postgis-On-windows | |
SQLFN=postgresql-10.1-3-windows-x64-binaries.zip | |
GISFN=postgis-bundle-pg10-2.4.2x64.zip |