Skip to content

Instantly share code, notes, and snippets.

View mrdotb's full-sized avatar
🐙

mrdotb mrdotb

🐙
View GitHub Profile
@acidtib
acidtib / readme.md
Created August 28, 2023 17:56
kamal + github actions

Example of Kamal deployment from Github Actions.

Add your applications .env variables to the Github repo as a repository secret, you can find this under the repo settings => secrets and variables => actions

https://github.com/username/repo_name/settings/secrets/actions

you are going to need an ssh private key that your deployment server is aware of (add public key to servers .ssh/authorized_keys) and add the ssh private key as a repo secret

create action workflows

@goofansu
goofansu / app.js
Last active August 5, 2023 04:05
LiveView upload directly to AWS China S3
let Uploaders = {}
Uploaders.S3 = function (entries, onViewError) {
entries.forEach(entry => {
let xhr = new XMLHttpRequest()
onViewError(() => xhr.abort())
xhr.onload = () => (xhr.status === 200 ? entry.done() : entry.error())
xhr.onerror = () => entry.error()
xhr.upload.addEventListener("progress", event => {
if (event.lengthComputable) {
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active April 28, 2024 12:29
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname