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
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 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 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 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 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 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 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 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; |
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
// Convert all Category input checkboxes in to radio selects | |
// It completely replaces the elements with new ones and transfers | |
// the attributes from the old element to the new. | |
// We can't just change the type because of, you guessed it, Internet Explorer | |
// Yes, sometimes a hand grenade is easier than a scalpel ;) | |
jQuery('form#post').find('.categorychecklist input').each(function() { | |
var new_input = jQuery('<input type="radio" />'), | |
attrLen = this.attributes.length; | |
for (i = 0; i < attrLen; i++) { |
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
<?php | |
/** | |
* Allow content templates to be loaded by page name | |
* | |
* ie: a page named "home" can load a special content template by adding a file | |
* to the content templates folder: `content/page-home.php` | |
* | |
* @param string $filename | |
* @param string $type |
NewerOlder