Skip to content

Instantly share code, notes, and snippets.

@PyroGenesis
PyroGenesis / windows-dark-mode.md
Last active January 6, 2025 21:41
Enable Windows Dark Mode via registry (no activation needed)
@szepeviktor
szepeviktor / Wistia-download-videos.md
Last active January 6, 2025 21:39
Download Wistia videos - Please do not misuse it!

Download Wistia videos

  1. right-click on the playing video, select Copy link
  2. find Wistia video ID in the copied link e.g. wvideo=tra6gsm6rl
    • alternative: look for e.g. hashedId=tra6gsm6rl in the page source
  3. load http://fast.wistia.net/embed/iframe/ + video ID in your browser
  4. look for "type":"original" in the page source and copy the URL from the next line e.g. "url":"http://embed.wistia.com/deliveries/129720d1762175bcd8e06dcab926ec76ad38ff00.bin"
  • alternative: look for "type":"hd_mp4_video"
@galek
galek / pbr.glsl
Created November 4, 2015 11:10
PBR GLSL SHADER
in vec2 v_texcoord; // texture coords
in vec3 v_normal; // normal
in vec3 v_binormal; // binormal (for TBN basis calc)
in vec3 v_pos; // pixel view space position
out vec4 color;
layout(std140) uniform Transforms
{
mat4x4 world_matrix; // object's world position
@nin-jat
nin-jat / FreeCamera.gd
Last active January 6, 2025 21:36
A FreeCamera for godot. Add it to a camera node and add some input actions for WASD. Supports gamepads.
extends Camera
# How fast the camera speeds up to the moveSpeed and slows down to zero.
export var acceleration = 50.0
# The top speed of the camera.
export var moveSpeed = 8.0
# The speed of the mouse input.
export var mouseSpeed = 300.0
@magnetikonline
magnetikonline / README.md
Last active January 6, 2025 21:36
Bash string manipulation cheatsheet.

Bash string manipulation cheatsheet

Assignment
Assign value to variable if variable is not already set, value is returned.

Combine with a : no-op to discard/ignore return value.
${variable="value"}
: ${variable="value"}
@Maharshi-Pandya
Maharshi-Pandya / contemplative-llms.txt
Last active January 6, 2025 21:35
"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 '[email protected]'
//import $ from 'jquery'
var startValue = '0.00000001', // Don't lower the decimal point more than 4x of current balance
stopPercentage = 0.001, // In %. I wouldn't recommend going past 0.08
maxWait = 500, // In milliseconds
stopped = false,
stopBefore = 1; // In minutes for timer before stopping redirect on webpage
@evgenyneu
evgenyneu / setup_cursor_ubuntu.md
Last active January 6, 2025 21:33
Install Cursor AI code editor on Ubuntu 24.04 LTS

Install Cursor AI editor on Ubuntu 24.04

  1. Use the Download button on www.cursor.com web site. It will download the NAME.AppImage file.

  2. Copy the .AppImage file to your Applications directory

cd ~/Downloads
mkdir -p ~/Applications
mv NAME.AppImage ~/Applications/cursor.AppImage
@bizz84
bizz84 / update-android-project.sh
Created November 18, 2024 09:17
Script to update Gradle, Java and other Android project settings in a Flutter project
#!/bin/bash
# Update Gradle, Java and other Android project settings in a Flutter project
# See: https://gradle.org/releases/
DESIRED_GRADLE_VERSION="8.9"
# Build errors often show the required Java version
DESIRED_JAVA_VERSION="17"
# See: https://developer.android.com/ndk/downloads
DESIRED_NDK_VERSION="27.0.12077973"
# The minimum Android SDK version

Running Quartus + Questa on Apple Silicon

The current methods to run an Intel FPGA workflow on Apple Silicon involve two possibile approaches:

  • Using a WoA Virtual Machine: Performance is terrible (already in amd64 Windows platforms is terrible, adding a virtualization layer on top of it leads to eternal compilation times) + space wasted for all the Microsoft bloatware
  • Using a Docker Container: Performance is better than WoA, but the USB drivers are not working

Running Ubuntu on UTM with Rosetta enabled should tackle these problems

Configuring the virtual machine