Skip to content

Instantly share code, notes, and snippets.

View sourcevault's full-sized avatar

sourcevault

View GitHub Profile
#NoEnv
#SingleInstance force
SendMode Input
#Include <dual/dual>
dual := new Dual
#Include <dual/defaults>
@sourcevault
sourcevault / main.lua
Last active June 26, 2018 18:51
basic C module in Lua with Luarocks
sleep = require ("sourcevault/sleep")
sleep.hello()
copas = require 'copas'
copas.addthread ->
copas.sleep 1
os.execute '<<blocking more than 1 second>>'
I = 0
@sourcevault
sourcevault / untilted.txt
Created September 14, 2018 15:22
markdown comment
Empty

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
sourcevault / matchTime.lua
Last active April 13, 2019 10:28
understanding lpeg.Cmt recursively
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
sudo service ssh restart
bindkey '\e[H' beginning-of-line
bindkey '\e[F' end-of-line
As mentioned in one of the comments, try mounting the share using these options:
-o uid=500,gid=users,nounix
@sourcevault
sourcevault / main.tex
Created September 20, 2021 00:26
medical_fitness_certificate ( Latex )
\documentclass[a4paper]{article}
\pagenumbering{gobble}
\usepackage{concrete}
\usepackage{setspace}
\usepackage{graphicx}% delete the demo option in your actual code
\usepackage{multirow}
\usepackage{color}
\usepackage[table]{xcolor}
\usepackage[export]{adjustbox}
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 https://youtu.be/pByHHTvms4k
2. Clone and check out linux branch
```
git clone https://github.com/francescotescari/XiaoMiToolV2.git && cd XiaoMiToolV2 && git checkout linux
```
3. Edit one Java source file exactly as described [Xiaomi procedure failed: [getServiceToken] Missing serviceToken cookie #23 (comment)](https://github.com/francescotescari/XiaoMiToolV2/issues/23#issuecomment-904082515)
4. Install openjdk-11, `sudo dnf install java-11-openjdk`
@sourcevault
sourcevault / .remotemon.yaml
Created October 14, 2021 10:02
custom.zsh-theme
global:
port: 45
path: ""
username: pi
ssh: -tt -o LogLevel=QUIET -p {{global.port}}
remotehost: pi@192.168.43.92
remotefold: ~/router
rsync: false
watch: false
verbose: 1