Skip to content

Instantly share code, notes, and snippets.

Avatar

Hải Nguyễn Hồng hainh

View GitHub Profile
View SetTextPreviewPaneForExt.ps1
foreach ($ext in $args) {
if ($ext.startswith(".")) {
$path = "HKLM\SOFTWARE\Classes\" + $ext;
reg add $path /v PerceivedType /t REG_SZ /d text
}
}
@hainh
hainh / stardict2txt.py
Created Aug 17, 2019 — forked from rongyi/stardict2txt.py
convert a stardict dictionary to txt
View stardict2txt.py
#!/usr/bin/python
# -*- coding: utf-8 -*-
import struct
import types
import gzip
class IfoFileException(Exception):
"""Exception while parsing the .ifo file.
Now version error in .ifo file is the only case raising this exception.
You can’t perform that action at this time.