Skip to content

Instantly share code, notes, and snippets.

@reegnz
reegnz / README.md
Last active June 8, 2025 03:33
Implementing a jq REPL with fzf

Implementing a jq REPL with fzf

Update: I created jq-zsh-plugin that does this.

One of my favourite tools of my trade is jq. It essentially enables you to process json streams with the same power that sed, awk and grep provide you with for editing line-based formats (csv, tsv, etc.).

Another one of my favourite tools is fzf.

@cloneofsimo
cloneofsimo / prompt.md
Last active June 8, 2025 03:31
Neel's Paper Quality Analysis Prompt

Credit: How to write ML papers by Neel Nanda

You are chatbot that gives constructive analysis of the following work. Specifically, you care about the following criteria:

## Core Narrative Quality
- **Clear Claims**: Contains 1-3 specific, concrete claims that fit within a cohesive theme
- **Strong Motivation**: Clearly explains why readers should care ("so what?")
@rmariuzzo
rmariuzzo / sprintf.js
Created February 2, 2014 01:16
Simple and minimal `sprintf` function in JavaScript.
function sprintf(format) {
var args = Array.prototype.slice.call(arguments, 1);
var i = 0;
return format.replace(/%s/g, function() {
return args[i++];
});
}
@joshjohanning
joshjohanning / deploy.yml
Last active June 8, 2025 03:25
Extracting, replacing values, and re-signing iOS app (IPA)
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: ipa-output
# TODO: set up build certificates and provisioning profiles - see note below
- name: extract ipa
run: |
unzip -q -o -d ${{ runner.temp }}/app ${{ github.workspace }}/$APPNAME.ipa
rm ${{ github.workspace }}/$APPNAME.ipa
@pixelgig
pixelgig / config.xml
Created March 21, 2024 07:14
Download & Install Microsoft Office 2016/365 For Completely Free
<Configuration>
<Add OfficeClientEdition="64">
<Product ID="O365ProPlusRetail">
<Language ID="en-US" />
<ExcludeApp ID="Access" />
<ExcludeApp ID="InfoPath" />
<ExcludeApp ID="Lync" />
<ExcludeApp ID="OneNote" />
<ExcludeApp ID="Outlook" />
@jakeajames
jakeajames / poc.c
Last active June 8, 2025 03:17
CVE-2021-30955 PoC
#include <stdlib.h>
#include <stdio.h>
#include <pthread/pthread.h>
#include <mach/mach.h>
struct ool_msg {
mach_msg_header_t hdr;
mach_msg_body_t body;
mach_msg_ool_ports_descriptor_t ool_ports[];
};
// This is for getting banks and mobile isps in Ghana
export const accountTypeMap = {
bankAccount: "ghipss",
mobileMoney: "mobile_money"
}
type AccountType = typeof keyof accountTypeMap;
type AccountIssuer = Record<"code"| "name" | "accountNumberLength", string>
export default function getAccountIssuers(type: AccountType) {
@Knewest
Knewest / 1_QuickReinstallBetterDiscord.md
Last active June 8, 2025 03:03
Reinstall BetterDiscord seconds after Discord uninstalls it against your will. Avoid using the time consuming installer with this trick.

The Composable Architecture (可组装架构)

The Composable Architecture (简写为TCA) 让你用统一、便于理解的方式来搭建应用程序,它兼顾了组装,测试,以及功效。你可以在 SwiftUI,UIKit,以及其他框架,和任何苹果的平台(iOS、macOS、tvOS、和 watchOS)上使用 TCA。