Skip to content

Instantly share code, notes, and snippets.

@macshome
macshome / defang.md
Last active January 7, 2025 08:44
How to defang system protections on macOS

How to Defang macOS System Protections

If you want to change things on the root drive of a Mac you will need to take some steps to disable the built in security of the system. Most of these steps are the same regardless if you are on Intel or Apple Silicon. If there is a difference it is noted.

Note that all of these things put a Mac into an unsupported and less secure state.

Make sure you either perform these steps in a VM or that you reset the protections after you are done poking around

Protections and Terms

(This list is not exahustive on the details of each. Check the links at the end for more info.)

@martijnvermaat
martijnvermaat / __init__.py
Last active January 7, 2025 08:43
Matplotlib for use in LaTeX
import math
from matplotlib import rcParams
def configure(document_fontsize=14.4, available_width=307.28987):
"""
Configures Matplotlib so saved figures can be used in LaTeX documents.
Uses the sans-serif TeX Gyre Heros font (Helvetica), also for math.
@rsanden
rsanden / tun2socks_proxy_foo.bash
Last active January 7, 2025 08:43
tun2socks TCP+UDP user-wide proxy through shadowsocks and udpgw
#--- Build tun2socks and udpgw (as the user who will use the proxy) ---
mkdir -p $HOME/src
cd $HOME/src
git clone "https://github.com/ambrop72/badvpn"
cd badvpn
mkdir -p build
cd build
export OUTDIR=$PWD
export SRCDIR=$(dirname $PWD)
@EgorBron
EgorBron / discord-revive.md
Last active January 7, 2025 08:42
Восстанавливаем доступ к ДС с помощью Amnezia WG

Оживляем ДС

Быстрый способ (на ~10 минут) для разблокировки Discord вместе с голосовыми каналами. Этот способ также разблокирует YouTube и X/Twitter, а также любые другие заблокированные сайты.

Спасибо ImMAILWARE за скрипт для генерации конфигов.

Я рекомендую сразу перейти к способу с браузером, так как его относительно проще провернуть.

Способ с Linux

@Maharshi-Pandya
Maharshi-Pandya / contemplative-llms.txt
Last active January 7, 2025 08:43
"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
@tzechienchu
tzechienchu / UART.scala
Created July 17, 2021 12:18
UART from Chisel Book
import chisel3._
import chisel3.util._
class Channel extends Bundle {
val data = Input(Bits(8.W))
val ready = Output(Bool())
val valid = Input(Bool())
}
//Single Bye Buffer
@jaretburkett
jaretburkett / person-terms
Created June 27, 2023 02:30
Terms for tagging pictures of humans
aboriginal
above average
abstract composition
abusive
accessories
accountant
acid wash
acne-prone skin
acne scars
#!/bin/bash
# A shell scirpt designed to be executed by qBittorrent's "Run external program on torrent completion"
# This scirpt will send a Slack notification using Slack's Incoming Webhooks with the information of completed torrent
#
# An example how to fill in qBittorrent's "Run external program on torrent completion" to execute this script
# /bin/bash -c "chmod +x /path/to/qbittorrent-slack-notify.sh; /path/to/qbittorrent-slack-notify.sh '%N' '%Z' 'https://hooks.slack.com/services/XXXXXXXXX/YYYYYYYYY/ZZZZZZZZZZZZZZZZZZZZZZZZ'"
#
# Supported parameters (case sensitive):
# - %N: Torrent name