Skip to content

Instantly share code, notes, and snippets.

View jrk's full-sized avatar

Jonathan Ragan-Kelley jrk

View GitHub Profile
@NatElkins
NatElkins / cloud-init.yaml
Created March 8, 2025 22:09
cloud-init script for VPS
#cloud-config
# Enable automatic package updates and upgrades during cloud-init execution
package_update: true
package_upgrade: true
packages:
# Security and Hardening
- ufw
- fail2ban
@ngxson
ngxson / FAQ.md
Last active April 11, 2025 16:27
convert ARM NEON to WASM SIMD prompt

Why did you do this?

Relax, I only have one Sunday to work on idea, literally my weekend project. So I tried Deepseek to see if it can help. Surprisingly, it works and it saves me another weekend...

What is your setup?

Just chat.deepseek.com (cost = free) with prompts adapted from this gist.

Does it work in one-shot or I have to prompt it multiple times?

@marcelofern
marcelofern / converter.c
Created August 26, 2024 09:39
Website converter (.md -> .html)
/* converter.c
*
* This code converts `.md` files into `.html` files.
*
* The main use is to write a static website in `.md` files, and then run this
* program to convert it to `.html`
*
* The program relies on the following variables:
*
* - INPUT_FOLDER: full path of the website with `.md` files.
@iliyang
iliyang / latexmkrc
Created June 23, 2024 21:43
A latexmkrc file to compress PDFs with non-JPEG images on Overleaf after compilation
#!/usr/bin/perl
## Put this (Perl) file in the root of your Overleaf project. It overrides the
## `pdflatex` compilation command to run GhostScript as a post-process which will
## compress non-JPEG images to JPEG in the output PDF file. The JPEG quality
## settings are set to high to minimize the loss of image quality. This should
## work well even for images that contain a lot of high-frequency noise.
## To disable, simply rename the file to something other than latexmkrc.
##
## Created by Iliyan Georgiev.
@dhh
dhh / linux-setup.sh
Last active April 19, 2025 20:44
linux-setup.sh
# THIS LINUX SETUP SCRIPT HAS MORPHED INTO A WHOLE PROJECT: HTTPS://OMAKUB.ORG
# PLEASE CHECKOUT THAT PROJECT INSTEAD OF THIS OUTDATED SETUP SCRIPT.
#
#
# Libraries and infrastructure
sudo apt update -y
sudo apt install -y \
docker.io docker-buildx \
build-essential pkg-config autoconf bison rustc cargo clang \
@kconner
kconner / macOS Internals.md
Last active April 19, 2025 12:52
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

@stefanschmidt
stefanschmidt / date_add_to_mod.c
Created March 19, 2023 01:51
Set "Date Added" in macOS Finder to match "Date Modified"
#include <stdlib.h>
#include <string.h>
#include <sys/attr.h>
#include <unistd.h>
#include <stdio.h>
/*
* For a list of files set "Date Added" in
* macOS Finder to match "Date Modified"
*
@meub
meub / download-aura-photos.py
Last active March 7, 2025 23:08
This is a simple script to bulk download all the photos from an Aura digital picture frame (auraframes.com). Aura provides no easy way to bulk download photos off of frames so I created this for use with Python 3.
# I created a repo for this project here: https://github.com/meub/aura-frame-downloader
#!/bin/bash
# This script backs up files using restic and sends emails on success or errors.
#
# Files that the script expects:
# /usr/local/etc/restic/repo.env: shell variables that define the restic repository
# /usr/local/etc/restic/include.txt: paths to back up
# /usr/local/etc/restic/exclude.txt: paths to not include in the backup, even if they are in include.txt
#
# Inspired by https://gist.github.com/perfecto25/18abbd6cfbaa4e9eb30251470e9b7504
@robmiller
robmiller / play-wordle.rb
Last active February 15, 2022 19:40
A command-line, offline version of Wordle. A new word every time you run it.
#!/usr/bin/env ruby
#
# Play a command-line version of Wordle
#
# Original game by Josh Wardle: https://www.powerlanguage.co.uk/wordle/
#
# Installation and usage:
#
# 1. Save this file somewhere as play-wordle.rb
# 2. Run `ruby play-wordle.rb`