Skip to content

Instantly share code, notes, and snippets.

@notnotrobby
notnotrobby / cgp.md
Last active November 10, 2025 14:26
List of free resources to study computer graphics programming.
@cgcardona
cgcardona / multi-secp-tx.ts
Last active August 3, 2020 19:54
Example of creating a BaseTx using Avalanche.js with multiple Secp256k1 inputs and outputs of different assetIDs for the Avalanche network
// The setup
// AVAX Balance
// curl -X POST --data '{
// "jsonrpc":"2.0",
// "id" : 1,
// "method" :"avm.getBalance",
// "params" :{
// "address":"X-EKpEPX56YA1dsaHBsW8X5nGqNSwJ7JrWH",
// "assetID": "AVA"
// }
@bergmannjg
bergmannjg / rearct-native-app-in-wsl2.md
Last active November 4, 2025 06:00
Building a react native app in WSL2
import React, { useState, useEffect } from 'react';
import PropTypes from 'prop-types';
import { Image, StyleSheet, Dimensions } from 'react-native';
import FastImage from 'react-native-fast-image';
import ImageZoom from 'react-native-image-pan-zoom';
// ZoomableImage component renders a zoomable FastImage the size of the screen dimensions.
const dims = Dimensions.get('window');
@markknol
markknol / shadertoy.md
Last active November 9, 2025 01:44
Shader cheatsheet (from shadertoy)

This help only covers the parts of GLSL ES that are relevant for Shadertoy. For the complete specification please have a look at GLSL ES specification

Language:

Version: WebGL 2.0
Arithmetic: ( ) + - ! * / %
Logical/Relatonal: ~ < > <= >= == != && ||
Bit Operators: & ^ | << >>
Comments: // /* */
Types: void bool int uint float vec2 vec3 vec4 bvec2 bvec3 bvec4 ivec2 ivec3 ivec4 uvec2 uvec3 uvec4 mat2 mat3 mat4 mat?x? sampler2D, sampler3D samplerCube
Format: float a = 1.0; int b = 1; uint i = 1U; int i = 0x1;

@foloinfo
foloinfo / .js
Last active March 31, 2021 13:15
Workaround for uploading files from `assets-library` path on iOS with expo
// img
// {
// uri: '"assets-library://asset/asset.JPG?id=SOME_ID&ext=JPG"',
// md5: "some md5"
// }
// copy into cache dir first
const path = FileSystem.cacheDirectory + img.md5
await FileSystem.copyAsync({
from: img.uri,
@jjvillavicencio
jjvillavicencio / setup.sh
Last active October 30, 2025 22:36
Install Android SDK on Windows Bash (WSL)
cd /home/<user>/
sudo apt-get install unzip
wget https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip
unzip sdk-tools-linux-4333796.zip -d Android
rm sdk-tools-linux-4333796.zip
sudo apt-get install -y lib32z1 openjdk-8-jdk
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export PATH=$PATH:$JAVA_HOME/bin
printf "\n\nexport JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64\nexport PATH=\$PATH:\$JAVA_HOME/bin" >> ~/.bashrc
cd Android/tools/bin
@josephbk117
josephbk117 / Liquid.shader
Last active October 10, 2025 15:49
Unity liquid shader
/*Please do support www.bitshiftprogrammer.com by joining the facebook page : fb.com/BitshiftProgrammer
Legal Stuff:
This code is free to use no restrictions but attribution would be appreciated.
Any damage caused either partly or completly due to usage this stuff is not my responsibility*/
Shader "BitshiftProgrammer/Liquid"
{
Properties
{
_Colour ("Colour", Color) = (1,1,1,1)
_FillAmount ("Fill Amount", Range(-10,10)) = 0.0
@mweststrate
mweststrate / city.js
Last active August 7, 2019 11:05
City.js
import { decorate, observable, flow, onBecomeObserved, onBecomeUnobserved } from 'mobx'
import { log } from './log'
const APPID = '<secret>'
export class City {
location
temperature
interval
@cortvi
cortvi / !Liquid Volume Shader.md
Last active January 17, 2025 03:22
Simple shader that imitates a liquid moving inside a vessel.

custom liquid shader cover image