Skip to content

Instantly share code, notes, and snippets.

View dangh's full-sized avatar
🤖
I may be slow to respond.

Dang dangh

🤖
I may be slow to respond.
View GitHub Profile
<!--
Put this file in ~/Library/LaunchAgents/com.example.KeyRemapping.plist to
automatically remap your keys when macOS starts.
See https://developer.apple.com/library/archive/technotes/tn2450/_index.html for
the key "usage IDs". Take the usage ID and add 0x700000000 to it before putting it
into a source or destination (HIDKeyboardModifierMappingSrc and
HIDKeyboardModifierMappingDst respectively).
-->
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
@dangh
dangh / Celeste Dark.sublime-color-scheme
Last active October 26, 2018 10:20 — forked from Alanaktion/Celeste Dark.sublime-color-scheme
Celeste Dark Sublime Text Theme
{
// Rough modified version of Celeste to darken it up
"name": "Celeste Dark",
"author": "Sublime HQ Pty Ltd",
"variables":
{
// These colors are part of the hashed range
// and should only be used in non-source
"purple": "hsla(260, 50%, 70%, 1)",
"blue": "hsla(200, 70%, 55%, 1)",
@dangh
dangh / build-zsh.sh
Last active October 18, 2018 06:19 — forked from nicoulaj/build-zsh.sh
Build Zsh from sources on Debian Wheezy
#!/bin/sh
# Build Zsh from sources on Debian Wheezy.
# From http://zsh.sourceforge.net/Arc/git.html and sources INSTALL file.
# Some packages may be missing
sudo apt-get install -y git-core gcc make autoconf yodl libncursesw5-dev texinfo
git clone git://git.code.sf.net/p/zsh/code zsh
cd zsh
@dangh
dangh / uuid.lua
Last active April 6, 2023 09:52 — forked from jrus/lua-uuid.lua
quick lua implementation of "random" UUID
local function uuid()
math.randomseed(os.time())
local template ='xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'
return string.gsub(template, '[xy]', function (c)
local v = (c == 'x') and math.random(0, 0xf) or math.random(8, 0xb)
return string.format('%x', v)
end)
end