Skip to content

Instantly share code, notes, and snippets.

View soup-bowl's full-sized avatar
🎯
Focusing

Casey LP soup-bowl

🎯
Focusing
View GitHub Profile
@soup-bowl
soup-bowl / update-dns.sh
Last active July 29, 2022 14:42
Dynamic DNS using Cloudflare & a local device
#!/bin/sh
NEW_IP=`curl -s http://ident.me/`
DOMAIN='example.com'
DOM_ZONE='' # Run commented command to find this info out.
R_ZONE='' # Run commented command to find this info out.
CF_EMAIL='' # Your Cloudflare email address.
CF_TOKEN='' # https://dash.cloudflare.com/profile/api-tokens - Create one with Zone:Read and Zone:Edit perms.
# To get DOM_ZONE, run:
cms:
- name: "WordPress"
description: "A free and open-source content management system (CMS) that powers over 40% of the web. WordPress provides a flexible platform for creating blogs, websites, and e-commerce stores, and is known for its ease of use and customization options."
url: "https://wordpress.org/"
headers:
- "x-powered-by: WP Engine"
body:
- "//meta[@name='generator' and contains(@content, 'WordPress')]"
- "//*[contains(@href, 'wp-content')]"
- "//form[contains(@action, 'wp-login.php')]"
@soup-bowl
soup-bowl / tree.py
Last active November 27, 2023 12:40
LED Christmas Tree for Raspberry Pi - https://thepihut.com/products/3d-xmas-tree-for-raspberry-pi
from gpiozero import LEDBoard, PWMLED
from gpiozero.tools import random_values
from signal import pause
from time import time, sleep, strftime
class Tree(object):
def __init__(self):
self.active = False
self.tree = LEDBoard(*range(4,28),pwm=True)
self.star = PWMLED(2)
#! /bin/bash
# Script by soup-bowl - https://github.com/soup-bowl/
# Changes the screen brightness of the official Raspberry Pi touchscreen.
# If no argument is provided, it will guess a value based on the time of day.
if [ -z "$1" ]; then
currenttime=$(date +%H:%M)
if [[ "$currenttime" > "18:00" ]] || [[ "$currenttime" < "24:00" ]]; then
echo 40 > /sys/class/backlight/rpi_backlight/brightness
@soup-bowl
soup-bowl / deskdash.code-workspace
Last active May 15, 2021 09:02
Deskdash Workspace
{
"folders": [
{
"path": "deskdash",
"name": "Dashboard"
},
{
"path": "deskdash-api",
"name": "Communicator"
}
@soup-bowl
soup-bowl / config.plist
Last active August 16, 2020 19:10
Clover Config for Toshiba Satellite Pro L850-1UJ - https://www.soupbowl.io/htoshl850
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ACPI</key>
<dict>
<key>SSDT</key>
<dict>
<key>DropOem</key>
<false/>
00:00.0 Host bridge: Intel Corporation 3rd Gen Core processor DRAM Controller (rev 09)
00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)
00:14.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller (rev 04)
00:16.0 Communication controller: Intel Corporation 7 Series/C216 Chipset Family MEI Controller #1 (rev 04)
00:1a.0 USB controller: Intel Corporation 7 Series/C216 Chipset Family USB Enhanced Host Controller #2 (rev 04)
00:1b.0 Audio device: Intel Corporation 7 Series/C216 Chipset Family High Definition Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation 7 Series/C216 Chipset Family PCI Express Root Port 1 (rev c4)
00:1c.1 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 2 (rev c4)
00:1c.2 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 3 (rev c4)
00:1d.0 USB controller: Intel Corporation 7 Series/C216 Chipset Family USB
@soup-bowl
soup-bowl / docker-compose.yml
Last active September 7, 2022 21:09
Docker-compose LAMP dev stack
version: '3.6'
services:
db:
image: mysql:latest
command: --default-authentication-plugin=mysql_native_password
environment:
MYSQL_ROOT_PASSWORD: e9w86036f78sd9
volumes:
- "./database:/var/lib/mysql"
db_pma:
@soup-bowl
soup-bowl / upgrade-php.ps1
Last active September 24, 2019 07:26
Quick & dirty script to grab a new copy of PHP and Microsoft SQL Plugin and swaps over config to the upgrade.
param (
[Parameter(Mandatory=$true)][string]$version
)
if( Test-Path -Path ".\upgrade-php.xml" ) {
[xml]$configFile= get-content ".\upgrade-php.xml";
foreach ($option in $configFile.configuration.config) {
New-variable -Name $option.key -Value $option.value;
}
} else {
@soup-bowl
soup-bowl / install-mssql.sh
Last active June 6, 2019 11:02
Microsoft SQL Server driver installer for Local by Flywheel
#! /bin/bash
_DEB_VER=8
_MSSQL_VER=5.6.1
_PHP_VER=7.2
# Grab dependencies, then add Microsoft repo and grab further dependencies.
apt-get -q update
apt-get install -qy curl apt-transport-https wget gnupg build-essential autoconf pkg-config
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -