Skip to content

Instantly share code, notes, and snippets.



View GitHub Profile
sourcevault / Default (Windows).sublime-keymap
Created May 27, 2023 18:56
snippet to provide cyrillic symbol support for neovintageous plugin (vim extenstion) in sublime text for FRU_76 and FRU_68 keeyboard layout.
View Default (Windows).sublime-keymap
{"keys": ["з"],"command": "nv_feed_key", "args": {"key": "z"},"context": [{"key": "vi_command_mode_aware"}]},
{"keys": ["З"],"command": "nv_feed_key", "args": {"key": "Z"},"context": [{"key": "vi_command_mode_aware"}]},
{"keys": ["б"],"command": "nv_feed_key", "args": {"key": "v"},"context": [{"key": "vi_command_mode_aware"}]},
{"keys": ["Б"],"command": "nv_feed_key", "args": {"key": "V"},"context": [{"key": "vi_command_mode_aware"}]},
{"keys": ["ю"],"command": "nv_feed_key", "args": {"key": "x"},"context": [{"key": "vi_command_mode_aware"}]},
{"keys": ["Ю"],"command": "nv_feed_key", "args": {"key": "X"},"context": [{"key": "vi_command_mode_aware"}]},
{"keys": ["с"],"command": "nv_feed_key", "args": {"key": "s"},"context": [{"key": "vi_command_mode_aware"}]},
{"keys": ["С"],"command": "nv_feed_key", "args": {"key": "S"},"context": [{"key": "vi_command_mode_aware"}]},
{"keys": ["т"],"command": "nv_feed_key", "args": {"key": "t"},"context": [{"key": "vi_command_mode_aware"}]},
{"keys": ["T"]
|           |
|           |
|           |
|           |
sourcevault / .remotemon.yaml
Created October 14, 2021 10:02
View .remotemon.yaml
port: 45
path: ""
username: pi
ssh: -tt -o LogLevel=QUIET -p {{global.port}}
remotehost: pi@
remotefold: ~/router
rsync: false
watch: false
verbose: 1
View gist:d059d8b5896b94acdc4676075c37427f
1. As at 2021-08-29, there is no more waiting period or manual form to request for unlock approval from Xiaomi. Instead follow every step described in this video
2. Clone and check out linux branch
git clone && cd XiaoMiToolV2 && git checkout linux
3. Edit one Java source file exactly as described [Xiaomi procedure failed: [getServiceToken] Missing serviceToken cookie #23 (comment)](
4. Install openjdk-11, `sudo dnf install java-11-openjdk`
sourcevault / main.tex
Created September 20, 2021 00:26
medical_fitness_certificate ( Latex )
View main.tex
\usepackage{graphicx}% delete the demo option in your actual code
sourcevault / matchTime.lua
Last active April 13, 2019 10:28
understanding lpeg.Cmt recursively
View matchTime.lua
local success = function(all, pos) print('success') return pos end
local fail = function(all, pos) print('fail') return pos end
local common = Cmt(P('['), success)*(V('STMP')^0)*P(']')
local main_cmt = common + Cmt(P(']'),fail)
local main_normal = common + P(']')/fail

What is the idiomic way to create error messages in LPEG ?

To be specific I would like to create error messages for incomplete bracket completion.

Example :

[ 1 2 3 -- ERROR ! MISSING ] AT LINE 20

( 1 2 3 -- ERROR ! MISSING ) AT LINE 35

sourcevault / untilted.txt
Created September 14, 2018 15:22
markdown comment
View blocking copas.moon
copas = require 'copas'
copas.addthread ->
copas.sleep 1
os.execute '<<blocking more than 1 second>>'
I = 0
sourcevault / main.lua
Last active June 26, 2018 18:51
basic C module in Lua with Luarocks
View main.lua
sleep = require ("sourcevault/sleep")