Skip to content

Instantly share code, notes, and snippets.

View twhite96's full-sized avatar
☢️
Cookin

tiff twhite96

☢️
Cookin
  • ::1
View GitHub Profile
@twhite96
twhite96 / nodejs-cicd-github-actions.md
Created September 16, 2024 02:40 — forked from danielwetan/nodejs-cicd-github-actions.md
Deploy Node.js to VPS using Github Actions

Deploy Node.js to VPS using Github Actions

Steps to deploy Node.js to VPS using PM2 and Github Actions

1. Clone repo to VPS folder

@twhite96
twhite96 / nodejs-cicd-github-actions.md
Created September 16, 2024 02:40 — forked from danielwetan/nodejs-cicd-github-actions.md
Deploy Node.js to VPS using Github Actions

Deploy Node.js to VPS using Github Actions

Steps to deploy Node.js to VPS using PM2 and Github Actions

1. Clone repo to VPS folder

@twhite96
twhite96 / deploy.sh
Created September 16, 2024 02:39 — forked from stancl/deploy.sh
Deploy using GitHub actions and SSH to a VPS
#!/bin/sh
set -e
vendor/bin/phpunit
npm run prod
git add .
(git commit -m "Build frontend assets for deployment to production") || true
(git push) || true
@twhite96
twhite96 / deploy.sh
Created September 16, 2024 02:39 — forked from stancl/deploy.sh
Deploy using GitHub actions and SSH to a VPS
#!/bin/sh
set -e
vendor/bin/phpunit
npm run prod
git add .
(git commit -m "Build frontend assets for deployment to production") || true
(git push) || true
@twhite96
twhite96 / calibre.py
Created September 14, 2024 00:10
Open calibre python script
import os
path = "/Applications/calibre.app"
flags = os.O_RDONLY
mode = 0o666
os.open(path, flags, mode)
@twhite96
twhite96 / _deobfuscating-unminifying-obfuscated-web-app-code.md
Created August 20, 2024 05:26 — forked from 0xdevalias/_deobfuscating-unminifying-obfuscated-web-app-code.md
Some notes and tools for reverse engineering / deobfuscating / unminifying obfuscated web app code
@twhite96
twhite96 / install-qbittorent-web-ui.md
Created August 4, 2024 20:30
How to install qBittorent on Ubuntu Server

To run qBittorent Web Ui Headless, run:

sudo add-apt-repository ppa:qbittorrent-team/qbittorrent-stable

Then: sudo apt install qbittorrent-nox

Which will give you the web UI at http://localhost:8080

Doing this means you can't run any other commands while running the Web UI.

@twhite96
twhite96 / remove-dates.sh
Created July 11, 2024 11:24
batch remove dates from filenames
function removedates() {
for file in *.md
do mv "${file%%[0-9]*.md} /dates-removed/${file%*.md}"
done
}
@twhite96
twhite96 / convert-to-webp.sh
Created July 11, 2024 11:23
convert all images to webp
function webpall() {
for file in *;
do cwebp -q 50 "$file" -o "${file%.*}.webp";
done
}
@twhite96
twhite96 / compress-images.sh
Created July 11, 2024 11:22
compress images in a folder
function shrink() {
for file in blog/*;
do magick -sampling-factor 4:2:0 -quality 85 -interlace JPEG -colorspace RGB "$file" "${file%.*}.jpg"
done
}