Skip to content

Instantly share code, notes, and snippets.

@theorm
theorm / README.md
Created September 23, 2026 14:18 — forked from petergs/README.md
Entra ID First-Party Microsoft Applications

Entra ID First Party Microsoft Applications

csv of pre-consented first-party applications listed via the servicePrincipals endpoint

The list (microsoft-first-party-applications.csv) can be generated via

mgc service-principals list --all --filter "appOwnerOrganizationId eq f8cdef31-a31e-4b4a-93e4-5f571e91255a" --count true --consistency-level eventual --select appId,displayName | jq -r '.value[] | [.appId, .displayName] | @csv'

This list is more extensive, but is missing entries compared to this page from Microsoft Documentation: Verify first-party Microsoft applications in sign-in reports. These applications are captured in applications-from-docs.csv.

A Guide to Encrypting Files with Mac OS X

This guide will demonstrate the steps required to encrypt and decrypt files using OpenSSL on Mac OS X. The working assumption is that by demonstrating how to encrypt a file with your own public key, you'll also be able to encrypt a file you plan to send to somebody else using their private key, though you may wish to use this approach to keep archived data safe from prying eyes.

Too Long, Didn't Read

Assuming you've already done the setup described later in this document, that id_rsa.pub.pcks8 is the public key you want to use, that id_rsa is the private key the recipient will use, and secret.txt is the data you want to transmit…

Encrypting

$ openssl rand 192 -out key

$ openssl aes-256-cbc -in secret.txt -out secret.txt.enc -pass file:key

#!/usr/bin/env pwsh
$ErrorActionPreference = "Stop"
$is_windows = [environment]::OSVersion.Platform.ToString().ToLower().StartsWith("win")
$app_name = "Lumy"
$script_dir = $PSScriptRoot
#!/usr/bin/env pwsh
$ErrorActionPreference = "Stop"
$is_windows = [environment]::OSVersion.Platform.ToString().ToLower().StartsWith("win")
$app_name = "Lumy"
# https://pypi.org/project/appdirs/
import itertools
def dict_product(dicts):
"""
Cartesian product.
See https://stackoverflow.com/questions/5228158/cartesian-product-of-a-dictionary-of-lists
>>> list(dict_product(dict(number=[1,2], character='ab')))
[{'character': 'a', 'number': 1},
{'character': 'a', 'number': 2},
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@theorm
theorm / cantons.geojson
Last active March 23, 2020 17:38
Lu Geojson
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<script>
export default {
name: 'test-component',
functional: true,
props: {
children: Array
},
render (h, context) {
return (context.props.children || []).map(child => {
if (typeof child === 'string') return child
from flair.data import Sentence
from flair.models import SequenceTagger
tagger = SequenceTagger.load('ner')
filename = 'ts.txt'
out_filename = 'ts_with_entities.txt'
cnt = 0
with open(filename) as f:
# Create a new directory and enter it
function mkd() {
mkdir -p "$@" && cd "$@"
}
# Determine size of a file or total size of a directory
function fs() {
if du -b /dev/null > /dev/null 2>&1; then
local arg=-sbh
else