Skip to content

Instantly share code, notes, and snippets.

View vonera's full-sized avatar

Dimitri Igdalov vonera

  • USI, Institute of Computational Science
  • Lugano, Switzerland
View GitHub Profile
@PhilipSchmid
PhilipSchmid / minio-upload.sh
Created November 19, 2020 13:38
Upload data to Minio using CURL
#!/bin/bash
# Usage: ./minio-upload my-bucket my-file.zip
bucket=$1
file=$2
host=minio.example.com
s3_key=svc_example_user
s3_secret=svc_example_user_password
@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.

@tpogden
tpogden / run_notebooks.py
Last active February 7, 2023 14:02
Run a Set of Jupyter Notebooks from the Command Line
# ! python
# coding: utf-8
import os
import argparse
import glob
import nbformat
from nbconvert.preprocessors import ExecutePreprocessor
from nbconvert.preprocessors.execute import CellExecutionError
@thomasdarimont
thomasdarimont / app.py
Last active April 24, 2024 19:42
Simple python example using flask, flask_oidc and keycloak
import json
import logging
from flask import Flask, g
from flask_oidc import OpenIDConnect
import requests
logging.basicConfig(level=logging.DEBUG)
app = Flask(__name__)
@muendelezaji
muendelezaji / bash-to-zsh-hist.py
Created October 5, 2016 14:18 — forked from op/bash-history-to-zsh-history.py
Convert Bash history to Zsh history
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# This is how I used it:
# $ cat ~/.bash_history | python bash-to-zsh-hist.py >> ~/.zsh_history
import sys
import time
@thomasdarimont
thomasdarimont / ConditionalOtpFormAuthenticator.java
Last active November 15, 2023 05:49
Keycloak Conditional OTP Step-by-Step
package org.keycloak.authentication.authenticators.browser;
import org.keycloak.authentication.AuthenticationFlowContext;
import org.keycloak.models.RoleModel;
import org.keycloak.models.UserModel;
import javax.ws.rs.core.MultivaluedMap;
import java.util.List;
import java.util.Map;
import java.util.regex.Pattern;
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active May 3, 2024 12:59
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

import os
import pytest
from alembic.command import upgrade
from alembic.config import Config
from project.factory import create_app
from project.database import db as _db