Skip to content

Instantly share code, notes, and snippets.

💭
🔪

Takayosi Amagi fand

💭
🔪
View GitHub Profile
View gist:f9685acad09184b920397ca8b16a8826
~ ❯ brew install deno
Updating Homebrew...
==> Downloading https://homebrew.bintray.com/bottles/deno-1.0.0.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/db/db9f2a4dbacb6ce16a7264ca42c7daf8ace896d9a6e05f4a01f139abddc8c2b7?__gda__=exp=1589443285~hmac=81b0bd11f99f42b4007edad1b43452439d181a92cefc1acde754149da997614b&response-content-disposition=attachment%3Bfile
######################################################################## 100.0%
==> Pouring deno-1.0.0.mojave.bottle.tar.gz
==> Caveats
Bash completion has been installed to:
/usr/local/etc/bash_completion.d
@fand
fand / cloudSettings
Last active Mar 10, 2020
vscode for win
View cloudSettings
{"lastUpload":"2020-03-10T01:27:03.663Z","extensionVersion":"v3.4.3"}
@fand
fand / PowerShell_profile.ps1
Last active Mar 6, 2020
My Windows Settings
View PowerShell_profile.ps1
# Aliases
Set-Alias open Invoke-Item
Set-Alias g git
# Set l and ls alias to use the new Get-ChildItemColor cmdlets
Import-Module Get-ChildItemColor
Set-Alias l Get-ChildItemColor -Option AllScope
Set-Alias ls Get-ChildItemColorFormatWide -Option AllScope
# oh-my-posh
@fand
fand / config.py
Last active Mar 6, 2020
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 / 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 / npmenv
Last active May 20, 2019
npmenv
View npmenv
#!/bin/bash
# .npmを作成
if [ ! -e .npm ]; then
mkdir .npm
fi
# npm本体をインストール
NPM_VERSION=$(echo $1 || cat .npm-version || npm -v)
if [ ! NPM_VERSION = $(npm -v) ]; then
@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;
You can’t perform that action at this time.