Skip to content

Instantly share code, notes, and snippets.

Avatar

Alan Kay AjkayAlan

View GitHub Profile
View MikrotikhEXSSetup.md

Quickstart

  • Plug WAN into eth1, LAN into eth2
  • Boot up, go to 192.168.88.1. Login with default creds.
  • Webfig -> System -> Packages -> IPv6 -> Enable. Reboot.
  • Webfig -> System -> Reset Configuration. Wait for the reboot.
    • This makes it so you get good IPv6 firewall rules by default
  • In Quick Set:
    • Ensure Port is Eth1
    • Ensure Address Acquisition is Automatic
@AjkayAlan
AjkayAlan / OpenWrtSnapshotSetupX86.sh
Last active Nov 28, 2021
Setup OpenWrt Snapshots on my x86 machine
View OpenWrtSnapshotSetupX86.sh
# Sign into the router
ssh root@192.168.1.1
# Set vars
DOWNLOAD_LINK="https://downloads.openwrt.org/snapshots/targets/x86/64/openwrt-x86-64-generic-squashfs-combined.img.gz"
SHA256SUMS="https://downloads.openwrt.org/snapshots/targets/x86/64/sha256sums"
# Get latest snapshot and install
cd /tmp
wget $DOWNLOAD_LINK
View RaspberryPiPiHoleUnifiControllerSetup.md

Prework

  1. Format your SD Card with FAT32 if <= 32GB, otherwise use exFAT
  2. Go to https://www.raspberrypi.org/downloads/raspberry-pi-os/ and the lite image, then unzip it
  3. Download https://www.balena.io/etcher/ and install it
  4. Use Etcher to write the downloaded image to the SD card
  5. Create a blank file named ssh into the boot partition to enable ssh with headless
  6. Put the SD card into your Raspberry Pi, plug it into ethernet, and power it on

SSH

View Ubuntu-IdeaPad-330-Setup.sh
# Plug into USB to Ethernet Adapter, and install drivers for RTL8821CE
sudo apt-get install --reinstall git dkms build-essential linux-headers-$(uname -r)
git clone https://github.com/tomaspinho/rtl8821ce
cd rtl8821ce
chmod +x dkms-install.sh
chmod +x dkms-remove.sh
sudo ./dkms-install.sh
# Update everything
sudo apt-get update && sudo apt-get dist-upgrade -y
View VSCodeSetup.md

My VSCode Setup

Install needed CLI tools

pip install flake8
pip install autopep8

Install Extensions

@AjkayAlan
AjkayAlan / WSLWindows10Setup.md
Last active Jan 11, 2022
Windows SubSystem For Linux setup that I like with some developers stuff mixed in
View WSLWindows10Setup.md

Setting Up WSL

Install A Distro:

  1. Run the following in powershell as admin Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

  2. Install a distro (ex: Ubuntu 18.04 LTS - https://www.microsoft.com/store/apps/9N9TNGVNDL3Q)

  3. Open your distro you installed via the start menu, let it setup

  4. Update and upgrade

sudo apt-get update
@AjkayAlan
AjkayAlan / RaspberryPiDevSetup.sh
Last active Nov 17, 2021
Setup steps for my raspberry pi 3b+ for development
View RaspberryPiDevSetup.sh
## Getting image and Pi up and running
# Go to https://www.raspberrypi.org/downloads/raspbian/ and download an image, then unzip it
# Download https://www.balena.io/etcher/ and install it
# Plug in microsd card, Unzip the downloaded image and use Etcher to write the downloaded image to the SD card
# Edit boot/config.txt, and uncomment hdmi_force_hotplug=1 and hdmi_drive=2
# Plug the PI in, and go through to setup prompts
# Run the following commands in terminal
## Config stuff
sudo raspi-config
@AjkayAlan
AjkayAlan / UbiquitiERL3Setup.sh
Last active Jan 11, 2020
Setup for my basic settings with a Ubiquiti ERL 3 (EdgeRouter Lite 3)
View UbiquitiERL3Setup.sh
# Plug in ethernet to eth0, connect to laptop, and set static IP to 192.168.1.10, subnet mask 255.255.255.0
# TODO: Script this so I dont need to touch the gui
# Navigate to 192.168.1.1, login using ubnt for username and password
# Run basic setup wizard, and set the following settings:
### Internet Port: eth0
### DHCP
### Enable the default firewall
### Enable DHCPv6 Prefix Delegation, /56, default firewall
### LAN port: eth1, enable dhcp
### Set password to whatever you want
@AjkayAlan
AjkayAlan / OpenWrtRouterSetup.sh
Last active May 26, 2019
OpenWrtRouterSetup.sh
View OpenWrtRouterSetup.sh
# ssh
ssh root@192.168.1.1
# Install stuff I care about
opkg update
opkg install luci
opkg install luci-app-sqm
opkg install luci-app-upnp
# Set new password for root
@AjkayAlan
AjkayAlan / ChocoNewComputerSetup.ps1
Last active Oct 17, 2021
Installs Chocolatey and all the nice things I want
View ChocoNewComputerSetup.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
choco feature enable -n allowGlobalConfirmation
choco install googlechrome
choco install vlc
choco install microsoft-windows-terminal
choco install peazip
choco install vscode
choco install steam
choco install choco-upgrade-all-at --params "'/TIME:21:00'"
choco install origin