- Use obsidian-export to filter the obsidian Vault «source folder» that we want to publish into a «destination folder» also in the same Vault.
- Re-create Listings and Index page using the Templater plugin
- Export the «destination folder» in the Vault using the Webpage HTML Export plugin to a «to publish directory» (outside the Vault) that is going to be published in GitHub.
- Upload the content to GitHub in a repo with GitHub pages enabled.
Campaign | type | summary |
---|---|---|
CAMPAIGN |
PJ |
SUMMARY |
Culture: =this.culture
Calling: =this.calling
Cultural Blessing: =this.CulturalBlessing
Shadow Path: =this.ShadowPath
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 os | |
from osgeo import ogr, gdal | |
PG_CONN = { | |
'user': os.getenv('DATA_USER'), | |
'password': os.getenv('DATA_PWD'), | |
'port': os.getenv('DATA_PORT'), | |
'host': os.getenv('DATA_HOST'), | |
} |
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 OR REPLACE FUNCTION slugify("value" TEXT) | |
RETURNS TEXT AS $$ | |
WITH lowercased AS ( | |
SELECT lower(value) AS value | |
), | |
translated AS ( | |
SELECT translate( value, | |
'áàâãäåāăąèééêëēĕėęěìíîïìĩīĭḩóôõöōŏőùúûüũūŭůäàáâãåæçćĉčöòóôõøüùúûßéèêëýñîìíïş', | |
'aaaaaaaaaeeeeeeeeeeiiiiiiiihooooooouuuuuuuuaaaaaaeccccoooooouuuuseeeeyniiiis' | |
) AS value |
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
def __poly_decode_trans(value, index): | |
"""Transforms a GMaps Encoded polyline chunk back into numbers | |
Args: | |
value: chunk of the GMaps polyline | |
index: position in the chunk | |
Returns: | |
chunk as a number | |
""" |
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
set number | |
set numberwidth=5 | |
set nocompatible " be iMproved, required | |
set backspace=indent,eol,start " Backspace for dummies | |
set linespace=0 " No extra spaces between rows | |
set showmatch " Show matching brackets/parenthesis | |
set incsearch " Find as you type search | |
set hlsearch " Highlight search terms | |
set winminheight=0 " Windows can be 0 line high | |
set ignorecase " Case insensitive search |
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
find . -name "*.shp" | sort > shps.txt | |
# In this case: the name of the country is the first word of the shape name and after there is a number | |
sed -ie 's/^\.\/\([a-z_-]*\)_\([0-9]\)/\1,.\/\1_\2/' shps.txt | |
cat shps.txt | header -a cname,shape > shapes.txt | |
csvcut -c 1 shapes.txt | uniq | sort > countries.txt | |
# This works only in Mac | |
pbcopy < countries.txt | |
# Match the countries with the isocodes | |
csvjoin -c cname countries.txt shapes.txt | csvcut -c 1,3 > isoshapes.csv | |
# ZSH to read a file |
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
# coding: utf-8 | |
import requests | |
import json | |
import os | |
base_url = 'https://www.humblebundle.com/api/v1/order/{download_key}' | |
# Get this one from the bundle page url | |
download_key = '' |
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
## Stolen from http://www.obeythetestinggoat.com/how-to-get-selenium-to-wait-for-page-load-after-a-click.html | |
class wait_for_page_load(object): | |
def __init__(self, browser): | |
self.browser = browser | |
def __enter__(self): | |
self.old_page = self.browser.find_element_by_tag_name('html') |
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
# coding: utf-8 | |
import pandas as pd | |
import numpy as np | |
import yaml | |
# ## Input data file | |
venues_filename = 'venues.csv' |
NewerOlder