Skip to content

Instantly share code, notes, and snippets.

@ih2502mk
ih2502mk / list.md
Last active March 25, 2026 18:46
Quantopian Lectures Saved
@fatum12
fatum12 / ttc2ttf.pe
Last active March 25, 2026 18:45
Unpack .ttc and .dfont to .ttf using FontForge
#!/usr/local/bin/fontforge
# Usage: fontforge -script ttc2ttf.pe /path/to/font.ttc
fonts = FontsInFile($1)
n = SizeOf(fonts)
i = 0
while (i < n)
Open($1 + "(" + fonts[i] + ")", 1)
index = ToString(i + 1)
@jermnelson
jermnelson / marc2dc.py
Created March 11, 2015 16:09
Command-line script for converting MARC21 to Dublin Core XML
"""Python script for converting MARC21 to Dublin Core XML
Usage:
Command-line
$ mkdir output_xml
$ cp marc2dc.py output_xml/.
$ cd output_xml
$ python marc2dc.py --marc E:\Research\test-marc-file.mrc
"""
@apolloclark
apolloclark / postgres cheatsheet.md
Last active March 25, 2026 18:43
postgres cheatsheet

Postgres Cheatsheet

This is a collection of the most common commands I run while administering Postgres databases. The variables shown between the open and closed tags, "<" and ">", should be replaced with a name you choose. Postgres has multiple shortcut functions, starting with a forward slash, "". Any SQL command that is not a shortcut, must end with a semicolon, ";". You can use the keyboard UP and DOWN keys to scroll the history of previous commands you've run.

Setup

installation, Ubuntu

http://www.postgresql.org/download/linux/ubuntu/ https://help.ubuntu.com/community/PostgreSQL

@LGUG2Z
LGUG2Z / komorebi.json
Created March 25, 2026 15:46
My current komorebi for mac config
{
"$schema": "https://gist.githubusercontent.com/LGUG2Z/78b3dd12a7b7069f1d1c60621fe50730/raw",
"app_specific_configuration_path": "$HOME/komorebi-application-specific-configuration/applications.mac.json",
"cross_monitor_move_behaviour": "Insert",
"cross_boundary_behaviour": "Monitor",
"default_workspace_padding": 15,
"default_container_padding": 15,
"resize_delta": 100,
"floating_window_aspect_ratio": "Widescreen",
"floating_layer_behaviour": "Float",
(declaim (inline mvfold))
#-sbcl
(defun mvfold (f initf &rest lsts)
(declare (dynamic-extent lsts))
(declare (optimize (speed 3)))
(when (or (null lsts) (some #'null lsts))
(return-from mvfold (funcall initf)))
(let ((acc (multiple-value-list (funcall initf))))
(do ()
((progn
@lukeplausin
lukeplausin / transfer_ssm_file.sh
Last active March 25, 2026 18:31
Transfer a file to EC2 SSM instance without using S3 (SSM only)
# This script will explain how to transfer a file to EC2 using SSM ONLY!
# You will need to have permission to run SSM commands on the target machine and have sudo access as well
# Infos
INSTANCE_ID=i-1234567890
FILE_NAME=the_file.tar.gz
# Step 1: Run command on machine to install netcat and dump from port to filename
# < Start session
@jkullick
jkullick / reset-windows-password-chntpw-linux.md
Last active March 25, 2026 18:27
Reset Windows Password with chntpw on Linux
  1. Install required Packages:
apt-get install chntpw ntfs-3g
  1. Mount Windows Partition:
mount -t ntfs /dev/sda2 /mnt
@jamesyang124
jamesyang124 / ruby_meta.md
Last active March 25, 2026 18:21
Ruby meta programming

Ruby Metaprogramming Guide

Note: This guide works with Ruby 2.6+ through Ruby 3.x, with modern Ruby 3.x features highlighted where applicable. Core metaprogramming concepts remain consistent across Ruby versions.

This document has been collaboratively updated and modernized through an interactive process with Claude Code, revised with examples, visual diagrams, and Ruby 3.x compatibility.

Table of Contents

  1. Key Concepts
  2. Self