Skip to content

Instantly share code, notes, and snippets.

View banyudu's full-sized avatar
🎯
Focusing

Yudu banyudu

🎯
Focusing
View GitHub Profile
@banyudu
banyudu / LookUp.APPLESCRIPT
Created March 17, 2021 03:04 — forked from nacyot/LookUp.APPLESCRIPT
OSX Dictionary Lookup History Service
on run {input, parameters}
set logPath to "Dropbox/Dictionary/words.txt"
set lookUpWord to quoted form of (input as string)
tell application "System Events" to tell (process 1 where frontmost is true)
set windowTitle to name
try
set windowTitle to windowTitle
set titleBar to name of window 1
end try
@banyudu
banyudu / jwtRS256.sh
Created September 22, 2020 09:35 — forked from ygotthilf/jwtRS256.sh
How to generate JWT RS256 key
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
# Don't add passphrase
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
cat jwtRS256.key
cat jwtRS256.key.pub

How to turn off Webpack code-splitting

Using Webpack import()

The following code will produce code-splitting in Webpack, which means that the source code will be split into several files that will be loaded async at runtime.. More info here;

import('./some-module').then((SomeModule) => {});
@banyudu
banyudu / svg2ico.sh
Last active March 8, 2020 13:08 — forked from azam/svg2ico.sh
Convert SVG to ICO using ImageMagick, with transparent background and multi-size icons
srcfile=$1
dstfile=$(basename $srcfile .svg).ico
convert -density 256x256 -background transparent $srcfile -define icon:auto-resize -colors 256 $dstfile
@banyudu
banyudu / README.md
Created February 17, 2020 13:36 — forked from chuyik/README.md
macOS 给 Git(Github) 设置代理(HTTP/SSH)