Skip to content

Instantly share code, notes, and snippets.

View edisonlee55's full-sized avatar
😋
(ノ^ヮ^)ノ*:・゚✧

Edison Lee edisonlee55

😋
(ノ^ヮ^)ノ*:・゚✧
View GitHub Profile
@edisonlee55
edisonlee55 / .env.example
Last active September 4, 2023 00:20
Vaultwarden (Caddy) Docker Compose for Synology NAS
TIMEZONE=Asia/Taipei
VAULTWARDEN_ADMIN_TOKEN=
VAULTWARDEN_LOCALHOST_PORT=6699
CADDY_HOSTNAME=example.com:7777
SYNO_CERT_PATH=/usr/syno/etc/certificate/_archive/$(cat /usr/syno/etc/certificate/_archive/DEFAULT)
@edisonlee55
edisonlee55 / cuda_12.1_linux_modulefile
Created May 24, 2023 06:25
CUDA 12.1 Linux (Modulefile)
#%Module1.0
# /usr/share/modules/modulefiles/cuda/12.1
proc ModulesHelp {} {
puts stderr "\t Adds NVIDIA CUDA Toolkit 12.1 to your environment variables,"
}
module-whatis "adds NVIDIA CUDA Toolkit 12.1 to your environment variables"
@edisonlee55
edisonlee55 / edisonlee55-misskey-dark-theme.json5
Created April 18, 2023 10:28
edisonlee55 Misskey - Theme
{
id: '3661c367-97c9-4ec4-a046-e3cd709ebd03',
base: 'dark',
name: 'edisonlee55 Misskey - Dark',
props: {
bg: '#232323',
fg: 'rgb(199, 209, 216)',
link: '@accent',
navBg: '#363636',
panel: '#2d2d2d',
@edisonlee55
edisonlee55 / Unity.gitignore
Last active January 13, 2023 06:38
Unity project ignore config for Git and Perforce (P4)
# This .gitignore file should be placed at the root of your Unity project directory
#
# Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore
#
/[Ll]ibrary/
/[Tt]emp/
/[Oo]bj/
/[Bb]uild/
/[Bb]uilds/
/[Ll]ogs/
@edisonlee55
edisonlee55 / cloudflare-r2-cli-cors.md
Last active January 1, 2023 19:06
Cloudflare R2 - Static CDN CORS (allow GET and HEAD from any origin)
@edisonlee55
edisonlee55 / ToggleTest.shader
Created May 4, 2022 07:37 — forked from keijiro/ToggleTest.shader
Shows how to use the Toggle material property drawer in a shader. See the reference manual for further details: http://docs.unity3d.com/ScriptReference/MaterialPropertyDrawer.html
Shader "ToggleTest"
{
Properties
{
[Toggle(FILL_WITH_RED)]
_FillWithRed ("Fill With Red", Float) = 0
}
SubShader
{
Pass
@edisonlee55
edisonlee55 / rgbaToVec.js
Created May 4, 2022 07:30 — forked from m4n1ok/rgbaToVec.js
Convert a rgba/rgb color to vec4. Convert vec4 color to rgba
const normalize = (min, max, value) => {
if (value < min) return min
else if (value > max) return max
else return value
}
const splitChannels = (color, split) => {
color = color.replace(split, '').replace(')', '').trim()
let channels = color.split(',')
@edisonlee55
edisonlee55 / prng.cginc
Created May 4, 2022 06:52 — forked from keijiro/prng.cginc
One liner pseudo random generator with HLSL
float nrand(float2 uv)
{
return frac(sin(dot(uv, float2(12.9898, 78.233))) * 43758.5453);
}
@edisonlee55
edisonlee55 / .gitattributes
Last active July 1, 2022 09:43 — forked from nemotoo/.gitattributes
.gitattributes for Unity3D with git-lfs
# Set the default line endings behavior, in case people don't have core.autocrlf set.
* text=auto
## Unity ##
*.cs diff=csharp text
*.cginc text
*.shader text
*.mat merge=unityyamlmerge eol=lf
@edisonlee55
edisonlee55 / gitlab_postgresql_fix.txt
Last active November 30, 2021 01:55
GitLab PostgreSQL Update Issue Quick Fix (Reference: https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/4356)
$ gitlab-ctl reconfigure
$ gitlab-ctl pg-upgrade
$ gitlab-ctl restart