Skip to content

Instantly share code, notes, and snippets.

View Firepal's full-sized avatar
🕴️

Firepal

🕴️
View GitHub Profile
import requests
import json
import code
# nicked from the site
FIREBASE_API_KEY = "AIzaSyC02AJ8YNuHAUKTf8e8u8orfZwTrLmqBeo"
IDENTITY_URL = "https://identitytoolkit.googleapis.com/v1"
def access_token_is_valid(access_token):
@Firepal
Firepal / mjpegqs.py
Last active March 16, 2024 11:29
Remove artifacts on Nintendo 3DS camera videos
# This script cleans up a stereoscopic Motion JPEG video by losslessly extracting all frames,
# doing a fast pass of "jpegqs" (this removes edge artifacts caused by quantized DCT coefs)
# then reassembling the Motion JPEG video with the smoothed frames.
# This smoothed video is then converted to AV1, an efficient video codec.
# (You can change the codec/parameters, see line 92.)
# ***Needs some assembly***
# Install binaries of these projects to your PATH:
# jpegqs (prebuilt releases at https://github.com/kilobyte/jpegqs)
@Firepal
Firepal / spring.gd
Last active October 9, 2023 11:39
Inline spring class for Godot
class Spring:
var stiffness = 0.0
var pos = 0.0
var vel = 0.0
var dampen = 0.0
func _init(stiffness=0.1,pos=1,dampen=1):
self.stiffness = stiffness
self.pos = pos
self.dampen = dampen
shader_type spatial;
//render_mode blend_add;
//render_mode unshaded;
uniform float depth = 0.05;
uniform float water_scale = 100.0;
uniform float speed = 1.0;
uniform float underwater_clarity = 0.5;
uniform float roughness : hint_range(0.0,1.0,0.005) = 0.0;