Skip to content

Instantly share code, notes, and snippets.

View kmanwar89's full-sized avatar

Kadar Anwar kmanwar89

  • Durham, NC
View GitHub Profile
@kmanwar89
kmanwar89 / cheatsheet.md
Last active December 19, 2021 21:16
Docker Cheatsheet

About: I created a cheatsheet for my own reference as I'm learning about Docker. I found myself often looking up the same commands multiple times and thought to write it all down. Hopefully this helps others!

Information gathering

docker ps -a or docker container list - List all containers

docker ps -aq - List all container ID's

  • This command is useful because it can be called as a variable $(docker ps -aq) and fed into other commands (such as docker stop or docker rm

docker image list - List all docker images

@kmanwar89
kmanwar89 / ssh_fix_gns3.txt
Last active November 2, 2021 20:52
Fixing SSH GNS3 Docker Ubuntu/Network Automation Appliance
Using GNS3 2.2.26 on a Kubuntu Linux host, I discovered that the Network Automation appliance (which is an extremely slimmed-down Docker container of Ubuntu 20.04.3 LTS) does not allow SSH out of the gate.
To fix this, I did the following:
- Ensure the device is reachable (assign a static IP)
- Install SSH (apt install openssh-client openssh-server)
- Edit the /etc/ssh/sshd_config file and
1) un-comment the line 'ListenAddress 0.0.0.0'
2) Search for "PermitRootLogin" and change from "PermitRootLogin prohibit-password" to "PermitRootLogin yes"
a. CAVEAT - This is NOT SECURE, obviously, but given this is a sandboxed/lab environment with no critical services running, it should be OK. This should *never* be done in a production environment, ever ever ever ever ever!!!
@kmanwar89
kmanwar89 / netbox_ubuntu_server2004
Created March 4, 2021 18:28
NetBox Installation Ubuntu Server 20.04.1
This gist contains instructions on how to install NetBox on a vanilla installation of Ubuntu server. The official documentation has some steps missing, and some steps out of order.
OS: Windows 10 Pro x64
Software: VMWare Workstation Pro 16
VM OS: Ubuntu Server 20.04.2 LTS
# DISCLAIMER
This installation is *not* secure, intentionally. I simply wanted to get it running and write a guide in my own flavor. I found a few issues in the official documentation that are addressed in this guide and will be fed back to the documentation maintainers.
# Install SSH & Postgres
sudo apt-get install openssh-server postgresql libpq-dev -y
@kmanwar89
kmanwar89 / chirp-install-ubuntu.txt
Created November 19, 2020 15:00
Install CHIRP on Ubuntu 20.04 - Workaround
Source: https://dw1zws.com/how-to-install-chirp-on-ubuntu-20-04/
I found some of the steps did not work for me on Ubuntu 20.04, so I made my own gist below. This has been tested on both my laptop and desktop running 20.04, both fresh/recent installs.
--------------------------------------------------------
To install Chirp on Ubuntu Linux 20.04 as of 19 NOV 2020
--------------------------------------------------------
1) Edit the apt sources to change "Focal" to "Xenial"
a. sudo nano /etc/apt/sources.list.d/dansmith-ubuntu-chirp-snapshots-focal.list
b. Change "Focal" to "xenial"
@kmanwar89
kmanwar89 / qmk_questions_wishlist.txt
Created February 13, 2019 13:27
CRKBD/QMK Questions/Wishlist
Desired layout:
No color - Base layer - QWERTY
Red - Modifier layer - !@#$%^&*() symbols, modifiers
Green - Media layer - media controls
Blue - Gaming layer - layout modified for League of Legends, and other games
Purple - LED Layer - layout for controlling underglow & RGB
Orange - Passwords layer
White - Cisco layer - momentary toggle this layer, where certain keys will have certain command macros bound (sh ip int brief, sh log | ex SSH2, sh int desc, sh ip bgp summ, sh ip eigrp neigh, etc)
Yellow - Linux layer - VIM keymappings, other keystrokes and combinations that are specific to Linux (Ubuntu w/ Unity, Arch)
sudo nano /usr/share/wireshark/init.lua
change run_user_scripts_when_superuser = false to
change run_user_scripts_when_superuser = true
and then change the if condition
if running_superuser then to
if not running_superuser then