This file contains hidden or 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/env python3 | |
| # Detect when window focus changes | |
| # | |
| # Tested with MacOS Sequoia 15.7 | |
| # | |
| # Install requirements: | |
| # pip3 install pyobjc-core pyobjc-framework-Cocoa | |
| from AppKit import NSWorkspace |
This file contains hidden or 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
| const arrayShuffle = (input: string[]): string[] => { | |
| let i = input.length; | |
| const arr: string[] = [...input]; | |
| while (i != 0) { | |
| const ri = Math.floor(Math.random() * i); | |
| i--; | |
| [arr[i], arr[ri]] = [arr[ri], arr[i]]; | |
| } |
This file contains hidden or 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
| iptables -A INPUT -p tcp --destination-port 443 -j REJECT --reject-with tcp-reset | |
| iptables -A INPUT -p udp --destination-port 80 -j REJECT --reject-with icmp-port-unreachable | |
| iptables -A INPUT -p udp --destination-port 443 -j REJECT --reject-with icmp-port-unreachable | |
| ip6tables -A INPUT -p tcp --destination-port 443 -j REJECT --reject-with tcp-reset | |
| ip6tables -A INPUT -p udp --destination-port 80 -j REJECT --reject-with icmp6-port-unreachable | |
| ip6tables -A INPUT -p udp --destination-port 443 -j REJECT --reject-with icmp6-port-unreachable | |
| iptables-save > /etc/iptables/rules.v4 | |
| ip6tables-save > /etc/iptables/rules.v6 |
This file contains hidden or 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
| /** | |
| * !! Requires a SendGrid account & API Key. | |
| * Sign up for the FREE account and create an API key. | |
| * If you're receiving more than 100 faxes a day you | |
| * shouldn't be entertaining the idea of a script like this... | |
| * | |
| * In the Function Instance view: | |
| * - Paste this entire script | |
| * - Set the url path for your Function to: /fax-to-email | |
| * |
This file contains hidden or 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/env python3 | |
| from plistlib import * | |
| import mutagen as m | |
| import urllib.parse | |
| import pprint | |
| import sys | |
| import csv | |
| import os |
This file contains hidden or 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 | |
| set -e | |
| [ -z $1 ] && dir='/tmp/foo' || dir=$1 | |
| chromedev="/Applications/Google Chrome Dev.app" | |
| runChromeDev() { | |
| ( |
This file contains hidden or 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 | |
| if [[ $EUID -ne 0 ]]; then | |
| echo 'This script must be run as root' | |
| exit 1 | |
| fi | |
| launchctl unload -w /System/Library/LaunchDaemons/org.postfix.master.plist | |
| mkdir -p /Library/Server/Mail/Data/spool/maildrop | |
| /usr/sbin/postfix set-permissions |
This file contains hidden or 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
| <?php | |
| /** | |
| * Allow Shortcodes to be validated as normal phone numbers in OpenVBX | |
| * | |
| * Open the file `OpenVBX/libraries/PhoneNumber.php` and replace the function | |
| * `PhoneNumbers::normalizePhoneNumbertoE164` with the function definition below. | |
| * Then replace the `$shortcodes` array members with a list of numbers to | |
| * be considered valid shortcodes. | |
| */ |
This file contains hidden or 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
| <?php | |
| // template for setting CURL proxy options for OpenVBX | |
| // add the configuration lines below to the file | |
| // `OpenVBX/libraries/OpenVBX.php` on line 375 with the | |
| // config below and then enter the values for your Proxy | |
| // proxy type | |
| $_proxy_type = 'HTTP'; // proxy type | |
| // The address of your proxy server |
This file contains hidden or 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
| server { | |
| listen 80; | |
| server_name openvbx.tld; | |
| access_log /var/www/logs/access.log; | |
| error_log /var/www/logs/error.log; | |
| location /(favicon.ico|robots.txt) { | |
| access_log off; | |
| log_not_found off; | |
| error_page 404 /404; |
NewerOlder