Skip to content

Instantly share code, notes, and snippets.

View xiaoliu's full-sized avatar

xiaoloaix xiaoliu

  • Sydney, Australia
  • 10:18 (UTC +11:00)
View GitHub Profile
@xiaoliu
xiaoliu / marketing_price_range.js
Last active March 13, 2025 12:14
Userscript: Marketing Price Range for realestate.com.au
// ==UserScript==
// @name Marketing Price Range for REA
// @namespace userscript.realestatecomau.com
// @version 0.1(20250313)
// @description Shows the embeded marketing price range for a property or rental
// @author xiaoliu
// @include https://www.realestate.com.au/*
// @include https://realestate.com.au/property*
// @icon https://www.google.com/s2/favicons?sz=64&domain=realestate.com.au
// @grant none
@xiaoliu
xiaoliu / install_docker.sh
Created November 20, 2024 13:20
Install docker on Debian
#! /bin/bash
# https://docs.docker.com/engine/install/debian/
sudo apt-get update && sudo apt-get -y install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
@xiaoliu
xiaoliu / letsencrypt-guide-nginx-acme.sh.md
Created November 13, 2024 22:47 — forked from dorelljames/letsencrypt-guide-nginx-acme.sh.md
SSL via Let's Encrypt (nginx server)

Nginx SSL via Let's Encrypt and acme.sh

This guide is intended to walk you through installation of a valid SSL on your server for your site at example.com. This example is using root user, you may need to use sudo if you encounter problems such as write permissions.

Pre-requisites

  • Install acme.sh on your server. This will create a acme.sh folder in your home directory and more importantly create an everyday cron job to check and renew certificates if needed.
  • Install nginx server (different per distibution so just make sure you have it up and running)
@xiaoliu
xiaoliu / remove_dock_icons.sh
Created July 17, 2024 23:18
Removes all app icons from the dock in macOS
#! /bin/bash
# tested on macOS Sonoma 14.5
defaults write "com.apple.dock" "persistent-apps" -array; killall Dock
@xiaoliu
xiaoliu / database.py
Created April 17, 2024 07:32 — forked from goldsborough/database.py
Python Sqlite3 wrapper
###########################################################################
#
## @file database.py
#
###########################################################################
import sqlite3
###########################################################################
#