Skip to content

Instantly share code, notes, and snippets.

@gmalmquist
gmalmquist / pam.py
Last active August 11, 2023 13:14
Command-line stream editing using python.
#!/usr/bin/env python
# coding=utf-8
from __future__ import print_function
from collections import defaultdict
import datetime
import io
import json
import locale
import os
@sturadnidge
sturadnidge / genCert.md
Last active March 21, 2023 09:38
Generate a self signed certificate in 1 line + a config file

To generate a self-signed cert, do the following:

openssl req -config 12factor.req -new -nodes -x509 -newkey rsa:2048 -sha256 -keyout 12factor.key -out 12factor.cert -days 3650

Where 12factor.req is:

[ req ]
default_bits        = 2048
default_keyfile     = 12factor.key
@arthurdapaz
arthurdapaz / FileManager.js
Created July 16, 2021 01:33 — forked from uchcode/FileManager.js
JXA - FileManager
const FileManager = (()=>{
function pwd() {
return $.NSFileManager.defaultManager.currentDirectoryPath.js
}
function cd(path='~') {
if (path==='') path = '.'
let p = $(path).stringByStandardizingPath
let r = $.NSFileManager.defaultManager