- Install rclone by opening Terminal and typing
winget install Rclone.Rclone
- Install WinFSP:
winget install WinFsp.WinFsp
- In Terminal, run
rclone config create myBox box
- A browser window should pop up. Login to box.com there.
- To mount the Box drive, type into terminal:
rclone mount myBox: B: --vfs-cache-mode full --vfs-cache-max-size 100G --vfs-cache-max-age 24h --vfs-read-chunk-size 128M --vfs-read-chunk-size-limit 1G --buffer-size 256M
- Create VB Script:
@('Set objShell = CreateObject("WScript.Shell")', 'objShell.Run """C:\Users\dostr\AppData\Local\Microsoft\WinGet\Links\rclone.exe"" mount myBox: B: --vfs-cache-mode full --vfs-cache-max-size 100G --vfs-cache-max-age 24h --vfs-read-chunk-size 128M --vfs-read-chunk-size-limit 1G --buffer-size 256M --log-file C:\rclone\logs\rclone.log --log-level DEBUG", 0, False') | Out-File -Encoding ASCII C:\rclone\rclone-mount.vbs
- Create a task to automatically run rclone at Windows startup: `Regi
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
import sys | |
from PyQt6.QtWidgets import QApplication, QPushButton, QMainWindow | |
from PyQt6.QtCore import QEvent | |
class WinUIButton(QPushButton): | |
def __init__(self, text, parent=None): | |
super().__init__(text, parent) | |
self.setMouseTracking(True) | |
self.installEventFilter(self) | |
self.setStyleSheet(""" |
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
$(python -c 'import crypt,getpass;pw=getpass.getpass(); print(crypt.crypt(pw,crypt.mksalt(crypt.METHOD_SHA256))) if (pw==getpass.getpass("Confirm: ")) else exit()') |
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 | |
nmcli -g UUID c show | while read line; do if [ `nmcli -g connection.interface-name c s $line` = $LAN_IFACE ]; then nmcli c mod $line con-name lan-con; fi; 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
#!/bin/bash | |
nmcli -f UUID,STATE con show | tail -n +2 | grep -v activated | awk '{print $1}' | while read line; do nmcli con delete uuid $line; 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
#!/bin/bash | |
echo "precedence ::ffff:0:0/96 100" >> /etc/gai.conf |
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
# List rules. | |
sudo iptables -L | |
# Set default policies to accept. | |
sudo iptables -P INPUT ACCEPT | |
sudo iptables -P FORWARD ACCEPT | |
sudo iptables -P OUTPUT ACCEPT | |
# Flush and delete tables and chains. | |
sudo iptables -t nat -F |
sudo /System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport --disassociate
sudo ifconfig en0 ether $(openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/./0/2; s/.$//')
networksetup -detectnewhardware
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
# Backup WordPress DB. Find the servername, username, and db name from wp-config.php. | |
mysqldump --column-statistics=0 -h <sql-server-name> -u <sql-username> -p <sql-db-name> | bzip2 -c > blog.bak.sql.bz2 | |
# Restore WordPress DB. | |
# First, uncompress the sql backup file. | |
bzip2 -d blog.bak.sql.bz2 | |
# Second, import the the database tables. Added protocol for docker compatability. | |
mysql -h localhost -P 8037 --protocol=tcp -u root -p wordpress < blog.bak.sql |
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
# Backup WordPress DB. Find the servername, username, and db name from wp-config.php. | |
mysqldump --column-statistics=0 -h <sql-server-name> -u <sql-username> -p <sql-db-name> | bzip2 -c > blog.bak.sql.bz2 | |
# Restore WordPress DB. | |
# First, uncompress the sql backup file. | |
bzip2 -d blog.bak.sql.bz2 | |
# Second, import the the database tables. Added protocol for docker compatability. | |
mysql -h localhost -P 8037 --protocol=tcp -u root -p wordpress < blog.bak.sql |
NewerOlder