Skip to content

Instantly share code, notes, and snippets.

View amorphobia's full-sized avatar
🏠
Working from home

Xuesong amorphobia

🏠
Working from home
View GitHub Profile
@amorphobia
amorphobia / dolphin.css
Last active February 7, 2025 05:03
test.css
/*!
* Dolphin for Gazelle v1.0
* Copyright 2020 ZexWoo 年份更新过了
* Thanks to Redacted
*/
* {
margin: 0;
padding: 0;
}
@amorphobia
amorphobia / clock.cmd
Last active December 22, 2024 08:33
Desktop clock by PowerShell + .Net Framework + WPF
<# :
@echo off
start /b powershell /windowstyle hidden /nologo /noprofile /command ^
"&{[ScriptBlock]::Create((cat """%~f0""") -join [Char[]]10).Invoke(@(&{$args}%*))}"
exit /b
#>
param(
[Parameter(Mandatory=$false)]
[string]$CultureName,
@amorphobia
amorphobia / photo.reg
Created November 2, 2024 09:22
Fallback to old image viewer on Windows 10/11 (在 Windows 10/11 上回退到旧版照片查看器)
Windows Registry Editor Version 5.00
; Change Extension's File Type
[HKEY_CURRENT_USER\Software\Classes\.jpg]
@="PhotoViewer.FileAssoc.Tiff"
; Change Extension's File Type
[HKEY_CURRENT_USER\Software\Classes\.jpeg]
@="PhotoViewer.FileAssoc.Tiff"
; Change Extension's File Type
[HKEY_CURRENT_USER\Software\Classes\.gif]
@="PhotoViewer.FileAssoc.Tiff"
@amorphobia
amorphobia / smyh.base.schema.yaml
Last active January 18, 2024 05:15
smyh.base.schema.yaml
# Rime schema settings
# encoding: utf-8
schema:
schema_id: smyh.base
name: 吉旦餅·基礎碼表
description: |
可以打字。
engine:
@amorphobia
amorphobia / 键道安装.html
Created November 7, 2023 07:51
键道安装快捷指令
<!DOCTYPE html><html><head><meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<meta name="format-detection" content="telephone=no,date=no">
<title>键道安装</title>
<style>
body {
font-family: system-ui;
font-size: 0.95em;
margin-top: 1rem;
margin-bottom: calc(1rem + env(safe-area-inset-bottom));
@amorphobia
amorphobia / gedao.schema.yaml
Created November 5, 2023 09:24
格道双拼-仓
# Rime schema
# encoding: utf-8
schema:
schema_id: gedao
name: 格道双拼
version: "1.0.0"
author:
- fkxxyz (四叶草拼音词库)
- 吅吅大牛 (格道17键双拼布局)
# print code
for (( i=0x2194; i<=0x2199; i++ ))
do
out=$(printf "%#x\n" $i)
echo $out
done
# print table
# '\U0001f004' if 5-digit code
for code in '00a9' '00ae' '203c' '2049' '2122' '2139'
@amorphobia
amorphobia / .profile.ps1
Last active December 10, 2024 12:55
PowerShell Profile Script
Set-PSReadlineKeyHandler -Chord Ctrl+d -Function DeleteCharOrExit
Import-Module posh-git
Import-Module scoop-completion
Import-Module posh-cargo
$GitPromptSettings.DefaultPromptPrefix.Text = '$(Get-Date -f "yyyy-MM-dd HH:mm:ss") '
$GitPromptSettings.DefaultPromptPrefix.ForegroundColor = [ConsoleColor]::Magenta
$GitPromptSettings.DefaultPromptAbbreviateHomeDirectory = $true
$GitPromptSettings.DefaultPromptBeforeSuffix.Text = '`n'
use crate::lexer::Lexer;
pub mod token {
pub mod tag {
#[derive(Clone, Copy, Debug)]
pub enum Tag {
Char(u8),
Num,
Id,
True,
var FindProxyForURL = function(init, profiles) {
return function(url, host) {
"use strict";
var result = init, scheme = url.substr(0, url.indexOf(":"));
do {
result = profiles[result];
if (typeof result === "function") result = result(url, host, scheme);
} while (typeof result !== "string" || result.charCodeAt(0) === 43);
return result;
};