Skip to content

Instantly share code, notes, and snippets.

@Maharshi-Pandya
Maharshi-Pandya / contemplative-llms.txt
Last active January 14, 2025 04:48
"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
@Panakotta00
Panakotta00 / Unreal Engine - Diff-Merge-Tool Setup.adoc
Last active January 14, 2025 04:47
Use the Unreal Editor as Git Diff/Merge Tool

Unreal Engine Asset Diff/Merge-Tool with Git!

Since unreal engines assets are binary encoded classical text based git diff/merge tools will give up on merge conflicts of unreal assets. But fear not! You can setup your git environment to actually be able to diff/merge these .uasset files by using already built-in functionallity of the unreal editor!

Creating the PowerShell-Script

First of all do we have to create a small PowerShell-Script that copies the diff files into temporary files and to convert relative paths to absolute ones.

@lopspower
lopspower / README.md
Last active January 14, 2025 04:46
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

@probonopd
probonopd / Wayland.md
Last active January 14, 2025 04:42
Think twice about Wayland. It breaks everything!

Think twice before abandoning Xorg. Wayland breaks everything!

Hence, if you are interested in existing applications to "just work" without the need for adjustments, then you may be better off avoiding Wayland.

Wayland solves no issues I have but breaks almost everything I need. Even the most basic, most simple things (like xkill) - in this case with no obvious replacement. And usually it stays broken, because the Wayland folks mostly seem to care about Automotive, Gnome, maybe KDE - and alienating everyone else (e.g., people using just an X11 window manager or something like GNUstep) in the process.


As 2024 is winding down:

@yuchenlin
yuchenlin / gpt_sent_prob.py
Last active January 14, 2025 04:41
Compute sentence probability using GPT-2 with huggingface transformers
import torch
from transformers import OpenAIGPTTokenizer, OpenAIGPTLMHeadModel
from transformers import GPT2Tokenizer, GPT2LMHeadModel
import numpy as np
from scipy.special import softmax
def model_init(model_string, cuda):
if model_string.startswith("gpt2"):
tokenizer = GPT2Tokenizer.from_pretrained(model_string)
model = GPT2LMHeadModel.from_pretrained(model_string)
@dimasmiftah
dimasmiftah / whatsapp-spam
Last active January 14, 2025 04:40
whatsapp-spam | JavaScript code for spamming WhatsApp chat. https://vt.tiktok.com/ZSvHxrsX/
const input = document.querySelectorAll("[contenteditable='true']")[1];
function dispatch(input, message) {
var evt = new InputEvent('input', {
bubbles: true,
});
input.innerHTML = message;
input.dispatchEvent(evt);
document.querySelector('span[data-icon="send"]').click();
}
@andersevenrud
andersevenrud / alacritty-tmux-vim_truecolor.md
Last active January 14, 2025 04:38
True Color (24-bit) and italics with alacritty + tmux + vim (neovim)

True Color (24-bit) and italics with alacritty + tmux + vim (neovim)

This should make True Color (24-bit) and italics work in your tmux session and vim/neovim when using Alacritty (and should be compatible with any other terminal emulator, including Kitty).

Testing colors

Running this script should look the same in tmux as without.

curl -s https://gist.githubusercontent.com/lifepillar/09a44b8cf0f9397465614e622979107f/raw/24-bit-color.sh >24-bit-color.sh
@4Kaylum
4Kaylum / DiscordPy Tutorial.md
Last active January 14, 2025 04:37
A simple bot tutorial for Discord.py

Writing a Discord bot with Discord.py

Hey one, hey all, and welcome to a basic Discord bot writing tutorial. This is a basic tutorial that doesn't cover coding in general, but rather how to work with the Discord.py (v1.0.0a) library and how to write a simple bot with it. General help can be found on the Discord API guild and in the documentation.

This tutorial assumes some prior knowledge of programming, and assumes you already have Python3.5 (and Pip) or later installed and added to your PATH.

With that, let's get to it.

Installation

/*
* --------------------------------------------------------------------------------------------------------------------
* Example sketch/program showing how to read data from a PICC to serial.
* --------------------------------------------------------------------------------------------------------------------
* This is a MFRC522 library example; for further details and other examples see: https://github.com/miguelbalboa/rfid
*
* Example sketch/program showing how to read data from a PICC (that is: a RFID Tag or Card) using a MFRC522 based RFID
* Reader on the Arduino SPI interface.
*
* When the Arduino and the MFRC522 module are connected (see the pin layout below), load this sketch into Arduino IDE