Skip to content

Instantly share code, notes, and snippets.

View jerrylususu's full-sized avatar

Neko Null jerrylususu

View GitHub Profile
@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
@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 / 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 / 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 / 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.
# 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 / run.sh
Last active July 3, 2021 14:05
Install tensorflow-gpu 2.5.0 with conda (2021/7/3)
# as of writing (2021/7/3), here is a list of the version of latest packages (arch=linux64):
# tensorflow-gpu: 2.4.0 (anaconda)
# cudnn: 8.2.1 (conda-forge)
# cudatoolkit: 11.0.221 (anaconda)
# step 1: create new conda environment, install python & cudatoolkit
conda create -n tf_25_new python=3.8 cudatoolkit=11.0.221
conda activate tf_25_new
# step 2: install cudann from conda forge
@jerrylususu
jerrylususu / emoji-ranges.txt
Created September 30, 2021 23:12
Regex & CSS unicode-range for Emoji (2021, Unicode Version 14.0)
# Note
# some codepoints you might want to remove:
# u+00a9: copyright
# u+00ae: registered
# Regex
(\u00a9|\u00ae|\u203c|\u2049|\u20e3|\u2122|\u2139|[\u2194-\u2199]|[\u21a9-\u21aa]|[\u231a-\u231b]|\u2328|\u23cf|[\u23e9-\u23f3]|[\u23f8-\u23fa]|\u24c2|[\u25aa-\u25ab]|\u25b6|\u25c0|[\u25fb-\u25fe]|[\u2600-\u2604]|\u260e|\u2611|[\u2614-\u2615]|\u2618|\u261d|\u2620|[\u2622-\u2623]|\u2626|\u262a|[\u262e-\u262f]|[\u2638-\u263a]|\u2640|\u2642|[\u2648-\u2653]|[\u265f-\u2660]|\u2663|[\u2665-\u2666]|\u2668|\u267b|[\u267e-\u267f]|[\u2692-\u2697]|\u2699|[\u269b-\u269c]|[\u26a0-\u26a1]|\u26a7|[\u26aa-\u26ab]|[\u26b0-\u26b1]|[\u26bd-\u26be]|[\u26c4-\u26c5]|\u26c8|[\u26ce-\u26cf]|\u26d1|[\u26d3-\u26d4]|[\u26e9-\u26ea]|[\u26f0-\u26f5]|[\u26f7-\u26fa]|\u26fd|\u2702|\u2705|[\u2708-\u270d]|\u270f|\u2712|\u2714|\u2716|\u271d|\u2721|\u2728|[\u2733-\u2734]|\u2744|\u2747|\u274c|\u274e|[\u2753-\u2755]|\u2757|[\u2763-\u2764]|[\u2795-\u2797]|\u27a1|\u27b0|\u27bf|[\u2934-\u2935]|[\u2b05-\u2b07]|[\u2b1b-\u2b1c]|\u2b50|\u2b55|\u3030|\u
@jerrylususu
jerrylususu / demo.html
Created December 18, 2021 16:53
Simple Dark Mode with CSS Filter `invert`
<!DOCTYPE html>
<html lang="cmn-Hans">
<head>
<meta charset="utf-8">
<title>Hello!</title>
<style id="dark-mode-theme" disabled>
html {
background-color: #ebebeb !important;
}
@jerrylususu
jerrylususu / generate_pdf_with_toc.py
Last active December 21, 2021 14:40
《凤凰架构》PDF 增加目录
import json
import toml
from pdftocgen.recipe import extract_toc, Recipe
from fitzutils import ToCEntry, dump_toc, open_pdf
from pdftocio.tocio import write_toc
# requiremnets
# ----------------------------
# ruquire `pdf.tocgen`
# https://github.com/Krasjet/pdf.tocgen