Skip to content

Instantly share code, notes, and snippets.

@PotatoesMaster
PotatoesMaster / main.js
Last active April 24, 2026 15:11
Simple OIDC NodeJs confidential client, displaying userInfo (for testing purpose)
/**
* OIDC-protected Node.js POC server — zero dependencies
*
* Required environment variables:
* OIDC_WELL_KNOWN e.g. https://accounts.google.com/.well-known/openid-configuration
* OIDC_CLIENT_ID your client ID
* OIDC_CLIENT_SECRET your client secret
*
* Optional:
* PORT (default: 3000)
@PotatoesMaster
PotatoesMaster / jspm.md
Last active February 10, 2025 23:13
JSPM usage example

Using JSPM to generate import map for ES modules.

Getting started : JSPM

  1. Install jspm globally (or locally, if so run npx jspm instead of jspm):
npm install -g jspm
  1. Create a directory, install npm dependencies (es-module-shims is an importmap polyfill that jspm includes by default):
@PotatoesMaster
PotatoesMaster / dict-fr.7z
Last active June 19, 2024 08:10
Dictionnaire français pour Intellij IDEA
@PotatoesMaster
PotatoesMaster / commands.py
Created January 29, 2015 18:43
Cd command hack for case-insensitive completion in ranger 1.6.1
from ranger.config.commands import cd
class cd(cd):
def tab(self):
import os
from os.path import dirname, basename, expanduser, join
cwd = self.fm.thisdir.path
rel_dest = self.rest(1)
@PotatoesMaster
PotatoesMaster / fdfmdaemon.py
Created December 19, 2013 12:47
A simple daemon implementing freedesktop.org's file manager interface.This interface is used by Firefox download manager to select a downloaded file in the file manager (since Firefox 28).
#!/usr/bin/env python
# This program is free software. It comes without any warranty, to the extent
# permitted by applicable law. You can redistribute it and/or modify it under
# the terms of the Do What The Fuck You Want To Public License, Version 2, as
# published by Sam Hocevar. See http://www.wtfpl.net/ for more details.
"""
This is a simple daemon implementing freedesktop.org's file manager interface
(http://www.freedesktop.org/wiki/Specifications/file-manager-interface/).