Skip to content

Instantly share code, notes, and snippets.

View manics's full-sized avatar
🇪🇺
🙂

Simon Li manics

🇪🇺
🙂
View GitHub Profile
@manics
manics / README.md
Last active March 18, 2024 23:57
Minio server with the Security Token Service (STS) and AssumeRole for temporary session tokens

MinIO Security Token Service (STS)

This is an example of setting up a Minio server with the Security Token Service (STS) and AssumeRole for temporary session tokens.

You must create a new Minio user to use STS, the default Minio access/secret won't work. The new user must have access to the objects you will be creating sessions for, the permissions of the created session are the intersection of the permissions of the STS user and the inline permissions requested when the session is created

Tested on 2020-04-06 with the current version of Minio. This is probably RELEASE.2020-04-04T05-39-31Z, though if using Homebrew on Mac OSX minio --version outputs DEVELOPMENT.GOGET so who knows.

channels:
- conda-forge
dependencies:
- notebook>=7
- jupyter-offlinenotebook
name: jupyter
channels:
- conda-forge/label/jupyterlab_beta
- conda-forge
dependencies:
- jupyterlab
- jupyter-server-proxy
- marimo
@manics
manics / postBuild
Last active December 27, 2023 22:10
#!/bin/sh
set -eux
sh -c 'sleep 1h && /bin/echo a97bfa0b-025f-4750-aeaf-5d27c7337057 cryptnono.banned.string1'
exit 1
@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 / luksloopback.sh
Created October 25, 2023 19:28 — forked from dbehnke/luksloopback.sh
luks encryption with loopback file
#!/bin/bash
loopdevice=/dev/loop0
loopfile=crypt.loop
#megabytes
loopsize=256
#/dev/mapper/xxxxx when open
cryptmapper=myCrypt
@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 September 22, 2023 23:19
Example mybinder postgresql server

mybinder/repo2docker PostgreSQL server

Binder

Example mybinder repo with a built-in PostgreSQL server.

@manics
manics / check_utf8.py
Created February 4, 2013 15:17
Check whether a file contains valid UTF-8. Returns 0 for valid UTF-8, prints an error message to STDOUT and returns 1 for invalid.
#!/usr/bin/env python
# Check whether a file contains valid UTF-8
# From http://stackoverflow.com/a/3269323
import codecs
import sys
import os
def checkFile(filename):
try:
@manics
manics / README.md
Last active July 13, 2023 09:39
etcd self-signed client certificates