Skip to content

Instantly share code, notes, and snippets.

View julienma's full-sized avatar

Julien Ma julienma

View GitHub Profile
@julienma
julienma / README.md
Last active July 31, 2023 16:35
Self-sending cold emails with Mailcow + MailReach
@julienma
julienma / readme.md
Created April 8, 2023 09:53
Install chatbot-ui on dokku

How to install https://github.com/mckaywrigley/chatbot-ui on dokku

dokku git:from-image chatbot.domain.com ghcr.io/mckaywrigley/chatbot-ui:main
dokku proxy:ports-set chatbot.domain.com http:80:3000
dokku config:set chatbot.domain.com OPENAI_API_KEY="sk-..." DOKKU_LETSENCRYPT_EMAIL=mail@domain.com
dokku letsencrypt:enable chatbot.domain.com
dokku http-auth:enable chatbot.domain.com <MYUSER> <MYPASSWORD>
@julienma
julienma / typora-like-source-mode.css
Created February 2, 2022 10:19
CSS snippet for Obsidian to make the Source Mode more like Typora's
/*
Tested on Obsidian 0.13.23 with theme Minimal 5.0
https://github.com/kepano/obsidian-minimal
*/
/* LIVE PREVIEW Editor */
/* Use text font (serif) */
.markdown-source-view.mod-cm6.is-live-preview .cm-scroller {
font-family: var(--text);
@julienma
julienma / README.md
Last active August 15, 2023 10:40
GitHub Actions: using SSH keys to auto-deploy with dokku-push

The dokku-push action requires an SSH key with push access to the Dokku instance. Here's how to do that.

Replace APPNAME with the name of the app (e.g. this is a good idea to use the same name used on Dokku's).

Generate a new SSH keypair

We want each repo to have its own SSH key, so it's easier to rotate/invalidate them if required, without affecting all the repos. Let's generate a new key on your computer (see GitHub help):

@julienma
julienma / keybase.md
Created April 20, 2020 09:39
keybase.md

Keybase proof

I hereby claim:

  • I am julienma on github.
  • I am julienma (https://keybase.io/julienma) on keybase.
  • I have a public key ASB9qE0CDqzh7nOmhYyf9jxnGSQK8Ih9YBF5xq0uP_HdBwo

To claim this, I am signing this object:

@julienma
julienma / DefaultKeyBinding.dict
Created February 18, 2020 13:41
Enable Home/End keys on macOS to behave like Windows
{
"\UF729" = moveToBeginningOfLine:; // home
"\UF72B" = moveToEndOfLine:; // end
"$\UF729" = moveToBeginningOfLineAndModifySelection:; // shift-home
"$\UF72B" = moveToEndOfLineAndModifySelection:; // shift-end
"^\UF729" = moveToBeginningOfDocument:; // ctrl-home
"^\UF72B" = moveToEndOfDocument:; // ctrl-end
"^$\UF729" = moveToBeginningOfDocumentAndModifySelection:; // ctrl-shift-home
"^$\UF72B" = moveToEndOfDocumentAndModifySelection:; // ctrl-shift-end
}
@julienma
julienma / README.md
Last active April 10, 2023 21:59
Pi-Hole docker setup with DNSCrypt-Proxy 2

This will setup Pi-Hole with DNS-Over-HTTPS (DoH) enabled, using dnscrypt-proxy as a DoH proxy — which is an alternative to cloudflared, as explained in the Cloudflare docs. Inspired from https://github.com/losuler/pihole-dnscrypt-docker.

Install Pi-Hole on Docker

Create docker-compose.yml and etc-dnscrypt-proxy/dnscrypt-proxy.toml, then to install/update:

@julienma
julienma / README.md
Created November 2, 2019 21:50
Reset macOS security permissions

To get bundle identifier of an app:

osascript -e 'id of app "Logi Options Daemon"'

Then to reset all permissions of app:

tccutil reset All com.logitech.manager.daemon
@julienma
julienma / README.md
Last active November 10, 2021 13:04
How to install Discourse 2.4+ on Dokku (2019)
@julienma
julienma / alias.zsh
Created May 23, 2019 15:56
App status report for Dokku
alias report="dokku ps:report | grep -e '=====>' -e 'Status'"