Steps to deploy Node.js to VPS using PM2 and Github Actions
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 | |
set -e | |
vendor/bin/phpunit | |
npm run prod | |
git add . | |
(git commit -m "Build frontend assets for deployment to production") || true | |
(git push) || true |
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 | |
set -e | |
vendor/bin/phpunit | |
npm run prod | |
git add . | |
(git commit -m "Build frontend assets for deployment to production") || true | |
(git push) || true |
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 os | |
path = "/Applications/calibre.app" | |
flags = os.O_RDONLY | |
mode = 0o666 | |
os.open(path, flags, mode) |
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.
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
function removedates() { | |
for file in *.md | |
do mv "${file%%[0-9]*.md} /dates-removed/${file%*.md}" | |
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
function webpall() { | |
for file in *; | |
do cwebp -q 50 "$file" -o "${file%.*}.webp"; | |
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
function shrink() { | |
for file in blog/*; | |
do magick -sampling-factor 4:2:0 -quality 85 -interlace JPEG -colorspace RGB "$file" "${file%.*}.jpg" | |
done | |
} |
NewerOlder