Skip to content

Instantly share code, notes, and snippets.

Avatar

Will Sams WillSams

View GitHub Profile
@WillSams
WillSams / ubuntu-postgres.sh
Last active Sep 28, 2020
Getting Postgres up & running
View ubuntu-postgres.sh
!#/bin/sh
sudo bash -c "apt update && apt upgrade -y"
sudo bash -c "apt install curl ca-certificates gnupg"
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
. /etc/*release; OS=$ID
if [ "$OS" == 'ubuntu' ]; then
@WillSams
WillSams / ipvanish_on_raspberry_pi.sh
Last active Sep 10, 2020
Set up IPVanish on Raspberry PI 3
View ipvanish_on_raspberry_pi.sh
# This script is designed to execute via the shell. Download this script on
# your Pi, edit the user and passwd above, execute the following commands:
# chmod +x ipvanish_on_raspberry_pi.sh
# sudo ./ipvanish_on_raspberry_pi.sh
# Of course, you can use this script just as a reference and type everything out.
# Place your ip vanish username here. For example, IPVANISHUSER=picrazy
IPVANISHUSER=
IPVANISHPASSWD=
@WillSams
WillSams / mongodb-setup.sh
Last active Aug 18, 2020
Simple MongoDB Setup Script for Ubuntu 18.04
View mongodb-setup.sh
#!/bin/bash
#
# MongoDB script
#
# Pre-req: Ubuntu Bionic (18.04) flavored distro
# Note: To expose your server to the network, set bind to 0.0.0.0 in /etc/mongod.conf
#
# Recommended for first time users: create a VM, ssh into it, 'wget' the raw version of this gist.
@WillSams
WillSams / new_box_extras.sh
Last active Jul 24, 2020
Fresh Debian-Based Install Script + Retroarch & Emulation Station
View new_box_extras.sh
#!/bin/bash
echo "==================================================================="
echo
echo " Fresh Debian-Based Extras Install Script "
echo " You may be prompted for root credentials to complete the install. "
echo
echo "==================================================================="
SCRIPTVERSION="2020.07.24-Debian"
@WillSams
WillSams / pyenv-install.sh
Last active Jul 4, 2020
Getting Pyenv Running Under MSys2 on Windows
@WillSams
WillSams / m68k_dev_setup.sh
Last active Jun 11, 2020
Setup for Motorola 68000 (Sega, Neo Geo) Cross Compiler on Windows-based System
View m68k_dev_setup.sh
#!/bin/bash
echo "==================================================================="
echo
echo " My m68000 Development Setup "
echo " You may be prompted by UAC for credentials to complete the install "
echo
echo " Pre-req: Latest 64-bit MSYS2 from http://www.msys2.org/ "
echo
echo " Howto: Use 'wget' to download the raw version of this script "
@WillSams
WillSams / main.py
Last active Jun 10, 2020
MonoGame w/ IronPython Example
View main.py
import os, clr
clr.AddReferenceToFile("MonoGame.Framework.dll")
clr.AddReferenceToFile("OpenTK.dll")
from Microsoft.Xna.Framework import *
from Microsoft.Xna.Framework.Graphics import *
class App(Game):
def __init__(self):
self.graphics = GraphicsDeviceManager(self)
@WillSams
WillSams / install-tplink-archer.sh
Created Jun 10, 2020
Install tp-link AC1300 High Gain Wireless (T4U version 3) on Debian
View install-tplink-archer.sh
@WillSams
WillSams / cloning_big_drive.md
Last active May 29, 2020
Cloning large hard drives
View cloning_big_drive.md
  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/loop0
@WillSams
WillSams / es_systems.cfg
Last active May 7, 2020
Retropie example es_systems.cfg
View es_systems.cfg
<?xml version="1.0"?>
<systemList>
<system>
<name>3do</name>
<fullname>3DO</fullname>
<path>/home/pi/RetroPie/roms/3do</path>
<extension>.cue .chd .m3u .iso .CUE .CHD .M3U .ISO</extension>
<command>/opt/retropie/emulators/retroarch/bin/retroarch -L /opt/retropie/libretrocores/lr-opera/opera_libretro.so %ROM%</command>
<platform>3do</platform>
<theme>3do</theme>
You can’t perform that action at this time.