Skip to content

Instantly share code, notes, and snippets.

@lieryan
lieryan / do_restructuring.py
Last active November 24, 2022 06:10
Restructuring with restructuring.yaml
from rope.base import project
from rope.refactor import restructure
import yaml
import pathlib
import sys
if len(sys.argv) < 2:
print("refactoring name not provided")
sys.exit(-1)
@lieryan
lieryan / Instruction.md
Last active January 4, 2019 19:48
OCR Screenshot

Setup

  1. Install helper programs, run in Terminal: sudo apt install tesseract-ocr xclip

  2. Download ocr-screenshot.sh to your chosen location (e.g. /home/user/bin/ocr-screenshot.sh) (hint: open the Raw view and Save the file)

  3. Install global hotkey:

    3.1. Open "System Settings" app

    3.2. On "System Settings", open "Devices" menu, open "Keyboard" menu

@lieryan
lieryan / Instruction
Last active January 4, 2019 18:19
Run OCR on last screenshot
Quick start:
1. Download ocr.py to your ~/Downloads folder (hint: open the Raw view and Save the file)
2. Open "Terminal" app
3. Run `python ~/Downloads/ocr.py --help` and follow the embedded installation instruction
Basic usage:
1. Make sure you have followed the embedded installation guide
2. Press Shift+PrintScreen, your cursor will turn into + sign

Keybase proof

I hereby claim:

  • I am lieryan on github.
  • I am lieryan (https://keybase.io/lieryan) on keybase.
  • I have a public key whose fingerprint is 59E4 0501 4540 113E 24E5 0F62 7DAD E721 E79E B036

To claim this, I am signing this object: