Skip to content

Instantly share code, notes, and snippets.

View hmerritt's full-sized avatar

Harry Merritt hmerritt

View GitHub Profile
@hmerritt
hmerritt / traefik-help.txt
Created July 2, 2022 20:19
Traefik command line arguments (docker run traefik:v2.8 --help)
traefik Traefik is a modern HTTP reverse proxy and load balancer made to deploy microservices with ease.
Complete documentation is available at https://traefik.io
Usage: traefik [command] [flags] [arguments]
Use "traefik [command] --help" for help on any command.
Commands:
healthcheck Calls Traefik /ping endpoint (disabled by default) to check the health of Traefik.
version Shows the current Traefik version.
@hmerritt
hmerritt / ssh-keygen.md
Created January 9, 2021 03:25
Generate SSH keys

Generate SSH keys

Create a public and private key used for SSH authentication

ssh-keygen

This will create two files in your home directory ~/.ssh/:

  • id_rsa
  • id_rsa.pub

Copy contents of id_rsa.pub into ~/.ssh/authorized_keys on the remote server

@hmerritt
hmerritt / rsync.md
Created January 9, 2021 03:24
Linux rsync basic usage documentation

rsync

rsync -av <local path> <username@server>:<remove path>
rsync -av cat.jpg admin@192.168.0.10:/home/admin/images

Use SSH keys for password-less authentication

@hmerritt
hmerritt / tar.md
Created January 9, 2021 03:23
Linux tar basic usage documentation

tar

Archive

Create an archive

tar -cvf archive.tar /archive/path

Create a compressed archive

tar -czvf archive.tar.gz /archive/path
@hmerritt
hmerritt / README.md
Created September 17, 2020 23:39 — forked from akashnimare/README.md
A Beginners Guide to writing a Kickass README ✍

Project title

A little info about your project and/ or overview that explains what the project is about.

Motivation

A short description of the motivation behind the creation and maintenance of the project. This should explain why the project exists.

Build status

Build status of continus integration i.e. travis, appveyor etc. Ex. -

Build Status

@hmerritt
hmerritt / search--http-status-codes.php
Last active June 11, 2019 20:09
Function to search all http status codes in PHP
// search http status codes
// return the full status code from a partial match
function full_status_code($status)
{
// create array of status codes
// match status codes to their text
$statusCodes = [
@hmerritt
hmerritt / input.php
Last active April 19, 2019 15:12
Emulate python's input() function in PHP
// get user input when in php-cli
// emulate python's input() function
function input($msg)
{
// show the input message
echo $msg . ': ';