Skip to content

Instantly share code, notes, and snippets.

View zilongshanren's full-sized avatar
🎯
Focusing

子龙山人 zilongshanren

🎯
Focusing
View GitHub Profile
@zilongshanren
zilongshanren / build.org
Created November 4, 2024 06:39 — forked from LdBeth/build.org
Build Emacs 31 for Windows

Build Emacs with MSYS2

This document is an up-to-date guide on compile Emacs 31 on windows with MSYS2, and make a installation with native compile that can work without MSYS2.

The idea is after get a working Emacs, you may delete MSYS2 environment to free some disk space, and forget about rebuilding Emacs

@zilongshanren
zilongshanren / minimal-emacs.txt
Last active September 30, 2024 01:27
极简emacs配置
(setq inhibit-splash-screen t)
(setq-default cursor-type 'bar)
(setq initial-frame-alist (quote ((fullscreen . maximized))))
(setq package-check-signature nil)
(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
@zilongshanren
zilongshanren / keybindings.json
Created April 25, 2024 07:21
Config your VSCode like Spacemacs
[
// Trigger vspacecode in empty editor group
{
"key": "space",
"command": "vspacecode.space",
"when": "activeEditorGroupEmpty && focusedView == '' && !whichkeyActive && !inputFocus"
},
// Trigger vspacecode when sidebar is in focus
{
"key": "space",
@zilongshanren
zilongshanren / migrage logseq to org roam
Last active May 15, 2022 13:29
migrage logseq to org roam
(defun my-insert-file-content (filename)
(interactive)
(if (f-file-p filename)
(progn
(setq org-roam-capture-templates '(("d" "default" plain "%?"
:target (file+head "%(format-time-string \"%Y%m%d%M%H%S\")-%(file-name-base filename).org" "#+title: %(file-name-base filename) \n %(f-read-text filename) \n ") :unnarrowed t)))
(org-roam-capture)
)))
Pass
{
Name "Depth"
Tags { "LightMode" = "ShadowCaster" }
ZWrite On
ColorMask 0
CGPROGRAM
#pragma vertex vert
@zilongshanren
zilongshanren / CameraTrackingRefraction.cs
Created May 9, 2022 08:12 — forked from runevision/CameraTrackingRefraction.cs
Unity CommandBuffer replacement for GrabPass - works with multiple separate cameras.
using UnityEngine;
using UnityEngine.Rendering;
// This script is added to cameras automatically at runtime by the ObjectNeedingRefraction scripts.
public class CameraTrackingRefraction : MonoBehaviour {
[System.NonSerialized]
public int lastRenderedFrame = -1;
Camera cam;
@zilongshanren
zilongshanren / UI-Fast-Default
Created April 18, 2022 06:59 — forked from ArturoNereu/UI-Fast-Default
A simpler version of the UI Shader for mobile and low spec devices
Shader "UI/Fast-Default"
{
Properties
{
[PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {}
_Color ("Tint", Color) = (1,1,1,1)
}
SubShader
{
@zilongshanren
zilongshanren / macros.el
Created February 25, 2022 13:26 — forked from caiorss/macros.el
Emacs Lisp/Elisp Macro Examples
;; Elisp session in REPL IELM
;;
;;
;;
ELISP> (defmacro inc (var)
(list 'setq var (list '1+ var)))
inc
ELISP> (setq x 0)
0 (#o0, #x0, ?\C-@)