Skip to content

Instantly share code, notes, and snippets.

View ditrytus's full-sized avatar

Jakub Gruszecki ditrytus

View GitHub Profile
@ditrytus
ditrytus / claude_PostToolUse_hook.json
Created July 8, 2025 10:32
Run linter after Claude Code makes a change
{
"hooks": {
"PostToolUse": [
{
"matcher": "Write|Edit|MultiEdit",
"hooks": [
{
"type": "command",
"command": "make format && make lint"
}
@ditrytus
ditrytus / SMBDIS.ASM
Created August 7, 2022 16:56 — forked from 1wErt3r/SMBDIS.ASM
A Comprehensive Super Mario Bros. Disassembly
;SMBDIS.ASM - A COMPREHENSIVE SUPER MARIO BROS. DISASSEMBLY
;by doppelganger ([email protected])
;This file is provided for your own use as-is. It will require the character rom data
;and an iNES file header to get it to work.
;There are so many people I have to thank for this, that taking all the credit for
;myself would be an unforgivable act of arrogance. Without their help this would
;probably not be possible. So I thank all the peeps in the nesdev scene whose insight into
;the 6502 and the NES helped me learn how it works (you guys know who you are, there's no
@ditrytus
ditrytus / marshaller.go
Created June 8, 2021 12:50
Marshaller interface example
package main
import (
"encoding/json"
"fmt"
)
type Enum int
const (
CLUSTER_NAME='dev-adamg'
nodegroup_stack=$(
eksctl utils describe-stacks --cluster $CLUSTER_NAME --color false | \
awk '/StackName: "eksctl-'"${CLUSTER_NAME}"'-nodegroup.*"/ { print $2 }' | \
sed -e 's/[",]//g;s/\s\+//g'
)
nodegroup_role=$(
aws cloudformation describe-stack-events \
@ditrytus
ditrytus / append_pwd.sh
Last active December 2, 2019 13:27
Append current folder to environemnt varialbe
export GOPATH="$(echo $GOPATH):$(pwd)"
@ditrytus
ditrytus / SimpleSurface.shader
Created July 14, 2019 19:41
Simple surface shader
Shader "Custom/SimpleSurface"
{
Properties
{
_MainTex ("Texture", 2D) = "white" {}
}
SubShader
{
CGPROGRAM
struct Input {
float2 uv_MainTex;
float3 viewDir;
float4 color : COLOR;
float4 screenPos;
float3 worldPos;
float3 worldRefl;
float3 worldNormal;
float3 worldRefl;
float3 worldNormal;
@ditrytus
ditrytus / SurfaceShaderOutputAll.shader
Created July 14, 2019 19:32
All output structures of surface shader.
struct SurfaceOutput
{
fixed3 Albedo; // diffuse color
fixed3 Normal; // tangent space normal, if written
fixed3 Emission;
half Specular; // specular power in 0..1 range
fixed Gloss; // specular intensity
fixed Alpha; // alpha for transparencies
};
@ditrytus
ditrytus / VertexFragment.shader
Last active July 15, 2019 17:45
Simple scaffold of vertex and fragment shader.
Shader "Custom/VertexFragment"
{
Properties
{
_MainTex ("Texture", 2D) = "white" {}
}
SubShader
{
Pass
{
@ditrytus
ditrytus / checkerboard.shader
Last active July 11, 2019 08:10
Created with Copy to Gist
Shader "Unlit/Checkerboard"
{
Properties
{
_Density ("Density", Range(2,50)) = 30
}
SubShader
{
Pass
{