Skip to content

Instantly share code, notes, and snippets.

💭
🔪

Takayosi Amagi fand

💭
🔪
Block or report user

Report or block fand

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@fand
fand / tcp2udp.js
Last active Jul 4, 2019
Forward TCP to UDP
View tcp2udp.js
#!/usr/bin/env node
const net = require('net');
const dgram = require('dgram');
if (process.argv.length !== 4) {
console.error(`
Usage:
node tcp2udp.js <TCP_SRC_PORT> <UDP_DST_PORT>
`);
process.exit(-1);
@fand
fand / DepthFader.hlsl
Created May 9, 2019
Unity Standard Surface Shader with Fade by Depth
View DepthFader.hlsl
Shader "Custom/DepthFade"
{
Properties
{
_Color ("Color", Color) = (1,1,1,1)
_MainTex ("Albedo (RGB)", 2D) = "white" {}
_Glossiness ("Smoothness", Range(0,1)) = 0.5
_Metallic ("Metallic", Range(0,1)) = 0.0
_DepthNear ("Depth Near", Range(0, 1000)) = 10
_DepthFar ("Depth Far", Range(0, 1000)) = 200
@fand
fand / SurfaceShadowCaster.hlsl
Created May 9, 2019
Transparent Standard Surface Shader with Depth
View SurfaceShadowCaster.hlsl
Shader "Custom/SurfaceShadowCaster"
{
Properties
{
_Color ("Color", Color) = (1,1,1,1)
_MainTex ("Albedo (RGB)", 2D) = "white" {}
_Glossiness ("Smoothness", Range(0,1)) = 0.5
_Metallic ("Metallic", Range(0,1)) = 0.0
_Cutout ("Cutout", Range(0, 1)) = 0.5
}
@fand
fand / Replicator.cs
Created Apr 11, 2019
Unity object replicator like blender's array modifier
View Replicator.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
[ExecuteInEditMode]
public class Replicator : MonoBehaviour
{
[SerializeField] Transform _prefab;
[SerializeField, Range(1, 300)] int _count = 1;
@fand
fand / shit.frag
Created Dec 18, 2018
SHIT key effect on VEDA
View shit.frag
/*{
IMPORTED: {
img: { PATH: 'shit.jpg' },
},
}*/
precision highp float;
uniform float time;
uniform vec2 resolution;
uniform sampler2D img;
@fand
fand / server.go
Created Dec 5, 2018
easy http server
View server.go
package main
import (
"fmt"
"log"
"net/http"
"os"
"os/exec"
"path/filepath"
"runtime"
View PowerShell_profile.ps1
Import-Module 'posh-git'
Import-Module 'oh-my-posh'
Set-Theme agnoster
# Set l and ls alias to use the new Get-ChildItemColor cmdlets
Set-Alias l Get-ChildItemColor -Option AllScope
Set-Alias ls Get-ChildItemColorFormatWide -Option AllScope
# Helper function to change directory to my development workspace
# Change c:\ws to your usual workspace and everytime you type
@fand
fand / config.py
Last active Dec 7, 2019
keyhac config for amagi
View config.py
import sys
import os
import datetime
import pyauto
from keyhac import *
def configure(keymap):
keymap.editor = "notepad.exe"
keymap.setFont("MS Gothic", 12)
@fand
fand / cloudSettings
Last active Jun 20, 2018
vscode for win
View cloudSettings
{"lastUpload":"2018-06-20T16:36:59.136Z","extensionVersion":"v2.9.2"}
You can’t perform that action at this time.