Skip to content

Instantly share code, notes, and snippets.

View WillSams's full-sized avatar
🚀

Will Sams WillSams

🚀
View GitHub Profile
@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 / 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 / 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 / pyenv-install.sh
Last active July 4, 2020 12:04
Getting Pyenv Running Under MSys2 on Windows
#!/bin/bash
@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 / 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
sudo apt install git cmake
git clone https://github.com/ptitSeb/box86.git
cd box86
mkdir build && cd build && cmake .. -DRPI4=1 && make install
Github deleting scripts?
Can't find my original linux-devel-setup.sh. Damn.
@WillSams
WillSams / Makefile
Created April 17, 2020 23:21
Sonic 1 Disassembly Makefile
# This is a makefile for Andy Grind's Sonic 1 disassebly fork (https://github.com/andwn/s1disasm)
# and works with the Linux/Windows toolchain creaed from my script:that works with my toolchain.
# Script for my Linux toolchain -> https://gist.github.com/WillSams/c4cbf6235b467d8b595693969342237e
# Script for my Windows toolchain -> https://gist.github.com/WillSams/f592f9d494b51119945440f7e91079b0
GENDEV=/opt/m68k
AS = $(GENDEV)/bin/m68k-elf-as
LD = $(GENDEV)/bin/m68k-elf-ld
@WillSams
WillSams / nuget.md
Last active April 19, 2020 13:03
.NET Core Create & Use Local .Nuget Package (/w content)

Hard to find good information on the Interwebs about this. See below on how to do this correctly:

  <PropertyGroup>
    <TargetFramework>netcoreapp2.2</TargetFramework>
    <PackageId>Otter</PackageId>
    <Version>0.9.6-20200417</Version>
    <IncludeAssets>all</IncludeAssets>
  </PropertyGroup>