Skip to content

Instantly share code, notes, and snippets.

View zilongshanren's full-sized avatar
🎯
Focusing

子龙山人 zilongshanren

🎯
Focusing
View GitHub Profile
@zilongshanren
zilongshanren / minimal-emacs.txt
Last active September 15, 2024 14:59
极简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 / 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-@)
@zilongshanren
zilongshanren / general-spacemacs.org
Created December 4, 2021 13:56 — forked from progfolio/general-spacemacs.org
Spacemacs-like menus using general.el

Spacemacs-like menus using general.el

Global keybindings

First, we define a global prefix key:

(general-create-definer global-definer
  :keymaps 'override
  :states  '(insert emacs normal hybrid motion visual operator)
  :prefix  "SPC"
  :non-normal-prefix "S-SPC")
@zilongshanren
zilongshanren / gccemacs_osx.md
Created February 24, 2020 10:03 — forked from mikroskeem/gccemacs_osx.md
gccemacs on OSX

gccemacs on OS X

Read this first: http://akrl.sdf.org/gccemacs.html

Prerequisites

1) GCC with libgccjit enabled

For that you need to compile gcc (duh). I edited Homebrew's gcc formula: