Skip to content

Instantly share code, notes, and snippets.

@Kamik423
Kamik423 / subl
Created August 30, 2023 19:26
Open Sublime Text From Windows Subsystem for Linux Version 2
#!/usr/bin/env python3
# Place in /usr/local/bin or some other path in $PATH
# Description: see https://hans.coffee/blog/subl-on-wsl/
import subprocess
import sys
# The path to the Sublime Text Windows executable in the Linxu file-system.
SUBL = "/mnt/c/Program Files/Sublime Text/subl.exe"
@gnattu
gnattu / 0001-Revert-arm64-add-ID_AA64ISAR2_EL1-sys-register.patch
Last active June 28, 2022 22:01
Remove ID_AA64ISAR2_EL1 support from Linux 5.17 for VMware Fusion on Apple Silicon
From 82436c04ef3f9cacf1d19b2634d6bb50a27607ed Mon Sep 17 00:00:00 2001
From: gnattu <gnattuoc@me.com>
Date: Tue, 12 Apr 2022 16:08:12 +0800
Subject: [PATCH 1/3] Revert "arm64: add ID_AA64ISAR2_EL1 sys register"
This reverts commit 9e45365f1469ef2b934f9d035975dbc9ad352116.
---
arch/arm64/include/asm/cpu.h | 1 -
arch/arm64/include/asm/sysreg.h | 16 ----------------
arch/arm64/kernel/cpufeature.c | 11 -----------
@maeneak
maeneak / docker-compose.yaml
Last active December 30, 2025 15:17
HASSIO (Home Assistant Supervised) for Synology DSM 7 (Unsupported Installation but allows updates and fully functional)
version: '3'
services:
hassio:
image: homeassistant/amd64-hassio-supervisor
container_name: hassio_supervisor
privileged: true
security_opt:
- seccomp:unconfined
- apparmor:unconfined
Tribes 1 Model Formats
----------------------
Tribes 1 uses file formats which are similar to file formats used in the Torque Game Engine, with the major difference being more use of tags and versioned objects serialized by class name (working on the same basic principle of class instantiation in torques' console system). Also a lot more emphasis on paletted textures.
Currently this document only covers enough to render .dts, terrain (.dtf,.dtb), and interior (.dig,.dis,.dil) shapes present in Tribes 1. For tribes 2 file formats, your best bet is to check out the earlier torque code.
We'll refer to each field as [type] [name or tag value]. If successive fields need to be at a specific offset indicated by a field, that will be noted with "@nameOffset:" where appropriate. In addition if there is a list of typed data, it will be listed as "type[size]:" followed by the fields of that type.
@yangxuan8282
yangxuan8282 / README.md
Created April 4, 2018 07:03
install Basilisk II on rpi

install Basilisk II without X11 on raspberry pi (raspbian stretch lite)

sudo apt update && sudo apt upgrade -y
sudo apt install automake gobjc -y
@kosua20
kosua20 / gist:0c506b81b3812ac900048059d2383126
Created March 18, 2017 18:35
NVIDIA FXAA 3.11 by TIMOTHY LOTTES
/*============================================================================
NVIDIA FXAA 3.11 by TIMOTHY LOTTES
------------------------------------------------------------------------------
COPYRIGHT (C) 2010, 2011 NVIDIA CORPORATION. ALL RIGHTS RESERVED.
------------------------------------------------------------------------------
TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED
@TheRealMJP
TheRealMJP / Tex2DCatmullRom.hlsl
Last active June 8, 2026 04:28
An HLSL function for sampling a 2D texture with Catmull-Rom filtering, using 9 texture samples instead of 16
// The following code is licensed under the MIT license: https://gist.github.com/TheRealMJP/bc503b0b87b643d3505d41eab8b332ae
// Samples a texture with Catmull-Rom filtering, using 9 texture fetches instead of 16.
// See http://vec3.ca/bicubic-filtering-in-fewer-taps/ for more details
float4 SampleTextureCatmullRom(in Texture2D<float4> tex, in SamplerState linearSampler, in float2 uv, in float2 texSize)
{
// We're going to sample a a 4x4 grid of texels surrounding the target UV coordinate. We'll do this by rounding
// down the sample location to get the exact center of our "starting" texel. The starting texel will be at
// location [1, 1] in the grid, where [0, 0] is the top left corner.
float2 samplePos = uv * texSize;
@palaniraja
palaniraja / timezone.txt
Created March 20, 2016 20:04
osx list of timezone - output of command "sudo systemsetup -listtimezones"
Africa/Abidjan
Africa/Accra
Africa/Addis_Ababa
Africa/Algiers
Africa/Asmara
Africa/Bamako
Africa/Bangui
Africa/Banjul
Africa/Bissau
Africa/Blantyre
@gordonnl
gordonnl / alchemy_AO
Created November 26, 2014 19:31
Alchemy AO Shader
uniform sampler2D depths;
uniform sampler2D wc_normals;
uniform sampler2D random_texture;
uniform vec3 wc_camera_eye_position;
uniform floatz_far;
uniform vec2 tc_window;
uniform mat4 projection_matrix;
@transitive-bullshit
transitive-bullshit / billboard_hbao.frag
Created September 30, 2013 21:10
WebGL GLSL HBAO (Horizon-Based Ambient Occlusion) fragment shader. HBAO is a higher quality approach for computing SSAO (Screen-Space Ambient Occlusion) developed by Nvidia in 2008. Converts the g-buffer to an occlusion buffer which estimates local ambient occlusion at each fragment in screen-space. Specifically, the technique views the depth bu…
// number of directions to sample in UV space
#define NUM_SAMPLE_DIRECTIONS {{ numSampleDirections }}
// number of sample steps when raymarching along a direction
#define NUM_SAMPLE_STEPS {{ numSampleSteps }}
#define APPLY_ATTENUATION {{ attenuation }}
#define USE_ACTUAL_NORMALS {{ useActualNormals }}