Skip to content

Instantly share code, notes, and snippets.

@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