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
user = User.objects.get(username='lauren') | |
client = APIClient() | |
client.force_authenticate(user=user) |
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
DELIMITER $$ | |
CREATE DEFINER=`root`@`localhost` FUNCTION `remove_accents`(`str` VARCHAR(255)) RETURNS varchar(255) CHARSET utf8 | |
NO SQL | |
BEGIN | |
SET str = REPLACE(str,'Š','S'); | |
SET str = REPLACE(str,'š','s'); | |
SET str = REPLACE(str,'Ð','Dj'); | |
SET str = REPLACE(str,'Ž','Z'); | |
SET str = REPLACE(str,'ž','z'); |
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
SELECT * | |
FROM `table` | |
WHERE `column` <> CONVERT(`column` USING ASCII) |
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
user=$(cat /dev/urandom | tr -dc 'a-z' | fold -w 32 | head -n 1) | |
password=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) | |
printf "$user\n$password\n$password\n\n\n\n\nY\n" | ssh new@pentest3 | |
echo "username: $user" | |
echo "password: $password" | |
echo "----" | |
echo "ssh $user@pentest3" |
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 | |
# Origin: https://github.com/sunknudsen/privacy-guides/tree/master/how-to-clean-uninstall-macos-apps-using-appcleaner-open-source-alternative | |
if [ -z "$1" ] || [ "$1" = "--help" ]; then | |
printf "%s\n" "Usage: app-cleaner.sh /path/to/app.app" | |
exit 0 |
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
# Origin: https://github.com/sunknudsen/privacy-guides/tree/master/how-to-spoof-mac-address-and-hostname-automatically-at-boot-on-macos | |
set -e | |
set -o pipefail | |
export LC_CTYPE=C | |
basedir=$(dirname "$0") | |
# Spoof computer name |
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 | |
### | |
# A Script that automatically recompiles your | |
# Latex in the background on Mac OS X. | |
### | |
# Options | |
BIN_PATH=/usr/texbin | |
FILE=main | |
WATCH_FILE=chapters |
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
do shell script "nohup /Applications/Firefox.app/Contents/MacOS/firefox-bin -p \"userjs-extreme\" --no-remote > /dev/null 2>&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
ip=$(curl http://icanhazip.com) | |
hcloud firewall list | |
read -p "Enter the Firewall ID you want to add your IP to:" firewallID | |
hcloud firewall add-rule --direction in --protocol tcp --port 22 --source-ips $ip/32 $firewallID |
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
ip=$(curl http://icanhazip.com) | |
hcloud firewall list | |
read -p "Enter the Firewall ID you want to remove your IP to:" firewallID | |
hcloud firewall delete-rule --direction in --protocol tcp --port 22 --source-ips $ip/32 $firewallID |
OlderNewer