Skip to content

Instantly share code, notes, and snippets.

View npodonnell's full-sized avatar
🎯
Focusing

npodonnell npodonnell

🎯
Focusing
View GitHub Profile
@npodonnell
npodonnell / rust-crash-course.md
Last active January 19, 2023 11:06
Rust Crash Course

Rust Crash Course

N. P. O'Donnell, 2020 - 2023

Commands

rustup (Rust updater)

Show rustup version (not Rust version):

@npodonnell
npodonnell / rename-repo.sh
Last active February 6, 2021 16:29
Renames a named git repo on the server side
#!/usr/bin/env sh
# rename-repo
# Renames a named git repo on the server side
# N. P. O'Donnell, 2020
REPO_BASE=/git
REPO_OLD_NAME=$1
REPO_NEW_NAME=$2
REPO_OLD_DIR=$REPO_BASE/$REPO_OLD_NAME.git
REPO_NEW_DIR=$REPO_BASE/$REPO_NEW_NAME.git

Docker Compose Cheatsheet

N. P. O'Donnell, 2020

Facts about Docker Compose

  • Docker Compose is not a part of Docker
  • Consists of 2 parts: CLI and .yaml files
  • Deals in services (a service is comprised of several containers)
  • Default compose file is docker-compose.yml but any filename may be used
  • First line of compose file is version, but compose file version does not correspond to docker compose version.
@npodonnell
npodonnell / docker_ubuntu_setup.md
Last active February 9, 2021 00:11
Docker Ubuntu Install

Docker Ubuntu Setup

N. P. O'Donnell, 2020

Preparing a Ubuntu host for docker. Ensures an nginx image can run on port 80.

Install docker:

sudo apt-get update
sudo apt-get install docker.io
@npodonnell
npodonnell / docker_cheatsheet.md
Last active September 13, 2021 21:12
Docker Cheatsheet

Docker Cheatsheet

N. P. O'Donnell, 2020

Files & Directories

  • Containers are stored in /var/lib/docker/containers
  • Easiest to use su first if snooping around /var/lib/docker
  • Each container has a config.v2.json config file
@npodonnell
npodonnell / make-repo.sh
Last active December 29, 2021 14:03
Quickly Make Git Repos
#!/usr/bin/env sh
# make-repo
# Creates a bare, named git repo on the server side
# N. P. O'Donnell, 2020 - 2021
REPO_BASE=/git
REPO_NAME=$1
REPO_DIR=$REPO_BASE/$REPO_NAME.git
HOSTNAME=$(hostname)
@npodonnell
npodonnell / GnuOctaveCheatSheet.md
Last active September 10, 2021 18:12
GNU Octave Cheatsheet

GNU Octave Cheatsheet

Math

Simple Math

>> 1+2
ans =  3
>> 3-1
ans =  2
>> 4*5
@npodonnell
npodonnell / GradleCheatSheet.md
Last active April 19, 2020 02:19
Gradle Cheatsheet

Gradle Cheatsheet

Initalize Gradle in Root Dir (similar to git init):

gradle init

this will create some files:

  • build.gradle -- Gradle build script
  • settings.gradle -- Gradle settings script
Monitor outgoing DNS traffic:
```
tcpdump -vvAs0 port 53
```