Skip to content

Instantly share code, notes, and snippets.

View yhh2021's full-sized avatar

Yan Huihang yhh2021

  • Guangdong University of Foreign Studies, 2 Baiyun N Ave, Baiyun, Guangzhou, Guangdong Province, China
View GitHub Profile
@jfktrey
jfktrey / maze.py
Last active July 31, 2021 04:43
Maze
import random
import sys
import time
while True:
sys.stdout.write(random.choice([u'╱',u'╲']))
sys.stdout.flush()
time.sleep(0.01)
@jfktrey
jfktrey / getch.py
Last active May 13, 2024 21:31
Cross-platform getch() for Python without any fuss
import platform
if platform.system() == "Windows":
import msvcrt
def getch():
return msvcrt.getch()
else:
import tty, termios, sys
def getch():
fd = sys.stdin.fileno()
@diyism
diyism / software alternative for linux.md
Last active January 25, 2023 00:27
software alternative for linux,migrating from windows to linux
  1. DOS usb boot -> ubuntu live iso usb boot(too big), minimal_linux_live_20-Jan-2017_64-bit.iso(only 6.8MB)
  2. diskgenius for dos -> testdisk("No Log\Proceed\Intel\Analyse\Quick Search", better than fdisk), gnome-disks
  3. norton ghost for dos -> "fsarchiver savefs" "fsarchiver restfs", remastersys
  4. windows xp -> debian+de(lxde, xfce), kali, ubuntu
  5. ntldr boot.ini -> grub menu.lst, boot-repair
  6. RemapKey/KeyTweak -> xmodmap -pke > ~/.Xmodmap then modify it, it will be loaded automatically
  7. myboard.exe -> myboard.py + modified xorg-server + modified libgtk2.0-0 + fcitx-googlepinyin
  8. MagicMover(D:\Program Files) -> remastersys restored sda1 + UnionFS-FUSE(pivot_root) sda2
  9. WinHex -> wxHexEditor, bless, (sublime hexviewer only can edit one line)
  10. emEditor(PHP/C braces outline, csv editor) -> sublime(ctrl+r to list functions, addon packages: AlignTab,SublimeCodeIntel,Codecs,ConvertToUTF8), SciTE(to view log files)