Skip to content

Instantly share code, notes, and snippets.

View theodric's full-sized avatar
🎯
Shoobydoowop

þēodrīċ theodric

🎯
Shoobydoowop
View GitHub Profile
@davidfraser
davidfraser / Google Drive Sync Wine Scripting.md
Last active February 11, 2025 10:31
Google Drive Sync Wine Scripting

Google Drive Sync Wine Scripting

This is a set of scripts that help running Google Drive Backup and Sync under Wine, with multiple Google accounts.

Each account is given its own Wine prefix (a separate wine configuration).

To install, run install-gdrive-sync google_account

List the accounts set up in ~/.config/gdrive-accounts

@linuxsocist
linuxsocist / autodecode
Last active March 23, 2018 07:07
A collection of scripts I use for capturing and decoding LRPT signals automatically. (See comment for basic setup instructions).
#!/bin/bash
sFile=$(ls -tr S-files/*.s | tail -n 1)
outFile=$(echo ${sFile/.s/})
echo "====================" >> decode-log
./medet $sFile $outFile -r 65 -g 65 -b 64 -q >> decode-log
date +%Y-%m-%d_%H%M >> decode-log
exit 1
@adityaka
adityaka / grab-linux-kernel-url-from-kernelorg.md
Last active October 27, 2024 16:44
Get Latest linux kernel path from Kernel.org

How to get latest linux kernel using wget

Command

KERNEL_URI=$(wget http://kernel.org -O - | grep 'tar.xz' | head -1 | cut -d "=" -f2 | sed -e 's/\"//g' | sed -e 's/>.*//g')
KERNEL_FILE=KERNEL_FILE=$(echo $KERNEL_URI | sed -e 's/https.*\///g')
wget $KERNEL_URI -O $KERNEL_FILE
@janus57
janus57 / pi-hole-setup-methode-with-bind9.md
Created November 26, 2016 18:34
Pi-Hole with bind9 as forwarder

Installation of bind9

apt install bind9

Create a virtual interface (eth0:1)

Note: i have the IP : 192.168.1.109 by DHCP

edit the network settings file

@savetheclocktower
savetheclocktower / README.md
Last active March 8, 2025 11:12
Using a rotary encoder as a volume control for the Raspberry Pi

Using a rotary encoder as a volume control

On my RetroPie machine I wanted a hardware volume knob — the games I play use a handful of emulators, and there's no unified software interface for controlling the volume. The speakers I got for my cabinet are great, but don't have their own hardware volume knob. So with a bunch of googling and trial and error, I figured out what I need to pull this off: a rotary encoder and a daemon that listens for the signals it sends.

Rotary encoder

A rotary encoder is like the standard potentiometer (i.e., analog volume knob) we all know, except (a) you can keep turning it in either direction for as long as you want, and thus (b) it talks to the RPi differently than a potentiometer would.

I picked up this one from Adafruit, but there are plenty others available. This rotary encoder also lets you push the knob in and treats that like a button press, so I figured that would be useful for toggling mute on and off.

@pgporada
pgporada / centos7_kernel_update.md
Last active December 18, 2021 11:11
Upgrade Kernel on Centos7 via ELRepo
Install the ELRepo and GPG key
rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
yum install -y http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
Enable kernel updates from elrepo
yum-config-manager --enable elrepo-kernel
@gbaman
gbaman / HowToOTG.md
Last active May 9, 2025 20:48
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

@awaxa
awaxa / outlet
Last active December 18, 2019 07:16
apc pdu outlet expect script
#!/usr/bin/expect
set timeout 3
if {[llength $argv] == 0} {
send_user "Usage: outlet [1-8] [on|off] \n"
exit 1
}
set number [lindex $argv 0]
set onoff [lindex $argv 1]
@sclem
sclem / t3500.md
Last active January 4, 2022 19:51
Dell Precision T3500 OSX Power Management Tutorial

Dell T3500 OSX Power Management Tutorial

  1. Assume you have OSX installed.

Extract your dsdt from windows or linux - use aida64.

You may get errors. Choose fix errors. If any remain, google the line the error occurs for the fix. For example: My only remaining error was an unidentified *. rename *pnp0c14 to PNP0C14 - all caps, remove the *, keep the quotes.

@DenisFromHR
DenisFromHR / RPi_I2C_driver.py
Last active March 4, 2025 03:25
RaspberryPi I2C LCD Python stuff
# -*- coding: utf-8 -*-
"""
Compiled, mashed and generally mutilated 2014-2015 by Denis Pleic
Made available under GNU GENERAL PUBLIC LICENSE
# Modified Python I2C library for Raspberry Pi
# as found on http://www.recantha.co.uk/blog/?p=4849
# Joined existing 'i2c_lib.py' and 'lcddriver.py' into a single library
# added bits and pieces from various sources
# By DenisFromHR (Denis Pleic)