Skip to content

Instantly share code, notes, and snippets.

View mustdobetter's full-sized avatar

Jamie Saunders mustdobetter

View GitHub Profile
@npearce
npearce / install-docker.md
Last active April 19, 2024 12:35
Amazon Linux 2 - install docker & docker-compose using 'sudo amazon-linux-extras' command

UPDATE (March 2020, thanks @ic): I don't know the exact AMI version but yum install docker now works on the latest Amazon Linux 2. The instructions below may still be relevant depending on the vintage AMI you are using.

Amazon changed the install in Linux 2. One no-longer using 'yum' See: https://aws.amazon.com/amazon-linux-2/release-notes/

Docker CE Install

sudo amazon-linux-extras install docker
sudo service docker start
@KartikTalwar
KartikTalwar / Documentation.md
Last active April 13, 2024 23:09
Rsync over SSH - (40MB/s over 1GB NICs)

The fastest remote directory rsync over ssh archival I can muster (40MB/s over 1gb NICs)

This creates an archive that does the following:

rsync (Everyone seems to like -z, but it is much slower for me)

  • a: archive mode - rescursive, preserves owner, preserves permissions, preserves modification times, preserves group, copies symlinks as symlinks, preserves device files.
  • H: preserves hard-links
  • A: preserves ACLs
@seanhandley
seanhandley / docker-compose.yml
Last active April 9, 2024 04:05
How To Set Up Docker For Mac (Mojave) with Native NFS
version: '2'
services:
api:
volumes:
- "nfsmount:${CONTAINER_DIR}"
volumes:
nfsmount:
driver: local
driver_opts:
@wadey
wadey / iterm2.zsh
Last active March 10, 2024 00:32
Change iTerm2 tab color when using SSH
# Usage:
# source iterm2.zsh
# iTerm2 tab color commands
# https://iterm2.com/documentation-escape-codes.html
if [[ -n "$ITERM_SESSION_ID" ]]; then
tab-color() {
echo -ne "\033]6;1;bg;red;brightness;$1\a"
echo -ne "\033]6;1;bg;green;brightness;$2\a"
@BugRoger
BugRoger / ssh-background
Created January 21, 2011 16:02
Changes iTerm2's background color based on host configuration
#!/bin/bash
# Installation:
# 1. Save this script to /some/bin/ssh-background
# 2. chmod 755 /some/bin/ssh-background
# 3. alias ssh=/some/bin/ssh-background
# 4. Configure your host colors below.
set_color() {
local HEX_FG=$1
local HEX_BG=$2
@wsakaren
wsakaren / install_mag2_db_cli
Created July 30, 2015 08:36
Install Magento 2 Merchant Beta with database - quick route via command line
cd htdocs
composer create-project magento/community-edition magento2 1.0.0-beta --prefer-dist
create db (see details below)
Edit setup/index.php && index.php and add this - ini_set('xdebug.max_nesting_level', 200);
bin/magento setup:install --base-url=http://127.0.0.1/magento2/ \
--db-host=localhost --db-name=magento --db-user=magento --db-password=magento \
--admin-firstname=Magento --admin-lastname=User --admin-email=user@example.com \