6月 29, 2021

Windows install software without root

 ```

Windows Registry Editor Version 5.00
#https://superuser.com/questions/171917/force-a-program-to-run-without-administrator-privileges-or-uac
[HKEY_CLASSES_ROOT\*\shell\forcerunasinvoker]
@="Run without privilege elevation"

[HKEY_CLASSES_ROOT\*\shell\forcerunasinvoker\command]
@="cmd /min /C \"set __COMPAT_LAYER=RUNASINVOKER && start \"\" \"%1\"\""

 

``` 


This should be be used to install drivers or other software that actually need system mode access.

6月 27, 2021

git clean, something you don't want to use lightly

 尋日搞python pip conda 好煩

pip 沒辦法安裝 scipy on M1 Mac

跟住見到教路如何清理pip cache

唔知頭唔知路,突然走左去跟 'git clean -f'

 

run 一次,當堂醒曬。

 

結語:

搞唔掂,用conda 算。

唔好亂跟。

6月 07, 2021

markdown pandoc generate table number

 # Install:

pip install --user pandoc-fignos pandoc-tablenos

 

# Usage:

## Command line:

pandoc ... --filter pandoc-xnos

 

## On markdown:

Add:

    Table : This is a table {#tbl:id}

 

# Limitation:

- Generated number put captions above table.  This is not the wanted style.

- For unknown reason, pandoc parser cannot recognize \rarr, while markdown-it previewer can.

6月 01, 2021

decryption python implementation

 做decryption exercise 用chr() 唔見有野出。原來result漏加base ascii code.

eg: 0 -> chr(0) is blank

x = 1+ ord('a') -> ch= chr(x) -> print(ch) -> 'b'