Skip to content

Instantly share code, notes, and snippets.

:shipit:
p̰͍͖̄̀ͬ̒̎̅a̲͚̯̱̺͗̿̓̆͊̀͌ǘ̳̹͙͔̘̈ͭ̋̒ͭ̋lͫ̔ͯ̂ ͎͖͍̤ͣͧ̀ͨj̾o̹̗͍̲̽ͥ́̊͐b̪ͬͪͫ̂s̙̫͕̼̭͛̍̔on̽

Paul Jobson pjobson

View GitHub Profile
@pjobson
pjobson / remove_usb_guard.md
Last active Apr 18, 2019
Remove USB Guard From Ubuntu
View remove_usb_guard.md

Remove USB Guard From Ubuntu

If you're a sucker like me and installed usbguard on a Ubuntu variant you may find that you will have access to none of your usb devices at all, because F you. The installer automatically sets up the daemon which has no rules so will just block all of your devices. Doing a basic apt remove usbguard may fail at 25%, because also F you.

My kernel is version 4.15.0-47-generic, not sure if this stopped working at some point or what.

Regain Access

sudo echo "allow id *:*" > /etc/usbguard/rules.conf
sudo sed -i 's/PresentDevicePolicy=apply-policy/PresentDevicePolicy=allow/' /etc/usbguard/usbguard-daemon.conf
@pjobson
pjobson / openwrt-on-x86_64.md
Last active Apr 13, 2019
OpenWRT on x86_64
View openwrt-on-x86_64.md

OpenWRT on x86_64

This is a very brief tutorial on getting OpenWRT installed on a regular computer, it assumes you know your way around Linux. If you find this and need additional details, please like, subscribe, and comm... oh wait this isn't youtube, just comment.

This is how I got OpenWRT going on a Mini ITX Intel DH67CF with an Intel G870 CPU with 4GB of RAM.

What You'll Need

  • 2 USB Sticks
  • Linux Live ISO
@pjobson
pjobson / screentearing.txt
Created Mar 22, 2019
Reduce Screen Tearing XFCE
View screentearing.txt
apt install composer
apt install python-pyqt5
git clone https://github.com/xircon/wm-switcher.git
./wm-switcher/wm-switcher
Set to XFCE + Composer
@pjobson
pjobson / limit_cpu.md
Created Mar 13, 2019
Limit CPU Usage Linux
View limit_cpu.md
sudo apt install cpulimit
ps aux |grep process_name
sudo cpulimit --pid ###### --limit 20 --background
@pjobson
pjobson / pike_it.md
Last active Mar 14, 2019
Asus Pike 2008 IT Mode Cross Flash
View pike_it.md

Flashing Asus 2008 PIKE to IT Mode

Used on an Asus Z8PE-D18 board with no EFI boot options. These instructions were written using Linux Mint to create the media, most distributions will work with little modification.

The PIKE 2008 is basically a LSI 9220-8i which you can flash with 9211-8i firmware. Flashing to IT mode allows you to have direct access to the disks to use btrfs or zfs or some kind of software RAID instead of the card's RAID.

Motherboards which support PIKE 2008.

  • Z8PH-D12 SE/QDR
  • Z8PH-D12/IFB
@pjobson
pjobson / PLEX-PreRoll-Generator.sh
Created Feb 22, 2019
Generates the PLEX "Cinema Trailers pre-roll video" String from a Specified Path
View PLEX-PreRoll-Generator.sh
#!/bin/bash
# YOUR PREROLL PATH
PREROLLPATH="/path/to/your/prerolls/"
# YOUR TOKEN
PLEXTOKEN="XXXXXXXXXXXXXXXXXXXX"
# FIND IN THIS PATH FOR FILES
IFS=$'\n' LIST=( $(find ${PREROLLPATH} -type f) )
@pjobson
pjobson / deluge.sh
Last active Mar 23, 2019
init.d script for starting deluged and deluge-web together
View deluge.sh
#!/bin/sh
# Install:
# sudo curl https://gist.githubusercontent.com/pjobson/f749e6654e5432c2f3a73fc421bc4a6b/raw/10de8e38f7bf03c5854b63ac863e268cdce4352c/deluge.sh > /etc/init.d/deluge
# sudo chmod +x /etc/init.d/deluge
# Edit /etc/init.d/deluge changing your user to whatever.
# sudo mv /etc/init.d/deluged ~
# Start Service
# sudo /etc/init.d/deluge start
# sudo /etc/init.d/deluge status
# Stop Service
@pjobson
pjobson / force-scrollbars-visible.css
Created Jan 8, 2019 — forked from IceCreamYou/force-scrollbars-visible.css
Mac OS X hides scrollbars by default. This is annoying for UI design because it means users might not realize that certain areas are scrollable. This public domain Gist forces the scrollbar to always be visible with native behavior in Webkit-based browsers (Chrome and Opera) on Macs.
View force-scrollbars-visible.css
.force-show-scrollbars ::-webkit-scrollbar-track:vertical {
border-left: 1px solid #E7E7E7;
box-shadow: 1px 0 1px 0 #F6F6F6 inset, -1px 0 1px 0 #F6F6F6 inset;
}
.force-show-scrollbars ::-webkit-scrollbar-track:horizontal {
border-top: 1px solid #E7E7E7;
box-shadow: 0 1px 1px 0 #F6F6F6 inset, 0 -1px 1px 0 #F6F6F6 inset;
}
@pjobson
pjobson / plex_double_nat.md
Last active Dec 6, 2018
PLEX Double-NAT Setup
View plex_double_nat.md

PLEX Double-NAT Setup

In the PLEX Troubleshooting Remote Access they have a small section on setting up for Double-NAT, but don’t really get into how to actually do it. In my network I am using a Double-NAT setup with FIOS.

I use the FIOS AC1750 router from which I run an ethernet connection to a Buffalo WZR-HP-AG300H running OpenWRT to which I have my PLEX server and other internet devices connected.

Network Diagram

Here’s a simple diagram of my network.

@pjobson
pjobson / headless_virtualbox.md
Last active Apr 17, 2019
VirtualBox Headless Ubuntu/Mint
View headless_virtualbox.md

VirtualBox Headless Ubuntu/Mint with phpVirtualBox

I had a lot of trouble setting this up, the guides out there don't seem complete. I used various guides and troubleshooting sites to get all of this figured out.

NOTE: My server's internal IP address is 10.10.10.100, you will need to substitute yours where appropriate.

Software Versions Used

  • Server Side
You can’t perform that action at this time.