Skip to content

Instantly share code, notes, and snippets.

@jmarceno
jmarceno / water.shader
Created October 28, 2021 23:57
Water Realistic shader for Godot 3.4
/*
Shader from https://godotshaders.com/shader/realistic-water/
Modified to work with Godot 3.4
Realistic Water Shader for GODOT 3.1.1
Copyright (c) 2019 UnionBytes, Achim Menzel (alias AiYori)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
@shahrilnet
shahrilnet / z3_prime.py
Last active June 25, 2021 00:16
Generating list of valid prime numbers using Z3 theorem prover
'''
Using Z3 to check if the number is prime
Original reference: https://stackoverflow.com/a/35653749/1768052
'''
from z3 import *
def isPrime(x):
y, z = Ints("y z")
@geekman
geekman / myusbgadget
Created January 17, 2017 02:47
Pi Zero multiple USB gadgets minimal example
#!/bin/bash -e
modprobe libcomposite
cd /sys/kernel/config/usb_gadget/
mkdir g && cd g
echo 0x1d6b > idVendor # Linux Foundation
echo 0x0104 > idProduct # Multifunction Composite Gadget
echo 0x0100 > bcdDevice # v1.0.0
@MightyPork
MightyPork / usb_hid_keys.h
Last active March 31, 2025 21:42
USB HID Keyboard scan codes
/**
* USB HID Keyboard scan codes as per USB spec 1.11
* plus some additional codes
*
* Created by MightyPork, 2016
* Public domain
*
* Adapted from:
* https://source.android.com/devices/input/keyboard-devices.html
*/