Skip to content

Instantly share code, notes, and snippets.

View Jamsek-m's full-sized avatar

Miha Jamsek Jamsek-m

View GitHub Profile
@Jamsek-m
Jamsek-m / generator.ts
Last active August 24, 2021 14:05
Generating challenge for use with authorization code flow with PKCE (OpenID Connect) using browser Crypto API
function base64UrlEncode(str: string): string {
return btoa(str)
.replace(/\+/g, "-")
.replace(/\//g, "_")
.replace(/=+$/g, "");
}
function generateCodeVerifier(len: number): string {
const ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
JobID Elapsed
------------ ----------
696068_1 00:01:26
696068_1.ba+ 00:01:26
696068_1.0 00:00:03
696068_1.1 00:00:00
696068_1.2 00:00:01
696068_1.3 00:00:00
696068_1.4 00:00:00
696068_1.5 00:00:01
#!/bin/sh
#SBATCH --job-name=wordcount # Job name
#SBATCH --nodes=1 # Use one node
#SBATCH --ntasks=1 # Run a single task
#SBATCH --mem-per-cpu=1gb # Memory per processor
#SBATCH --time=00:10:00 # Time limit hrs:min:sec
#SBATCH --output=array/array_%A-%a.out # Standard output and error log
#SBATCH --array=1-32 # Array range
#Set the number of runs that each SLURM task should do
@Jamsek-m
Jamsek-m / google-kubernetes-engine-ingress.md
Created January 2, 2020 21:16
Setup for ingress in google kubernetes engine
@Jamsek-m
Jamsek-m / create-docker.sh
Last active January 2, 2020 22:24
Docker container database connect
docker network create moj-net
docker run -d -p 5432:5432 \
-e POSTGRES_USER=uporabnik -e POSTGRES_PASSWORD=geslo \
-e POSTGRES_DB=ime-baze \
--net moj-net \
--name baza-container \
postgres:12
docker run -d -p 8080:8080 \