Skip to content

Instantly share code, notes, and snippets.

View thohng's full-sized avatar

Tho Ho thohng

View GitHub Profile
@thohng
thohng / script.sh
Created February 21, 2022 04:14 — forked from vielhuber/script.sh
PostgreSQL: Backup and restore export import pg_dump with password on command line #sql
# best practice: linux
nano ~/.pgpass
*:5432:*:username:password
chmod 0600 ~/.pgpass
# best practice: windows
edit %APPDATA%\postgresql\pgpass.conf
*:5432:*:username:password
# linux
@thohng
thohng / docker-configure-tls.sh
Created January 28, 2022 02:14 — forked from ivan-pinatti/docker-configure-tls.sh
Enable TLS in Docker service running in Ubuntu - #docker #docker-tls #tls #ubuntu
#!/usr/bin/env bash
: ' Script that enables TLS for Docker service in Ubuntu 16.x
This script is intended to be run as root
It;
- Generates the keys
- Creates the daemon.json Docker config file
@thohng
thohng / ttf-vista-fonts-installer.sh
Last active October 11, 2021 06:26 — forked from maxwelleite/ttf-vista-fonts-installer.sh
Script to install Microsoft Vista TrueType Fonts (TTF) aka Microsoft’s ClearType fonts on Ubuntu distros
#!/bin/bash
# Author: Maxwel Leite
# Website: http://needforbits.wordpress.com/
# Description: Script to install Microsoft Vista TrueType Fonts (TTF) aka Microsoft’s ClearType fonts on Ubuntu distros
# Microsoft added a group of new "ClearType Fonts" to Windows with Windows Vista and Office 2007.
# These fonts are named Constantia, Corbel, Calibri, Cambria (and Cambria Math), Candara, and Consolas.
# Calibri became the default font on Microsoft Word 2007, and it’s still the default font on Word 2016 today.
# Dependencies: wget, fontforge and cabextract
# Note: Microsoft no longer provides the PowerPoint Viewer 2007 (v12.0.4518.1014) or any version anymore for download
# Tested: Ubuntu Saucy/Trusty/Xenial/Bionic
@thohng
thohng / BootableUSB.md
Created January 14, 2021 01:56 — forked from andrewbutman/BootableUSB.md
Making Bootable Windows USB through DOS and DISKPART

Insert USB Flash drive

4GB or higher for Windows 7 and above

Open cmd prompt as admin

Right click start menu, click command prompt (admin)

Run diskpart

diskpart

Run list disk