Skip to content

Instantly share code, notes, and snippets.

@Maharshi-Pandya
Maharshi-Pandya / contemplative-llms.txt
Last active April 24, 2025 07:41
"Contemplative reasoning" response style for LLMs like Claude and GPT-4o
You are an assistant that engages in extremely thorough, self-questioning reasoning. Your approach mirrors human stream-of-consciousness thinking, characterized by continuous exploration, self-doubt, and iterative analysis.
## Core Principles
1. EXPLORATION OVER CONCLUSION
- Never rush to conclusions
- Keep exploring until a solution emerges naturally from the evidence
- If uncertain, continue reasoning indefinitely
- Question every assumption and inference
import os
import re
import sys
from urllib.parse import urlparse, urlunparse
import toml
PIPFILE_TO_UV_DEP_NAMES = {"packages": "dependencies", "dev-packages": "dev-dependencies"}
@Bartvz
Bartvz / balance-irqs.sh
Created October 17, 2024 15:18
A script to balance IRQs for the Belkin RT3200 running OpenWRT
#!/bin/sh
# Function to set IRQ affinity
set_affinity() {
irq=$1
cpu_mask=$2
# Check if the CPU mask is valid
if echo "$cpu_mask" | grep -qE '^[0-9A-Fa-f]+$'; then
echo "$cpu_mask" > "/proc/irq/$irq/smp_affinity" 2>/dev/null
@gd3kr
gd3kr / script.js
Created February 15, 2024 06:30
Download a JSON List of twitter bookmarks
/*
the twitter api is stupid. it is stupid and bad and expensive. hence, this.
Literally just paste this in the JS console on the bookmarks tab and the script will automatically scroll to the bottom of your bookmarks and keep a track of them as it goes.
When finished, it downloads a JSON file containing the raw text content of every bookmark.
for now it stores just the text inside the tweet itself, but if you're reading this why don't you go ahead and try to also store other information (author, tweetLink, pictures, everything). come on. do it. please?
*/
#!/usr/bin/python3
# import requests
import json
import time
from datetime import datetime, timedelta
from urllib.parse import quote
import jwt
import uuid
import logging
@jauderho
jauderho / gist:67ff70804f21d88bd66e69d84e5d8783
Last active June 29, 2024 20:26
HOWTO: Switch OpenWrt from using wolfssl to mbedtls manually (22.03 to 23.05)
#!/bin/sh
#
# from https://forum.openwrt.org/t/openwrt-23-05-0-rc1-first-release-candidate/162544/27
#
# auc will not work as-is to upgrade from 22.03 to 23.05 due to the mbedtls switch
# therefore, we need to first switch from wolfssl to mbedtls while on 22.03 before using auc
#
cd /root || exit
opkg update
/**
* This sketch connects an AirGradient DIY sensor to a WiFi network, and sends
* these metrics via MQTT. Adapted from original by Jeff Geerling.
*/
#include <AirGradient.h>
#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <PubSubClient.h>

Moved to repo: /quenhus/uBlock-Origin-dev-filter

In order to keep filters up to date, please use this repo.

@MarkDana
MarkDana / m1-max-numpy-setup.md
Last active January 21, 2025 16:07
Install NumPy on M1 Max

How to install numpy on M1 Max, with the most accelerated performance (Apple's vecLib)? Here's the answer as of Dec 6 2021.


Steps

I. Install miniforge

So that your Python is run natively on arm64, not translated via Rosseta.

  1. Download Miniforge3-MacOSX-arm64.sh, then
  2. Run the script, then open another shell
$ bash Miniforge3-MacOSX-arm64.sh
@otherjoel
otherjoel / spf-fail.rkt
Last active July 2, 2024 06:35
Generate a form email to explain to someone at another company that their SPF is broken
#lang racket/base
;; Generate a form email to let someone know their SPF records are misconfigured for their current email provider.
;;
;; Run (fill-report "domain.com" "1.2.3.4") where the 2nd arg is the sending email server's IP address.
;; It will copy the completed report to the clipboard for you.
;; Only works on Windows for now.
(require net/dns