Skip to content

Instantly share code, notes, and snippets.

@codejedi365
codejedi365 / x11_docker_mac.md
Created March 5, 2022 18:48 — forked from cschiewek/x11_docker_mac.md
X11 in docker on macOS

To forward X11 from inside a docker container to a host running macOS

  1. Install XQuartz: https://www.xquartz.org/
  2. Launch XQuartz. Under the XQuartz menu, select Preferences
  3. Go to the security tab and ensure "Allow connections from network clients" is checked.
  4. Run xhost + ${hostname} to allow connections to the macOS host *
  5. Setup a HOSTNAME env var export HOSTNAME=`hostname`*
  6. Add the following to your docker-compose:
 environment:
@codejedi365
codejedi365 / Dockerfile
Last active July 22, 2023 13:06
Transfer Public GPG keys to devcontainer
ARG VARIANT="16-bullseye"
FROM mcr.microsoft.com/vscode/devcontainers/typescript-node:${VARIANT}
# ALTERNATIVE for GnuPG/MacGPG2 2.2.27 related to https://github.com/microsoft/vscode-remote-release/issues/5527
# publickeys.asc is created by initializeCommand's script
COPY --chown=node:node ./publickeys.asc /tmp/
# only imports usable & necessary signatures into keybox
RUN su node -c "gpg --import-filter drop-sig='expired == 0' --import-options import-clean --import /tmp/publickeys.asc" \
&& rm /tmp/publickeys.asc
@codejedi365
codejedi365 / Readme.md
Created November 29, 2021 02:09 — forked from dominikwilkowski/Readme.md
How to install a man page into a node.js app

How to install a man page into a node.js app

Cuttlebelle man page

Installing a man page is not easy as there are little infos out there about it.

After a lot of trial and error, google searches and alpha publishing my app I finally have a collection of things I need to do to get it working:

@codejedi365
codejedi365 / README.md
Last active January 8, 2024 11:19
Configuring Typescript project with `ts-jest` & `jest-extended`

TS-JEST & JEST-EXTENDED SUPPORT

This gist is designed to explain how to configure a project where you have your test code separated from your codebase. The project file structure looks a bit like this:

project
├─┬ lib                    # could be src
│ ├── globals.d.ts         # source code specific type declarations
│ └── index.ts
├─┬ tests