Skip to content

Instantly share code, notes, and snippets.

View ILAsoft's full-sized avatar
🎯
Focusing

iLya Pupko ILAsoft

🎯
Focusing
View GitHub Profile
require "try-catch"
try {
function()
error('oops')
end,
catch {
function(error)
print('caught error: ' .. error)
@jrom
jrom / nginx.conf
Created February 7, 2012 17:14
nginx hack for multiple conditions
if ($request_uri = /) {
set $test A;
}
if ($host ~* teambox.com) {
set $test "${test}B";
}
if ($http_cookie !~* "auth_token") {
set $test "${test}C";
@TheRemote
TheRemote / measurepi.sh
Last active July 23, 2023 14:56
Measure Raspberry Pi CPU / GPU / Core / SD clock speeds and check whether you are undervolted
#!/bin/bash
# This bash script outputs the status of your Pi and checks whether you are being throttled for undervoltage and gives you your temperature
# Article and discussion at https://jamesachambers.com/measure-raspberry-pi-undervoltage-true-clock-speeds/
# Author James A Chambers 6-6-17
# Output current configuration
vcgencmd get_config int | egrep "(arm|core|gpu|sdram)_freq|over_volt"
# Measure clock speeds
for src in arm core h264 isp v3d; do echo -e "$src:\t$(vcgencmd measure_clock $src)"; done
@Firsh
Firsh / lwp-cloudflare-dyndns.sh
Last active July 2, 2024 02:55
Cloudflare as Dynamic DNS
#!/bin/bash
# Cloudflare as Dynamic DNS
# From: https://letswp.io/cloudflare-as-dynamic-dns-raspberry-pi/
# Based on: https://gist.github.com/benkulbertis/fff10759c2391b6618dd/
# Original non-RPi article: https://phillymesh.net/2016/02/23/setting-up-dynamic-dns-for-your-registered-domain-through-cloudflare/
# Update these with real values
auth_email="email@example.com"
auth_key="global_api_key_goes_here"
zone_name="example.com"
version: "2"
services:
deluge:
image: linuxserver/deluge
container_name: deluge
environment:
- PUID=1000
- PGID=1000
- TZ=PST
volumes:
@bakman2
bakman2 / octoprint.md
Last active July 14, 2024 12:21
Octoprint IP Camera

How to use Octoprint with an IP camera that has an RTSP stream available

Optional: For Wyze cam only

Install Dafang Hacks on the Wyze Cam.

Once running and all is functional, continue. Set video bitrate to 1500, VBR, 30fps.

Installation

@BradMcGonigle
BradMcGonigle / mpminidelta.md
Last active March 27, 2021 00:43 — forked from bakman2/octoprint.md
Monoprice Mini Delta - collection of useful things

Octoprint with Wyze cam V2

Installation

Install Dafang Hacks on the Wyze Cam.

Once running and all is functional, continue.

If OctoPrint is running on a Raspberry Pi (3B minimum):

@kushagharahi
kushagharahi / .Slickdeals URL Cleaner.md
Last active June 4, 2024 12:17
Slickdeals URL Cleaner UserScript

Tired of having to go through referral/affiliate links before you can view a deal on Slickdeals? This script strips the urls on Slickdeals of referrers. If it can't strip the urls, it marks them as "Referral Link?" in hot pink.

Install this UserScript in GreaseMonkey or similar UserScript manager.

before and after script

Note: You must click View Forum Thread (requires login) ![image](https://user-images.githubusercontent.com/3326002/211234558-3e83f0b9-486f-4ab5-ae

@sbyx
sbyx / low-battery-level-detection-notification-for-all-battery-sensors.yaml
Last active July 24, 2024 19:39
Home Assistant Blueprint: Low battery level detection & notification for all battery sensors
blueprint:
name: Low battery level detection & notification for all battery sensors
description: Regularly test all sensors with 'battery' device-class for crossing
a certain battery level threshold and if so execute an action.
domain: automation
input:
threshold:
name: Battery warning level threshold
description: Battery sensors below threshold are assumed to be low-battery (as
well as binary battery sensors with value 'on').
@tmuka
tmuka / measurepi.sh
Last active September 18, 2023 13:27 — forked from TheRemote/measurepi.sh
Measure Raspberry Pi CPU / GPU / Core / SD clock speeds and check whether you are undervolted
#!/bin/bash
# This bash script outputs the status of your Pi and checks whether you are being throttled for undervoltage and gives you your temperature
# Article and discussion at https://jamesachambers.com/measure-raspberry-pi-undervoltage-true-clock-speeds/
# Author James A Chambers 6-6-17
# updated throttle reason codes by tmuka 2021-10
# Output current configuration
vcgencmd get_config int | egrep "(arm|core|gpu|sdram)_freq|over_volt"
# Measure clock speeds