This file contains hidden or 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
# /etc/caddy/Caddyfile | |
api.example.com:443 { | |
route { | |
@options method OPTIONS | |
handle @options { | |
header Access-Control-Allow-Origin "https://clientwebsite.com" | |
header Access-Control-Allow-Methods "POST" | |
header Access-Control-Allow-Headers "authorization" | |
header Access-Control-Allow-Credentials true |
This file contains hidden or 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
// navigate to about:serviceworkers first | |
// then run: | |
for (let k of document.querySelectorAll("[data-l10n-id='unregister-button']")) k.click() |
This file contains hidden or 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
sudo apt update | |
sudo apt install -y vim git python3-dev gcc g++ make unzip tree python3.10-venv iftop ripgrep | |
sudo -v ; curl https://rclone.org/install.sh | sudo bash | |
mkdir -p ~/.config/rclone/ | |
vim ~/.config/rclone/rclone.conf | |
# ~/.config/rclone/rclone.conf | |
[r2] |
This file contains hidden or 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
[Unit] | |
Description=uWSGI Emperor service | |
After=syslog.target | |
[Service] | |
ExecStart=/usr/local/bin/uwsgi --ini /etc/uwsgi/emperor.ini | |
Restart=always | |
KillSignal=SIGQUIT | |
Type=notify | |
NotifyAccess=all |
This file contains hidden or 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
# default target so running 'make' by itself wll download and build nginx | |
build: nginx | |
cd nginx && ./configure --with-pcre=../pcre2 && make | |
nginx: pcre2 | |
curl -O https://nginx.org/download/nginx-1.21.6.tar.gz | |
tar -xzvf nginx-*.tar.gz | |
mv nginx-*/ nginx | |
rm nginx-*.tar.gz |
This file contains hidden or 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
# /Users/sirodoht/Library/Application Support/lazygit/config.yml | |
gui: | |
theme: | |
lightTheme: true | |
showFileTree: false | |
mouseEvents: false | |
skipStashWarning: false | |
showRandomTip: false | |
showCommandLog: false |
This file contains hidden or 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
## | |
# Host Database | |
# | |
# localhost is used to configure the loopback interface | |
# when the system is booting. Do not change this entry. | |
## | |
127.0.0.1 localhost | |
255.255.255.255 broadcasthost | |
::1 localhost |
This file contains hidden or 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 os | |
from send2trash import send2trash | |
# get origin dir | |
photos_path = r"/Volumes/Leslie/G_processing/alltakeouts" | |
# index all origin files to a dict[filename] = path | |
log_filename = "json-files-to-delete.log" | |
log_file = open(log_filename, "w") |
This file contains hidden or 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
use std::time::Instant; | |
let before = Instant::now(); | |
workload(); | |
println!("Elapsed time: {:.2?}", before.elapsed()); |
This file contains hidden or 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
# config with restart | |
dokku config:set mataroa SECRET_KEY='' | |
# config no restart | |
dokku config:set --no-restart mataroa EMAIL_HOST_USER='' | |
dokku config:set --no-restart mataroa EMAIL_HOST_PASSWORD='' | |
# run command | |
dokku run mataroa python manage.py createsuperuser --email [email protected] --username sirodoht |
NewerOlder