Skip to content

Instantly share code, notes, and snippets.

View chopfitzroy's full-sized avatar
👽
What are we if not plural?

Otis Sutton chopfitzroy

👽
What are we if not plural?
View GitHub Profile
@chopfitzroy
chopfitzroy / .wsl-git.md
Created August 6, 2024 21:14 — forked from carlolars/.wsl-git.md
HOWTO: Use WSL and its Git in a mixed development environment

How to setup a development environment where Git from WSL integrates with native Windows applications, using the Windows home folder as the WSL home and using Git from WSL for all tools.

Note if using Git for Windows, or any tool on the Windows side that does not use Git from WSL then there will likely be problems with file permissions if using those files from inside WSL.

Tools

These are the tools I use:

  • git (wsl) - Command line git from within WSL.
  • Fork (windows) - Git GUI (must be used with wslgit)
  • wslgit - Makes git from WSL available for Windows applications. Important! Follow the installation instructions and do (at least) the first optional step and then the Usage in Fork instructions.
@chopfitzroy
chopfitzroy / send-books-from-calibre-to-kindle.md
Created August 1, 2024 04:39 — forked from aminalhazwani/send-books-from-calibre-to-kindle.md
Send books from Calibre.app to Kindle Paperwhite and Kindle apps

Send books from Calibre.app to Kindle Paperwhite and Kindle apps

Create GMX email account

  1. Create an email account on www.gmx.com
  2. Open "Settings" and check "Enable access to this account via POP3 and IMAP"

Add GMX email to Calibre.app Preferences

  1. Open "Preferences"
@chopfitzroy
chopfitzroy / minikube-on-wsl2-with-podman.md
Created December 12, 2022 20:57 — forked from fardjad/minikube-on-wsl2-with-podman.md
[Minikube on WSL2 with Podman] Tips for running a local development Kubernetes cluster on WSL2 with Podman #wsl2 #minikube #podman #kubernetes #docker
@chopfitzroy
chopfitzroy / wsl.md
Created October 1, 2022 02:17 — forked from alyleite/wsl.md
Failed to connect to bus: Host is down - WSL 2

» sudo systemctl daemon-reload

System has not been booted with systemd as init system (PID 1). Can't operate. Failed to connect to bus: Host is down

just try:

sudo apt-get update && sudo apt-get install -yqq daemonize dbus-user-session fontconfig

sudo daemonize /usr/bin/unshare --fork --pid --mount-proc /lib/systemd/systemd --system-unit=basic.target

@chopfitzroy
chopfitzroy / procedure-to-archive-git-branches.md
Created September 20, 2022 09:24 — forked from zkiraly/procedure-to-archive-git-branches.md
Procedure to archive git branches.

FWIW: I'm not the author of the content presented here (which is an outline from Edmond Lau's book). I've just copy-pasted it from somewhere over the Internet, but I cannot remember what exactly the original source is. I was also not able to find the author's name, so I cannot give him/her the proper credits.


Effective Engineer - Notes

What's an Effective Engineer?

@chopfitzroy
chopfitzroy / export-toby.js
Created April 11, 2020 22:49 — forked from krishpop/export-toby.js
Export Toby
// code courtesy of Toby team
chrome.storage.local.get("state", o => (
((f, t) => {
let e = document.createElement("a");
e.setAttribute("href", `data:text/plain;charset=utf-8,${encodeURIComponent(t)}`);
e.setAttribute("download", f);
e.click();
})(`TobyBackup${Date.now()}.json`, o.state)
));
<style>
/* BASE RULES */
html, body {
width: 100%;
height: 100%;
background-color: #ccccff;
}
div {
version: "3.6"
services:
# Traefik Reverse Proxy Engine
traefik:
hostname: traefik
image: traefik:latest
container_name: traefik
restart: always
domainname: ${DOMAINNAME}
@chopfitzroy
chopfitzroy / service-workers.md
Created March 15, 2019 01:02 — forked from Rich-Harris/service-workers.md
Stuff I wish I'd known sooner about service workers

Stuff I wish I'd known sooner about service workers

I recently had several days of extremely frustrating experiences with service workers. Here are a few things I've since learned which would have made my life much easier but which isn't particularly obvious from most of the blog posts and videos I've seen.

I'll add to this list over time – suggested additions welcome in the comments or via twitter.com/rich_harris.

Use Canary for development instead of Chrome stable

Chrome 51 has some pretty wild behaviour related to console.log in service workers. Canary doesn't, and it has a load of really good service worker related stuff in devtools.