Skip to content

Instantly share code, notes, and snippets.

@edmondchuc
edmondchuc / docker_cheatsheet.md
Created March 6, 2019 22:26
Docker cheatsheet - docker, docker-compose

docker info or docker version or docker --version - Get the version of Docker on the system.

docker run <image-name> - Run a Docker image locally if it exists, else pull from Docker Hub.

docker image ls - List Docker images.

docker container ls - List Docker containers - running, all, all in quiet mode

docker container ls --all

@edmondchuc
edmondchuc / deploy_sss_pyldapi.sh
Last active December 11, 2018 05:56
deploy pyldapi sss
#!/usr/bin/env bash
#
# This is a deployment script for the Sites, Samples and Surveys Linked Data API at Geoscience Australia.
#
# update apt packages
sudo apt update
sudo apt upgrade -y
@edmondchuc
edmondchuc / sublime-ubuntu-install.sh
Last active November 30, 2018 01:06
Sublime3 install script for Ubuntu 16.04 and newer.
#!/usr/bin/env bash
# Reference: http://tipsonubuntu.com/2017/05/30/install-sublime-text-3-ubuntu-16-04-official-way/
# Get the repository and add it to sources
sudo echo Installing Sublime3 ...
printf 'Fetching package ... '
echo Done
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -
echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
@edmondchuc
edmondchuc / star-lp.md
Last active July 11, 2024 14:21
A STAR-LP reflection on one of my tasks while working on the Location Index project at CSIRO.

STAR-LP Example

I worked as a core software developer in the technical team of the Location Index project. The team consisted of 3 members; a senior scientific researcher who was also our technical lead, a senior software developer and myself.

I was assigned the task to expose the Bureau of Meteorology's Geofabric dataset as a Web Feature Service (WFS) as well as a Web Map Service (WMS). The WMS was required to overlay the features of the Geofabric on top of a styled map of Australia.

My first step was to import the Geofabric dataset into a PostgreSQL datastore. I then set up a Geoserver instance to symbolically link to the PostgreSQL datastore. To fulfil the requirement of a styled map, I imported OpenStreetMap data of Australia into the PostgreSQL datastore and styled it in CSS so that it looked like Google Maps. I was then able to contruct layers in Geoserver and serve them via WFS and WMS endpoints. Issues arose when the WMS was embedded inside HTML iframes due to CORS rules. This issue could not b

@edmondchuc
edmondchuc / postgres.md
Last active November 30, 2018 00:36
PostgreSQL commands. Tags: postgres

Common PostgreSQL commands

Log in as a user

sudo -u username psql

List databases

\l

Connect to a database

\c databasename

#!/usr/bin/env bash
# ======================================
# CKAN Scheming Extension Install Script
# ======================================
#
# Author: Edmond Chuc
# Email: [email protected]
#
#
#!/usr/bin/env bash
# ==================================
# CKAN DCAT Extension Install Script
# ==================================
#
# Author: Edmond Chuc
# Email: [email protected]
#
#
#!/usr/bin/env bash
# =======================================
# CKAN FileStore Extension Install Script
# =======================================
#
# Author: Edmond Chuc
# Email: [email protected]
#
#
@edmondchuc
edmondchuc / ckan-install.sh
Last active November 25, 2018 00:17
This script gives you a bare-bones CKAN instance with the DataStore plugin using PostgreSQL, Apache Solr for CKAN search and a sysadmin account.
#!/usr/bin/env bash
# ========================
# CKAN Installation Script
# ========================
#
# Author: Edmond Chuc
# Email: [email protected]
#
#