Skip to content

Instantly share code, notes, and snippets.

@mrhalix
mrhalix / outline_manager.py
Created October 31, 2021 20:42
Outline VPN Manager for Python as a Telegram Bot!
#!/usr/bin/python
"""
Outline VPN Manager for Python as a Telegram Bot!
Simply change API_TOKEN, SERVER_MANAGEMENT_BASE_URL and YOUR_ID to your own options.
"""
import telebot
import requests
import json
from telebot import types
API_TOKEN = 'YOURTOKEN'
@Maharshi-Pandya
Maharshi-Pandya / contemplative-llms.txt
Last active January 8, 2025 19:18
"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
"""Adding a forecasting and amortization feature to Beancount via a plugin
see https://github.com/beancount/beancount/blob/ab3fdc613fd408e5f6d8039b2fe7eb37c0b31a5e/experiments/plugins/forecast.py
also https://github.com/beancount/beancount/blob/d841487ccdda04c159de86b1186e7c2ea997a3e2/beancount/parser/lexer.l#L127-L129
This entry filter plugin uses existing syntax to define and automatically
insert future transactions based on a convention.
A User can create a transaction like this:
@nickferrando
nickferrando / smpte_hd_bars.sh
Created March 2, 2021 18:22
Generate SMPTE Color Bars/1kHz Test Tone with FFMPEG
#Display Custom Message on STMPE Bars and Server's Local Time
ffmpeg -re -f lavfi -i "smptehdbars=rate=30:size=1920x1080" \
-f lavfi -i "sine=frequency=1000:sample_rate=48000" \
-vf drawtext="text='YOUR MESSAGE %{localtime\:%X}':rate=30:x=(w-tw)/2:y=(h-lh)/2:fontsize=48:fontcolor=white:box=1:boxcolor=black" \
-f flv -c:v h264 -profile:v baseline -pix_fmt yuv420p -preset ultrafast -tune zerolatency -crf 28 -g 60 -c:a aac \
"rtmp://your_server_address/stream_key"
#Display Custom Message on STMPE Bars and Time (HH:MM:MS)
@gavinmcfall
gavinmcfall / tb-talos.md
Last active January 8, 2025 19:10
Thunderbolt Networking on Talos

How To: Thunder Networking on Talos

I have a cluster of 3 Minisforum MS-01 Mini PCs running Talos Linux for my k8s cluster. Previously, I had set these machines up using Debian & K3s for the cluster and configured Thudnerbolt Netowrking by follow this video by Jim's Garage Which is baed on this gist series from scyto

Cabling

This is how I have mine connected, this means that each one of the my 3 nodes has a cable going to the other two nodes MS-01_TB_Cabling

@alces
alces / ansible_local_playbooks.md
Last active January 8, 2025 19:10
How to run an Ansible playbook locally
  • using Ansible command line:
ansible-playbook --connection=local 127.0.0.1 playbook.yml
  • using inventory:
127.0.0.1 ansible_connection=local
@HendrixString
HendrixString / ansi.md
Last active January 8, 2025 19:09
ANSI 256 color codes resources
echo -e "testing \033[48;5;88mCOLOR1\033[38;208;48;5;159mCOLOR2\033[m"

The color range of a 256 color terminal consists of 4 parts, often 5, in which case you actually get 258 colors:

  • Color numbers 0 to 7 are the default terminal colors, the actual RGB value of which is not standardized and can often be configured.
  • Color numbers 8 to 15 are the "bright" colors. Most of the time these are a lighter shade of the color with index - 8. They are also not standardized and can often be configured. Depending on terminal and shell, they are often used instead of or in conjunction with bold font faces.
  • Color numbers 16 to 231 are RGB colors. These 216 colors are defined by 6 values on each of the three RGB axes. That is, instead of values 0 - 255, each color only ranges from 0 - 5.
@rob-hills
rob-hills / ubuntu-22.04-mbp-a1707.md
Last active January 8, 2025 19:08
Ubuntu 22.04 on MacBook Pro 2017 (A1707, MBP 14,3)

Summary

Random set of notes and links that have helped me in the saga to get Ubuntu 22.04 up and running on my 2017 MacBook Pro These notes are mainly for myself in the event that I have to do this again some day. But if you find them helpful, that's great.

Important update

Unfortunately the MacBookPro that I bought second hand turned out to be a dud with some serious hardware flaws that didn't show up until a couple of months after I'd bought it.

I've since purhcased another laptop so I'm not going to be able to maintain this GIST.

I'll leave it here for now in case others want to contribute updates, or clone it. If you feel it's out of date or misleading or a waste of time, let me know in the comments and I'll remove it.

Name: Microsoft Server Speech Text to Speech Voice (af-ZA, AdriNeural)
ShortName: af-ZA-AdriNeural
Gender: Female
Locale: af-ZA
VoiceTag: {'ContentCategories': ['General'], 'VoicePersonalities': ['Friendly', 'Positive']}
Name: Microsoft Server Speech Text to Speech Voice (af-ZA, WillemNeural)
ShortName: af-ZA-WillemNeural
Gender: Male
Locale: af-ZA