Skip to content

Instantly share code, notes, and snippets.

View jerrylususu's full-sized avatar

Neko Null jerrylususu

View GitHub Profile
# source:https://gitee.com/wkc/autogbktoutf8/blob/master/autogbktoutf8.py
# requires: chardet
# tested on py3, possibly working on py2
#coding=utf8
from __future__ import print_function
from __future__ import unicode_literals
import os
import os.path
import codecs
@jerrylususu
jerrylususu / utils.ahk
Last active December 3, 2023 04:19
Utils.ahk
; ====== IMPORTANT ======
; If you're using Windows with locale zh-CN, use **GBK** encoding, not UTF8
; Otherwise the notepad save script will not work!
; ====== IMPORTANT ======
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
@jerrylususu
jerrylususu / txt2html.py
Last active March 30, 2018 17:25
comment.txt to html
# txt2html
import os
import chardet
s = os.sep
dirname = "C:\Projects\Assignment1"
# your assignment dir goes here
for root, dirs, files in os.walk(dirname):
for file in files:
if(file=="comments.txt"):
@jerrylususu
jerrylususu / fix-utf8.py
Created March 30, 2018 17:16
UTF-8 Fixer
# utf8-fixer
import os
import chardet
s = os.sep
dirname = "C:\Projects\Assignment1"
# your assignment dir goes here
for root, dirs, files in os.walk(dirname):
for file in files:
if(file=="comments.txt"):
@jerrylususu
jerrylususu / java
Created March 11, 2018 17:05
BIG A+B
import java.util.Scanner;
public class aplusb {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
String a = "";
String b = "";
while(a.isEmpty()||b.isEmpty()) {
if(a.isEmpty()) {
@jerrylususu
jerrylususu / win+n numberer.ahk
Created March 2, 2018 04:34
A small autohotkey script that numbers your taskbar icons, make Win+N switch easier.
Loop
{
Sleep, 100
if(GetKeyState("LWin")){
Gui +LastFound +AlwaysOnTop -Caption +ToolWindow +E0x20 ; +ToolWindow avoids a taskbar button and an alt-tab menu item.
Gui, Margin, 1, 1
Gui, Font, s22, Verdana ; Set a large font size (32-point).
Gui, Add, Text, cBlue,1 2 3 4 5 6 7 8 9 0 ; XX & YY serve to auto-size the window.
WinSet, TransColor, White 150
Gui, Show, x75 y980 NoActivate