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
const toHTMLEntities = (html) => { | |
let result = ''; | |
for (let i = 0; i < html.length; i++) { | |
result += "&#x" + html[i].charCodeAt(0).toString(16) + ";"; | |
} | |
return result; | |
} |
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 | |
while true | |
do | |
sudo /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -s | |
sleep 10 | |
done |
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
# Increase history | |
$MaximumHistoryCount = 10000 | |
# Produce UTF-8 by default | |
$PSDefaultParameterValues["Out-File:Encoding"]="utf8" | |
# Show selection menu for tab | |
Set-PSReadlineKeyHandler -Chord Tab -Function MenuComplete | |
# Helper Functions |
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
### Base Windows Configuration ### | |
<# | |
The command to run, built from the raw link of this gist | |
Win+R | |
iexplore http://boxstarter.org/package/url?<RAW GIST LINK> | |
OR (if you don't like the way the web launcher force re-installs everything) | |
Create another script like the following to install and run the gist: |
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 | |
# see: https://apple.stackexchange.com/a/311511/291269 | |
function install_dmg { | |
set -x | |
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | |
# Initialize a variable for the URL to the '.dmg' |
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/sh | |
# Reset Parallels Desktop's trial and generate a casual email address to register a new user | |
sudo rm /private/var/root/Library/Preferences/com.parallels.desktop.plist /Library/Preferences/Parallels/licenses.xml | |
jot -w pdu%d@gmail.com -r 1 |
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 [ $# -eq 1 ] | |
NM=`uname -a && date` | |
NAME=`echo $NM | md5sum | cut -f1 -d" "` | |
then | |
ppa_name=`echo "$1" | cut -d":" -f2 -s` | |
if [ -z "$ppa_name" ] | |
then | |
echo "PPA name not found" | |
else |
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 | |
echo "[+] Installing XFCE4, this will take a while" | |
sudo apt update | |
sudo apt dist-upgrade -y --force-yes | |
sudo apt --yes --force-yes install kali-desktop-xfce xorg xrdp | |
echo "[+] Configuring XRDP to listen on port 3390 (but not starting the service)..." | |
echo "[+] To start the service run: sudo /etc/init.d/xrdp start" | |
sudo sed -i 's/port=3389/port=3390/g' /etc/xrdp/xrdp.ini | |
sudo echo "alias startx=\"sudo /etc/init.d/xrdp start\"" > ~/.bash_aliases | |
sudo echo "alias stopx=\"sudo /etc/init.d/xrdp stop\"" > ~/.bash_aliases |
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
# see: https://askubuntu.com/a/954348/552275 | |
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add - | |
# Stable Channel | |
echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list | |
# Dev Channel | |
# echo "deb https://download.sublimetext.com/ apt/dev/" | sudo tee /etc/apt/sources.list.d/sublime-text.list |
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 | |
HTTP_PORT=8000 | |
HTTPS_PORT=8443 | |
ipaddr="$(hostname -I | cut -d ' ' -f1)" | |
/etc/init.d/fruitywifi restart && /etc/init.d/php7.0-fpm restart | |
sudo fuser -k "$HTTP_PORT"/tcp &>/dev/null | |
sudo fuser -k "$HTTPS_PORT"/tcp &>/dev/null |
NewerOlder