Skip to content

Instantly share code, notes, and snippets.

View manics's full-sized avatar
🇪🇺
🙂

Simon Li manics

🇪🇺
🙂
View GitHub Profile
@manics
manics / Dockerfile
Last active June 30, 2022 21:26
RDMP all-in-one demo container
FROM mcr.microsoft.com/mssql/server:2019-latest
USER root
RUN apt-get update -y -q && \
apt-get install -y -q \
libgdiplus \
unzip && \
rm -rf /var/lib/apt/lists/*
@manics
manics / README.md
Created June 8, 2022 20:48
Example of generating a partial JSON schema from a JupyterHub related traitlets class

python traitlets2schema.py kubespawner KubeSpawner
Skipping get_pod_url
Skipping modify_pod_hook
Skipping options_from_form
@manics
manics / jupyterhub_find_dockerfiles.ipynb
Last active January 23, 2022 14:04
Find Dockerfiles in JupyterHub GitHub repositories
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@manics
manics / README.md
Last active September 23, 2021 08:41
Create a windows 10 image with virt-install
@manics
manics / Dockerfile
Last active September 19, 2021 14:44
BinderHub in Docker
FROM condaforge/mambaforge:4.10.3-5
RUN mamba install -y -q \
`# https://github.com/jupyterhub/binderhub/blob/c131d73537628ba2f9a635ea63a36ef5e5a0e421/requirements.txt#L1-L20` \
docker-py \
escapism \
jinja2 \
jsonschema \
jupyterhub \
kubernetes \
@manics
manics / gitter_post_message.sh
Created May 8, 2021 17:21
Post a Gitter message using the API with curl and jq
GITTER_TOKEN=<gitter personal access token>
ROOM_NAME=<gitter room name>
MESSAGE="Testing the Gitter API"
USER_ID=$(curl -f -H "Accept: application/json" -H "Authorization: Bearer $GITTER_TOKEN" "https://api.gitter.im/v1/user/me" | jq -r '.id')
ROOM_ID=$(curl -f -X POST -H "Content-Type: application/json" -H "Accept: application/json" -H "Authorization: Bearer $GITTER_TOKEN" "https://api.gitter.im/v1/rooms" -d "{\"uri\":\"$ROOM_NAME\"}" | jq -r '.id')
# Join room
curl -f -X POST -H "Content-Type: application/json" -H "Accept: application/json" -H "Authorization: Bearer $GITTER_TOKEN" "https://api.gitter.im/v1/user/$USER_ID/rooms" -d "{\"id\":\"$ROOM_ID\"}"
@manics
manics / jupyterhub-docker-usermode-podman.md
Last active November 30, 2023 23:10
JupyterHub Dockerspawner with user-mode (rootless) Podman

Running JupyterHub Dockerspawner with user-mode Podman

Tested with Vagrant box generic/ubuntu2004 (libvirt, 3.2.16)

Install Node, Podman, Python3

echo "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_20.04/ /" | sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_20.04/Release.key | sudo apt-key add -
@manics
manics / README.md
Last active October 6, 2023 11:16
JupyterHub in BinderHub

JupyterHub in BinderHub

Binder

Have you ever wanted to run JupyterHub inside BinderHub? No? Didn't think so. But if you did....

@manics
manics / README.md
Last active May 23, 2021 19:15
JupyterHub repositories