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
urlPattern = /^(https?:\/\/)?(((([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7 |
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 python | |
""" | |
Twisted SSL webserver with basic authentication using plain in-memory passwords. | |
The first argument is the path of the directory to serve; if not provided then the current folder is used ("."). | |
INSTALL DEPENDENCIES: | |
pip install twisted | |
pip install pyOpenSSL | |
pip install service_identity | |
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 python | |
# Run without args to get message headers for the last 3 days. | |
# gmail.py 10 - display message headers for the last 10 days. | |
# gmail.py 10 full - display message headers with bodies. | |
import sys | |
import os | |
import imaplib | |
import getpass |
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 python | |
# http://blog.vrplumber.com/index.php?/archives/1638-HowTo-Create-an-SSL-web-server-in-Twisted-Crude-approach,-but-it-works....html | |
# AND http://twistedmatrix.com/documents/current/web/howto/using-twistedweb.html#auto2 | |
# Resource from: http://jcalderone.livejournal.com/54128.html | |
# ##### FOR HTTP YOU CAN USE INSTEAD THIS: | |
# ####### twistd -n web --path / |
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
var args = { | |
quoted_prop1: " oneEE", | |
quoted_prop1aaaa: " first level another", | |
quoted_I18N__prop2: " tWo (must be under I18N)", | |
quoted_I18N__weprop2bbb: " tWo and a half (must be under I18N)", | |
quoted_API__JUJUJ__prop3: " THREE", | |
quoted_API__JUJUJ__prop3BBBB: " THREE--beeee", | |
quoted_API__JUJUJ__LAST__prop3ZZZZ: " THREE--zzzzz", | |
quoted_API__prop4: " __FOUR__", | |
quoted_prop3232aaaa: " more first level another", |
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 | |
import os | |
import sys | |
import bottle | |
from bottle import run, static_file | |
def resolve_path(path): |
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 latest version from https://bitbucket.org/iBotPeaches/apktool/downloads | |
export APKTOOL_VERSION=2.4.0 | |
sudo -E sh -c 'wget https://bitbucket.org/iBotPeaches/apktool/downloads/apktool_$APKTOOL_VERSION.jar -O /usr/local/bin/apktool.jar' | |
sudo chmod +r /usr/local/bin/apktool.jar | |
sudo sh -c 'wget https://raw.githubusercontent.com/iBotPeaches/Apktool/master/scripts/linux/apktool -O /usr/local/bin/apktool' | |
sudo chmod +x /usr/local/bin/apktool | |
# https://gist.github.com/bmaupin/48140926ce11fbeddec2 |
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 | |
# IMPORTANT: Don't forget to logout from your Apple ID in the settings before running it! | |
# IMPORTANT: You will need to run this script from Recovery. In fact, macOS Catalina brings read-only filesystem which prevent this script from working from the main OS. | |
# This script needs to be run from the volume you wish to use. | |
# E.g. run it like this: cd /Volumes/Macintosh\ HD && sh /Volumes/Macintosh\ HD/Users/sabri/Desktop/disable.sh | |
# WARNING: It might disable things that you may not like. Please double check the services in the TODISABLE vars. | |
# Get active services: launchctl list | grep -v "\-\t0" | |
# Find a service: grep -lR [service] /System/Library/Launch* /Library/Launch* ~/Library/LaunchAgents |
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/local/bin/python3.7 | |
# Reboot linux box when connection to router lost | |
# Reboot router when connection to internet lost | |
# Run via cron as root every minute | |
# After 5 (ticks) failures a reboot will be initiated | |
# After 3 reboots wait for 30 reboot ticks before rebooting again | |
# # sudo crontab -e | |
# Add line |
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/local/bin/rsync --progress -av \ | |
--exclude '.DS_Store*' \ | |
--exclude .fseventsd \ | |
--exclude '.Spotlight-V100*' \ | |
--exclude '.TemporaryItems*' \ | |
--exclude '.Trashes*' \ | |
--exclude '.Trash*' \ | |
--exclude 'tmp*' \ | |
--exclude 'Application\ Support' \ | |
--exclude '.PKInstallSandboxManager*' \ |