Skip to content

Instantly share code, notes, and snippets.

View chawyehsu's full-sized avatar
☯️
no silver bullet

Chawye Hsu chawyehsu

☯️
no silver bullet
View GitHub Profile
@chawyehsu
chawyehsu / style.c
Last active January 22, 2024 03:10
NetBSD C language source coding style (Kernel Normal Form - KNF) /usr/share/misc/style
/* $NetBSD: style,v 1.75 2023/08/07 18:01:42 riastradh Exp $ */
/*
* The revision control tag appears first, with a blank line after it.
* Copyright text appears after the revision control tag.
*/
/*
* The NetBSD source code style guide.
* (Previously known as KNF - Kernel Normal Form).
@chawyehsu
chawyehsu / gist:0498cab0d35fc7c0a3e7652f54042c4f
Created October 13, 2021 12:05 — forked from rahuldamodar94/gist:6bdd022f3457934f2a104fd5f4bb45e4
0x V3 deployment on Matic Testnet (Mumbai - 80001) and Matic Mainnet (137)
"80001":{
"erc20Proxy": "0x0b47076aaa5246411458fcf85494f41bbfdb8470",
"erc721Proxy": "0xff7ca10af37178bdd056628ef42fd7f799fac77c",
"erc1155Proxy": "0x53d791f18155c211ff8b58671d0f7e9b50e596ad",
"zrxToken": "0x5af2b282779c7d4ffc69ca4e6e16676747f5c56b",
"etherToken": "0x5b5e11e4818cceba3e82ca9b97cd0ab80be75ad3",
"exchange": "0x533dc89624dcc012c7323b41f286bd2df478800b",
"erc20BridgeProxy": "0x5638a4b19f121adc4436de3f0e845173b33b594c",
"forwarder": "0x6dcf02d3a963f22dbf85c4025b86a834fef16c15",
"coordinatorRegistry": "0x6f5b9e0456c4849224c7b59dc15f05c48641c4e3",
extern crate self;
extern crate self as hello;
extern crate notify;
extern crate std; // equivalent to: extern crate std as std;
extern crate std as ruststd; // linking to 'std' under another name
extern crate lazy_static;
extern crate hello_world; // hyphen replaced with an underscore
use once_cell;
use ::once_cell;
@chawyehsu
chawyehsu / 📊 Weekly development breakdown
Last active April 22, 2024 00:21
📊 Weekly development breakdown
XML 1 hr 37 mins █████▍░░░░░░░░░░░░░░░ 26.1%
C# 1 hr 28 mins █████░░░░░░░░░░░░░░░░ 23.9%
PowerShell 1 hr 2 mins ███▌░░░░░░░░░░░░░░░░░ 16.7%
YAML 58 mins ███▎░░░░░░░░░░░░░░░░░ 15.8%
Other 33 mins █▉░░░░░░░░░░░░░░░░░░░ 9.1%
@chawyehsu
chawyehsu / ublock-origin-csdn-list.txt
Last active December 6, 2020 16:40
用 uBlock 调整 CSDN 博客版面
! 2020-11-27 https://blog.csdn.net
blog.csdn.net##.clearfix.recommend-item-box
blog.csdn.net##.template-box
blog.csdn.net##.triplet-prompt
blog.csdn.net###asideNewComments
blog.csdn.net###asideArchive
blog.csdn.net###asideHotArticle
blog.csdn.net###asideCategory
blog.csdn.net##.left-toolbox
blog.csdn.net##.comment-sofa-flag
diff --git a/libexec/scoop-list.ps1 b/libexec/scoop-list.ps1
index de366ddf..46e72894 100644
--- a/libexec/scoop-list.ps1
+++ b/libexec/scoop-list.ps1
@@ -18,32 +18,14 @@ $apps = @($local) + @($global)
if($apps) {
write-host "Installed apps$(if($query) { `" matching '$query'`"}): `n"
- $apps | Sort-Object { $_.name } | Where-Object { !$query -or ($_.name -match $query) } | ForEach-Object {
- $app = $_.name
@chawyehsu
chawyehsu / pQuery.js
Created August 20, 2018 12:34 — forked from niyazpk/pQuery.js
Add or update query string parameter
// Add / Update a key-value pair in the URL query parameters
function updateUrlParameter(uri, key, value) {
// remove the hash part before operating on the uri
var i = uri.indexOf('#');
var hash = i === -1 ? '' : uri.substr(i);
uri = i === -1 ? uri : uri.substr(0, i);
var re = new RegExp("([?&])" + key + "=.*?(&|$)", "i");
var separator = uri.indexOf('?') !== -1 ? "&" : "?";
if (uri.match(re)) {
@chawyehsu
chawyehsu / soft-line-breaks-reference.txt
Last active July 15, 2018 09:34
About CJK soft-line-breaks
https://talk.commonmark.org/t/soft-line-breaks-should-not-introduce-spaces/285
https://github.com/markdown-it/markdown-it/issues/334
http://chenyufei.info/blog/2011-12-23/fix-chinese-newline-becomes-space-in-browser-problem/
https://stackoverflow.com/questions/8550112/prevent-browser-converting-n-between-lines-into-space-for-chinese-characters/8551033#8551033
http://blog.guorongfei.com/2015/04/25/how-to-fix-the-markdown-newline-blank-problem/
https://9.obelus.net/2018/04/15/cjk-markdown-whitespace-and-newline.html
https://www.v2ex.com/t/69433
@chawyehsu
chawyehsu / index.html
Created August 20, 2017 15:59
思源字体网页 font-family 指定 test case(仅简中)
<!doctype html>
<html>
<head>
<meta charset="utf-8"/>
<title>思源字体网页 font-family 指定 test case(仅简中)</title>
<style>
body {
font-family: simsun,serif;
font-weight: normal;
}
@chawyehsu
chawyehsu / configuration.xml
Last active March 25, 2023 03:43
Office 2016 CUSTOM INSTALLATION configuration, to only install Word, Excel, PowerPoint and Outlook. Office 2016 自定义安装. https://chawyehsu.com/blog/2018/03/office-2016-custom-installation-guide
<!-- Office 365 client configuration file sample. To be used for Office 365 ProPlus 2016 apps,
Office 365 Business 2016 apps, Project Pro for Office 365 and Visio Pro for Office 365.
For detailed information regarding configuration options visit: http://aka.ms/ODT.
To use the configuration file be sure to remove the comments
For Office 365 client apps (verion 2013) you will need to use the 2013 version of the
Office Deployment Tool which can be downloaded from http://aka.ms/ODT2013
The following sample allows you to download and install Office 365 ProPlus 2016 apps