Skip to content

Instantly share code, notes, and snippets.

View WillSams's full-sized avatar
🚀

Will Sams WillSams

🚀
View GitHub Profile
sudo apt install git cmake
git clone https://github.com/ptitSeb/box86.git
cd box86
mkdir build && cd build && cmake .. -DRPI4=1 && make install
@WillSams
WillSams / cloning_big_drive.md
Last active February 15, 2021 16:12
Cloning large hard drives
  1. Use built in gnome-disks app to create the partition image.
  2. Note the size of actual contents. I.e., for the 500GB partition you just cloned, the actual contents might have been only 20 GB. We'll use this number to make sense of the 'truncate' command in step 3.
  3. Force partition size of actual contents:
sudo modprobe loop
sudo losetup -f  # use the loop device returned.  For this example, we'll use /dev/loop1
sudo losetup /dev/loop1 my-mintbox.img
sudo partprobe /dev/loop1  
sudo gparted /dev/loop1    # while in gparted, unmount /dev/loop1 and re-size by moving slider all the way to size of actual contents.  Apply!
sudo losetup -d /dev/loop1
@WillSams
WillSams / install-tplink-archer.sh
Created June 10, 2020 07:53
Install tp-link AC1300 High Gain Wireless (T4U version 3) on Debian
@WillSams
WillSams / pyenv-install.sh
Last active July 4, 2020 12:04
Getting Pyenv Running Under MSys2 on Windows
#!/bin/bash
@WillSams
WillSams / iam_user_codecommit_setup.md
Last active June 29, 2021 12:17
Setting Up IAM User for AWS CodeCommit

Setting up for AWS CodeCommit

Create a new IAM User for Developer to Use Striclty For Development

  1. Navigate to IAM within the AWS Console.
  2. Create a new user. For this example instructions, we'll set the username to be test-user-dev. For AWS access type, just check the Programmatic access checkbox.
  3. Create a new group to use for developers to have access to one or more repositories. For this example, we'll create a new group called dev-team. Attach the AWSCodeCommitPowerUser policy to this new group.
  4. Click through the other defaults to create the new user.

Generate a new key

@WillSams
WillSams / simple_etl.sh
Last active September 17, 2021 09:01
Simple ETL example In Python Using PETL
#!/bin/sh
# Simple ETL example
# Just extracting one table from a database and loading it into another
# Adapted from https://www.linkedin.com/pulse/easy-etl-python-beginners-oscar-valles
# Pre-req is Docker. If you are a savage and haven't used Docker yet, here are the install instructions on any disto with Ubuntu as the base:
# . /etc/os-release; RELEASE=$UBUNTU_CODENAME
@WillSams
WillSams / amd_on_linux.sh
Last active March 11, 2022 13:44
AMD Radeon RX-6600 XT Graphics on Linux Mint
# Radeon 6000 series Graphics on Linux Mint
## Note: ensure nomodeset is not in your Grub config. Check/modify via `sudo bash -c "xed admin:///etc/default/grub"`.
## Note2: May have issues with games starting or saving to the cloud, such as Death Stranding. If that's the case, delete the data install. For example, for Death Stranding, execute "rm -rf ~/.steam/debian-installation/steamapps/compatdata/1190460"
## Todo: Need to -> purge amdgpu* as pre-caution?
sudo bash -c "add-apt-repository --remove ppa:oibaf/graphics-drivers" # just in case this is here, get rid of it
sudo bash -c "add-apt-repository ppa:kisak/kisak-mesa"
sudo bash -c "apt update && apt upgrade"
@WillSams
WillSams / fullstack_macbook_setup.sh
Last active November 15, 2022 19:32
Fullstack Macbook Setup
# March 11th, 2022 will be a day of infamy....
echo '# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi' >| ~/.bash_profile
echo 'set -o noclobber
PS1="\[\e]0;[email protected] \w\a\]${debian_chroot:+($debian_chroot)}\[\033[01;32m\][email protected]\[\033[00m\] \[\033[01;34m\]\w \$\[\033[00m\]"
' >> ~/.bashrc
@WillSams
WillSams / psx_dev_setup.sh
Last active December 11, 2022 20:17
Playstation 1 Dev Setup
#!/bin/bash
TEMPBUILDDIR=/tmp/psxbuild
GCCBUILDIR=$TEMPBUILDDIR/pkgs/gcc-build
BINUTILS_VERSION=2.39
GCC_VERSION=7.1.0
PSXDEV=/opt/toolchains/psx
@WillSams
WillSams / sh2_dev_setup.sh
Last active December 3, 2022 17:15
Saturn/32x Tool chain
#!/bin/bash
# I'm just going by what I've done before and the configuration flags found here:
# https://github.com/kentosama/sh2-elf-gcc/
TEMPBUILDDIR=/tmp/saturn
GCCBUILDIR=$TEMPBUILDDIR/pkgs/gcc-build
BINUTILS_VERSION=2.39
GCC_VERSION=7.1.0