Skip to content

Instantly share code, notes, and snippets.

@phi-lira
phi-lira / UniversalPipelineTemplateShader.shader
Last active June 15, 2024 02:13
Template shader to use as guide to create Universal Pipeline ready shaders. This shader works with Universal Render Pipeline 7.1.x and above.
// When creating shaders for Universal Render Pipeline you can you the ShaderGraph which is super AWESOME!
// However, if you want to author shaders in shading language you can use this teamplate as a base.
// Please note, this shader does not necessarily match perfomance of the built-in URP Lit shader.
// This shader works with URP 7.1.x and above
Shader "Universal Render Pipeline/Custom/Physically Based Example"
{
Properties
{
// Specular vs Metallic workflow
[HideInInspector] _WorkflowMode("WorkflowMode", Float) = 1.0
@chroming
chroming / alipay_to_wiz.py
Created October 3, 2017 11:09
支付宝账单转MoneyWiz
# -*- coding:utf-8 -*-
import csv
csv_file = "~/1.csv"
new_file = "~/2.csv"
row_one = ["账户","转账","描述","交易对象","分类","日期","时间","金额","支票号码"]
@AlexanderWillner
AlexanderWillner / things.sh
Last active September 15, 2023 07:29 — forked from avdgaag/things.sh
Command-line read-only interface to your local Things database of to do items.
Moved to https://github.com/alexanderwillner/things.sh/
@breezewish
breezewish / biaori-to-anki.js
Last active March 21, 2024 01:09
将《新标准日语》的音频和单词导入到 Anki https://zhuanlan.zhihu.com/p/58139619
const assert = require("assert").strict;
const child_process = require("child_process");
const path = require("path");
const crypto = require("crypto");
const glob = require("glob");
const fs = require("fs-extra");
const _ = require("lodash");
const sort = require("alphanum-sort");
const Kuroshiro = require("kuroshiro");
const KuromojiAnalyzer = require("kuroshiro-analyzer-kuromoji");
@tmilos
tmilos / README.md
Last active May 13, 2024 02:36
Modified Preorder Tree Traversal

Modified Preorder Tree Traversal

Hierarchical data metrics that allows fast read operations on tree like structures.

Based on Left and Right fields that are set during tree traversal. When entered into node value is set to it's Left, when exiting node value is set to it's Right.

Sample implementation

///
/// Simple pooling for Unity.
/// Author: Martin "quill18" Glaude (quill18@quill18.com)
/// Latest Version: https://gist.github.com/quill18/5a7cfffae68892621267
/// License: CC0 (http://creativecommons.org/publicdomain/zero/1.0/)
/// UPDATES:
/// 2015-04-16: Changed Pool to use a Stack generic.
///
/// Usage:
///
@JohnnyBeluga
JohnnyBeluga / Unity Basic Tessellation Shader
Last active April 4, 2018 05:01
Basic triangle Unity ShaderLab Shader; Tessellates a triangle mesh and colors it red.
Shader "Tesselation/Triangle_Tesselation" {
Properties {
_TessEdge ("Edge Tess", Range(1,64)) = 2
}
SubShader {
Pass {
CGPROGRAM
#pragma target 5.0
@bricecarpentier
bricecarpentier / websocket-nodejs-redis-server.js
Last active March 29, 2021 21:12
This is a simple websocket server coded using nodejs and http://einaros.github.io/ws/ connecting to a redis pubsub channel and sending messages to selected clients
var ws = require('ws'),
nconf = require('nconf'),
redis = require('redis');
nconf.argv()
.env();
var server = new ws.Server({port: nconf.get('PORT')});
var sockets = {};
@messense
messense / shadowsocks-on-openwrt.md
Last active June 8, 2023 07:49
shadowsocks on openwrt

配置 shadowsocks

架设好 shadowsocks 服务端,在路由器上安装 shadowsocks 客户端,并配置 /etc/config/shadowsocks.json ,假设本地监听端口为 1080 。启动 shadowsocks

/etc/init.d/shadowsocks start

配置 privoxy

安装 privoxy openwrt 版。

#!/bin/bash
#Website: http://www.dwhd.org
#IMPORTANT!!!Please Setting the following Values!
#================================================================
if [ $(id -u) != "0" ]; then
echo "警告: 你现在不是root权限登录服务器, 请使用root帐号登录服务器,然后执行SEEDBOX军团的一键安装脚本~!"
exit 1
fi
#================================================================