Skip to content

Instantly share code, notes, and snippets.

View morisono's full-sized avatar

morisono

View GitHub Profile
@morisono
morisono / markdown-parser.ts
Created September 7, 2025 15:18 — forked from wazeerc/markdown-parser.ts
Markdown Parser using remark
//#region: Markdown parsing utils
import rehypeFormat from "rehype-format";
import rehypeStringify from 'rehype-stringify';
import remarkGfm from "remark-gfm";
import remarkParse from 'remark-parse';
import remarkRehype from 'remark-rehype';
import { unified } from 'unified';
export async function parseMarkdown(textToParseIntoMarkdown: string): Promise<unknown> {
const markdownProcessor = unified()
@morisono
morisono / export-pull-request.md
Created August 29, 2025 08:05 — forked from jarnheimer/export-pull-request.md
Guide on how to export a pull request to a file

Export pull request

GitHub

Save a pull request as a pr.diff

curl -H "Accept: application/vnd.github.v3.diff" -u [username]:[personal_access_token] https://api.github.com/repos/[organization]/[repo]/pulls/[pull id] > pr.diff 

Replace

  • username your Github username
@morisono
morisono / medium.user.js
Created August 23, 2025 02:44 — forked from mathix420/medium.user.js
Bypass Medium Paywall - Working late 2023 - Greasy Fork, Violentmonkey, Tampermonkey - Click the RAW button to install
// ==UserScript==
// @name Medium Paywall Bypass
// @namespace Violentmonkey Scripts
// @run-at document-start
// @match *://*.medium.com/*
// @match *://medium.com/*
// @match *://*/*
// @grant none
// @version 2.4
// @inject-into content
@morisono
morisono / 1.srp.py
Created August 18, 2025 05:00
SOLID Principles explained in Python with examples.
"""
Single Responsibility Principle
“…You had one job” — Loki to Skurge in Thor: Ragnarok
A class should have only one job.
If a class has more than one responsibility, it becomes coupled.
A change to one responsibility results to modification of the other responsibility.
"""
class Animal:
def __init__(self, name: str):
@morisono
morisono / README.md
Created August 18, 2025 04:57 — forked from corlaez/README.md
Hexagonal Architecture and Modular Implementation

Hexagonal Architecture

Conceptualized by Alistair Cockburn. Also known as "Ports and Adapters".

In a nutshell:

Application Driver -> Primary Adapter -> Primary Port -> Use Case -> Secondary Port -> Secondary Adapter -> External System/Side Effect
@morisono
morisono / README.md
Created August 18, 2025 04:57 — forked from corlaez/README.md
Hexagonal Architecture and Modular Implementation

Hexagonal Architecture

Conceptualized by Alistair Cockburn. Also known as "Ports and Adapters".

In a nutshell:

Application Driver -> Primary Adapter -> Primary Port -> Use Case -> Secondary Port -> Secondary Adapter -> External System/Side Effect

Hexagonal Architecture Explained

How the Ports & Adapters architecture simplifies your life, and how to implement it

image

Alistair Cockburn

Juan Manuel Garrido de Paz

@morisono
morisono / README.md
Created August 12, 2025 09:40 — forked from fortune/README.md
Python プロセスのシグナル制御のサンプルコード

Python プロセスのシグナル制御のサンプル

@morisono
morisono / open-source-sso.md
Created August 2, 2025 23:53 — forked from bmaupin/open-source-sso.md
Comparison of some open-source SSO implementations

⚠️ This is not maintained. Feel free to check comments and/or forks for more current options.

Background

This was created years ago; at the time I'd been a Shibboleth admin for nearly a decade but we needed something that could handle OIDC/OAuth and that explicitly supported OpenJDK. After a lot of investigation, I really liked Keycloak/Red Hat Single Sign-On. More details here: Gluu vs keycloack vs wso2 identity management

Comparison

(Items in bold indicate possible concerns)

#!/bin/zsh
# WARNING! The script is meant to show how and what can be disabled. Don’t use it as it is, adapt it to your needs.
# Credit: Original idea and script disable.sh by pwnsdx https://gist.github.com/pwnsdx/d87b034c4c0210b988040ad2f85a68d3
# Disabling unwanted services on macOS Big Sur (11), macOS Monterey (12), macOS Ventura (13) and macOS Sonoma (14)
# Disabling SIP is required ("csrutil disable" from Terminal in Recovery)
# Modifications are written in /private/var/db/com.apple.xpc.launchd/ disabled.plist, disabled.501.plist
# To revert, delete /private/var/db/com.apple.xpc.launchd/ disabled.plist and disabled.501.plist and reboot; sudo rm -r /private/var/db/com.apple.xpc.launchd/*
# user