Skip to content

Instantly share code, notes, and snippets.

View 413x1nkp's full-sized avatar
:fishsticks:
fishsticks

Alex Murkoff 413x1nkp

:fishsticks:
fishsticks
View GitHub Profile
@MembrilloAmarillo
MembrilloAmarillo / HandmadeHero.toml
Created February 6, 2025 11:11
Handmade Hero inspired theme - Helix
"ui.background" = "#0c0c0cff" # Text area background color
"ui.text" = "#b99468ff" # UI Regular text
"ui.text.focus" = { bg = "#1E1E1Eff",fg = "#a08563ff" }
variable = "#b99468ff"
label = "#b99468ff"
comment = "#686868ff"
"ui.cursor" = { bg = "#00EE00ff", fg = "#00EE00ff"}
"ui.cursor.insert" = { bg = "#00EE00ff", fg = "#00EE00ff"}
"ui.cursor.select" = { bg = "#00EE00ff", fg = "#00EE00ff"}
keyword = "#ac7b0bff"
@trvswgnr
trvswgnr / compress_video
Last active February 5, 2025 20:37
portable shell script to compress videos with ffmpeg
#!/bin/sh
print_usage() {
echo "usage: compress_video <input_file>"
echo "supported formats: mp4, webm, mkv, mov, avi, flv"
}
get_extension() {
f="${1##*/}"
case "$f" in
@FreyaHolmer
FreyaHolmer / GpuPrinter.cginc
Last active May 24, 2025 08:58
A unity shader .cginc to draw numbers in the fragment shader - see the first comment below for example usage!
///////////////////////////////////////////////////////////////////////////////
// ABOUT: A unity Shader .cginc to draw numbers in the fragment shader
// AUTHOR: Freya Holmér
// LICENSE: Use for whatever, commercial or otherwise!
// Don't hold me liable for issues though
// But pls credit me if it works super well <3
// LIMITATIONS: There's some precision loss beyond 3 decimal places
// CONTRIBUTORS: yes please! if you know a more precise way to get
// decimal digits then pls lemme know!
// GetDecimalSymbolAt() could use some more love/precision
@majikayogames
majikayogames / _push_away_rigid_bodies.txt
Last active May 12, 2025 14:10
Godot 4 CharacterBody3D to RigidBody3D Push Interaction Script
# CC0/public domain/use for whatever you want no need to credit
# Call this function directly before move_and_slide() on your CharacterBody3D script
func _push_away_rigid_bodies():
for i in get_slide_collision_count():
var c := get_slide_collision(i)
if c.get_collider() is RigidBody3D:
var push_dir = -c.get_normal()
# How much velocity the object needs to increase to match player velocity in the push direction
var velocity_diff_in_push_dir = self.velocity.dot(push_dir) - c.get_collider().linear_velocity.dot(push_dir)
# Only count velocity towards push dir, away from character
@maximtrp
maximtrp / Orange Pi PC and Arch Linux ARM.md
Last active April 1, 2025 14:01
Guide on how to install Arch Linux ARM on SD card for your Orange Pi PC board

Orange Pi PC & Arch Linux ARM: installation guide

This guide is based on multiple guides as well as official instructions for the other boards found on the Internet:

  1. https://github.com/RoEdAl/alarm-uboot-sunxi-armv7
  2. https://uthings.uniud.it/building-mainline-u-boot-and-linux-kernel-for-orange-pi-boards
  3. https://archlinuxarm.org/platforms/armv7/allwinner/pcduino3

I have gone through all these steps recently and got a working board with my favorite Arch Linux ARM. I hope it will be helpful for someone else.

@moebiussurfing
moebiussurfing / ImGuiDockspaceExample.cpp
Created July 29, 2021 05:43 — forked from AidanSun05/ImGuiDockspaceExample.cpp
A modified DockSpace example for Dear ImGui. Changes are listed at the top of the file.
// CHANGES MADE:
// Added more clarifying comments inside the function.
// Removed MSVC warning C6011 - null pointer dereference.
// Fixed a slight grammar error - "This demo app only demonstrate" => "This demo app only demonstrates"
// Demonstrate using DockSpace() to create an explicit docking node within an existing window.
// Note: You can use most Docking facilities without calling any API. You DO NOT need to call DockSpace() to use Docking!
// - Drag from window title bar or their tab to dock/undock. Hold SHIFT to disable docking.
// - Drag from window menu button (upper-left button) to undock an entire node (all windows).
// About dockspaces:
@RafalJDev
RafalJDev / CountYoutubeVideosTime.js
Last active May 28, 2025 15:42
Count all videos time duration on youtube channel
//You need to run this in javascript console inside chrome (althought should work the same in other browsers)
//Assumptions:
//1. Will count only "expanded" videos on page, you may first need to run script to scroll to last video or do it manually
//2. Tested on chrome, ubuntu, 2019
//3. Time format: hh:mm:ss
var array = document.getElementsByClassName("style-scope ytd-thumbnail-overlay-time-status-renderer");
var arrLength = array.length;
@ddovod
ddovod / gist.cpp
Last active July 7, 2025 09:50
ImGui::TextAnsiColored
/*
MIT License
Copyright (c) 2024 David Dovodov
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
@jstaursky
jstaursky / getline.c
Last active October 6, 2024 12:32
crossplatform getline c function.
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <stddef.h>
typedef ptrdiff_t ssize_t;
/*******************************************************************************
* getline -- Stores line of text from stream. *
* *
* Parameters *
@MightyPork
MightyPork / usb_hid_keys.h
Last active July 8, 2025 16:26
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
*/