Skip to content

Instantly share code, notes, and snippets.

View justinhartman's full-sized avatar
🏠
Working from home

Justin Hartman justinhartman

🏠
Working from home
View GitHub Profile
@justinhartman
justinhartman / lz4-aliases.sh
Created March 6, 2023 16:14
Aliases for creating and extracting LZ4 archives
# Make an LZ4 archive
lz4make () {
tar -c - "${1}" | lz4 - "${1}.tar.lz4"
}
# Extract an LZ4 archive
lz4extract () {
pv "${1}" | lz4 -dc - | tar -x
}
@justinhartman
justinhartman / yarn-npm-replacement.md
Last active August 17, 2022 13:20
Replace NPM with Yarn as global package manager
@justinhartman
justinhartman / fireants-qt5-macos-build.md
Last active October 25, 2021 17:34
Fireants Qt5 macOS build

Build Fireants Qt5 macOS App

Berkley DB 6.2

The v1.0.0.0-g application uses Berkley DB 6.2.38 but there is no version of this to download off Oracle so I had to compile using 6.2.32. You can see my build of this version by viewing this gist

Building the App

With the current main branch cloned I have attempted to build the app with the following:

@justinhartman
justinhartman / compile-db-6.2.32-big-sur.md
Created October 25, 2021 14:00
Compile Berkley DB 6.2.32 on macOS Big Sur

Compile Berkley 6.2.32

There is no 6.2.38 version of DB to download off Oracle so I had to compile using 6.2.32.

Configure

$ wget http://download.oracle.com/berkeley-db/db-6.2.32.tar.gz
$ tar -zxf db-6.2.32.tar.gz
$ cd db-6.2.32/build_unix/
@justinhartman
justinhartman / 01_nginx-reload-post-hook.sh
Last active December 25, 2024 05:56
Let's Encrypt Certbot post hook command for Nginx which checks the updated configuration files and reloads the server if everything validates.
#!/usr/bin/env bash
#
# Certbot Nginx Reload
#
# Let's Encrypt Certbot post hook command for Nginx which checks the updated
# configuration files and reloads the server if everything validates.
#
# Author : Justin Hartman <[email protected]>
# Version : 1.0.1
# License : MIT <https://opensource.org/licenses/MIT>
@justinhartman
justinhartman / 01_introduction.md
Last active January 17, 2024 00:46
Setup Debian 10 LEMP Virtual Machine or Server

How To Install Nginx, MySQL, PHP, Redis and more on a Debian 10 Virtual Machine

This series of documents will configure and setup a Nginx, MySQL, and PHP (LEMP) server on a pretty feature-rich VM running Debian. I used a VM with 8GB RAM and 4 CPU Cores so YMML with some of the settings below.

This will also install other useful packages and configurations like, Redis, Memcached, Node, NPM, Composer, and a fully automated SSL service using certbot for Let's Encrypt.

@justinhartman
justinhartman / .bash_aliases
Last active March 8, 2023 12:47
Bash Aliases and Colours
# Bash
alias ls='ls --color=always'
alias ll='ls -lh --color=always'
alias la='ls -lha --color=always'
alias ..='cd ..'
alias ...='cd ...'
alias ....='cd ....'
# Apt
alias apt-update='sudo apt update'
alias apt-upgrade='sudo apt update && sudo apt upgrade'
@justinhartman
justinhartman / 0_introduction.md
Last active July 11, 2023 08:23
Setup Azure Ubuntu 18.04 LEMP VM

How To Install Nginx, MySQL, PHP, SFTP on an Ubuntu Azure Virtual Machine

This series of documents will configure and setup a Nginx, MySQL, and PHP (LEMP) server on a basic Standard B1s (1 vcpus, 1 GiB memory) Ubuntu 16.04 or 18.04 LTS Virtual Machine on Microsoft Azure.

This will also install other useful packages and configurations for SFTP and a fully automated SSL service using certbot for Let's Encrypt.

The B1s is Azure's entry level Linux VM and only comes with 1 GiB memory so

@justinhartman
justinhartman / lc-locale-fix.markdown
Last active August 16, 2020 21:07
Fix perl: warning: Setting locale failed.

How to fix the Perl setting locale failed

This is a massive bug that happens almost every time I install a new server. It's because I use a non-standard US locale so I always get conflicts. This fixes this issue.

Warning Message

The warning message during the installation of Perl applications will appear as follows:

justin:~$ sudo apt install something
@justinhartman
justinhartman / Open Source License Files.md
Last active July 9, 2020 17:00
Available licenses for the .github boilerplate template project.

Open Source License Files

These are all the available licenses to use with the [.github boilerplate template][project] project.

templates/_licenses
├── afl-3.0.txt
├── agpl-3.0.txt
├── apache-2.0.txt
├── artistic-2.0.txt