Skip to content

Instantly share code, notes, and snippets.

View sneha-belkhale's full-sized avatar
🐀
domesticating robo rats

Sneha Belkhale sneha-belkhale

🐀
domesticating robo rats
View GitHub Profile
@sneha-belkhale
sneha-belkhale / localNetworkChat.html
Last active November 25, 2023 19:54
Local Network Chat -- (python server + frontend + linux daemon Init Script for the server )
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
body {
display: flex;
justify-content: center;
align-items: center;
# Run this script in Atom with the FoxDot Extension.
# Make sure "filepath" points to your TCPDump data.
# Set resample to True if you want to continuously resample the wifi packet data,
# if so, you will need to continuously run the TCPDump script which contains the following line:
# sudo tcpdump -y 'IEEE802_11_RADIO' -i en0 -c 3000 -I -ttttt > "filepath"
# set up this script to be run without sudo using visudo.
# at the end of this file, you will have all signals stored in the dictionary signalDictAligned,
@sneha-belkhale
sneha-belkhale / Fbm.cginc
Last active March 13, 2023 13:13
Fractal Brownian Motion function to include in Unity Shader
float hash (float2 n)
{
return frac(sin(dot(n, float2(123.456789, 987.654321))) * 54321.9876 );
}
float noise(float2 p)
{
float2 i = floor(p);
float2 u = smoothstep(0.0, 1.0, frac(p));
float a = hash(i + float2(0,0));
@sneha-belkhale
sneha-belkhale / PostEffect.cs
Created June 17, 2019 15:13
Camera component that goes with the post-processing outline shader for Unity.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PostEffect : MonoBehaviour
{
Camera AttachedCamera;
public Shader PostOutline;
public Material PostMat;
@sneha-belkhale
sneha-belkhale / PostEffect.cs
Created June 17, 2019 15:13
Camera component that goes with the post-processing outline shader for Unity.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PostEffect : MonoBehaviour
{
Camera AttachedCamera;
public Shader PostOutline;
public Material PostMat;
@sneha-belkhale
sneha-belkhale / OutlinePostEffect.cs
Created June 17, 2019 09:41
Post-processing outline shader for Unity, fast and VR compatible.
Shader "Custom/OutlinePostEffect"
{
Properties
{
_MainTex("Main Texture",2D)="black"{}
_Delta ("Delta", Range(0, 1)) = 0.002
}
SubShader
{
ZTest Always
@sneha-belkhale
sneha-belkhale / StarrySkyShader.js
Created May 16, 2019 07:38
Shader for a sky sphere that adds a starry pattern~~ driven by layers of perlin noise
const StarrySkyShader = {
vertexShader: `
varying vec3 vPos;
void main() {
vPos = position;
vec4 mvPosition = modelViewMatrix * vec4( vPos, 1.0 );
gl_Position = projectionMatrix * mvPosition;
}