# Check if app is running and if not, open it
pgrep PhotoSync >/dev/null 2>&1; if [ $? -eq 0 ]; then :; else open /Applications/PhotoSync.app; fi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Run this script without any param for a dry run | |
# Run the script with root and with exec param for removing old kernels after checking | |
# the list printed in the dry run | |
# bash <(curl -Ls "https://gist.github.com/jpaulickcz/721ad60ad28bb7875a5689defe005305/raw/?clean-kernels-$(date +%s)") | |
# Function to get disk usage in MB | |
get_disk_usage() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// LIBRARIES | |
#include <ESP8266WiFi.h> // Library for connecting to a WiFi network | |
#include <PubSubClient.h> // Library for MQTT communication | |
#include <OneWire.h> // Library for interacting with 1-Wire devices | |
#include <DallasTemperature.h> // Library for reading temperature from Dallas Temperature sensors | |
// Define the pin number that the 1-Wire bus is connected to | |
#define ONE_WIRE_BUS 2 | |
// WIFI SETTINGS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# based on https://github.com/crazy-max/WindowsSpyBlocker/blob/master/data/hosts/spy.txt | |
# edit for pihole/adguard | |
a.ads1.msn.com | |
a.ads2.msads.net | |
a.ads2.msn.com | |
a.rad.msn.com | |
ac3.msn.com | |
activity.windows.com | |
adnexus.net |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Get ESP8266 going with Arduino IDE | |
// - https://github.com/esp8266/Arduino#installing-with-boards-manager | |
// Required libraries (sketch -> include library -> manage libraries) | |
// - PubSubClient by Nick ‘O Leary | |
// - DHT sensor library by Adafruit | |
// also based on https://gist.github.com/balloob/1176b6d87c2816bd07919ce6e29a19e9 (?) | |
#include <ESP8266WiFi.h> | |
#include <PubSubClient.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# Removes non-LANG audio tracks and subtitles from mkv files in a directory. | |
# Original script by greenbender at https://forum.videohelp.com/threads/343271-BULK-remove-non-English-tracks-from-MKV-container | |
# Modified by Joseph Milazzo for updated MkvMerge commands. | |
# Download | |
# wget https://gist.githubusercontent.com/jpaulickcz/55e07c8d654feaf8618137716fc60bb5/raw/removeNonEnglish.py && chmod +x removeNonEnglish.py && apt install mkvtoolnix -y | |
# Use |