Skip to content

Instantly share code, notes, and snippets.

//
// main.swift
// Shell Notification Center
//
// Created by Keng Lee on 2021/1/15.
//
import Foundation
import Combine
var bag = Set<AnyCancellable>()
// https://awakesecurity.com/wp-content/uploads/2020/06/GalComm-Malicious-Chrome-Extensions-Appendix-B.txt
malicious = [
"acmnokigkgihogfbeooklgemindnbine",
"apgohnlmnmkblgfplgnlmkjcpocgfomp",
"apjnadhmhgdobcdanndaphcpmnjbnfng",
"bahkljhhdeciiaodlkppoonappfnheoi",
"bannaglhmenocdjcmlkhkcciioaepfpj",
"bgffinjklipdhacmidehoncomokcmjmh",
"bifdhahddjbdbjmiekcnmeiffabcfjgh",
/**
* 用网易云音乐的歌单创建 macOS(iOS) Music(本地音乐文件,非 Apple Music) 的播放列表
*
* 1. 打开网易云音乐歌单网页版,打开控制台
* 2. 运行下面代码
* 3. run('歌单名', '音乐文件夹绝对路径')
* 或者替换 MUSIC_DIR 然后直接运行 run()
*
* 4. 下载音乐文件到自定义目录,打开 Music 导入播放列表
* 音乐文件需以 `歌手名 - 歌曲名.mp3` 格式命名
/**
* Unblock all twitter accounts
*
* https://twitter.com/settings/blocked/all
*
* created by keng42 @2020-03-21 15:11:52
*/
let plan = setInterval(() => {
let btns = document.evaluate('//span[text()="Blocked"]', document, null, XPathResult.ANY_TYPE, null );

Keybase proof

I hereby claim:

  • I am keng42 on github.
  • I am keng42 (https://keybase.io/keng42) on keybase.
  • I have a public key ASDYYpwv0GGB-9Z_4Y8EIZKQOwJ6H1o7-zMhaLlN1eH2bQo

To claim this, I am signing this object:

ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCx0ydp3CJ3x42kZiZZo0pjW6/wef8DwIuZ4b3opCZE36YQnEGicSl3IDOEj2FDiVB01Y/so7XU5u+xonf9lgMSaOwDgdganLynevvW2wEqnwygKtkd465mDjP8XXap6dX2YYYwFLhzxemvqG4FqHJcuiO3kKrqGskIBmaFeFmTA8im3jvoAJJgIPHFDObyPFGaTk4jjFzr8yrwC9aJZym4wEoTNzOpJh5IYRwolNbalzDbgxTej/4U+A5EFMsiMMxzRl+q8iL3XmvDNJ5z8O2+xlCaLtNnXUwsVrxBbEUtWwHNxsYP1lIOUmPRALcl+RkN6djJqsDUQyx6H2KYvE6JJ6fhJS+UaOzIcqN9v2fgkCn4I1H3Rh+jynMWqLfzmCg/5zVAsZ6xfUrDD2eca+D4ITsPoI9Iw8B48w0AVX3Xb4hcSGKl9yokCvN9xZy48GAzUPPOeACSXqXUth/ysc0ZToBqbQYbNl8vSpFh3KlPbb7hLfQ2mIzSjwEIJTwVdc/h+leYGyxfeb7Y0QgYaaRWq4S6jCY/G8z+iVjeIihnq8meTcjiS3fzlIJzBKEP5fgR9JNbKSRoOF2yQRmsHExjOw9oO/xhlC4zHR3UhIGfMT3DLeCBcicI7ncsP6rXmkSNyPgkMbi0E7dFVH7b+lhesxUpmIMs4GRVMNt4d8Fggw== [email protected]

Keybase proof

I hereby claim:

  • I am keng42 on github.
  • I am keng42 (https://keybase.io/keng42) on keybase.
  • I have a public key whose fingerprint is 440F 4AD8 7992 2454 4775 D8A7 7F0E 1AB6 5116 30EE

To claim this, I am signing this object:

@keng42
keng42 / md-menu.html
Last active September 23, 2016 12:37 — forked from cloudsben/md-menu.html
markdown menu
<script>
vm.dirs = [];
let hs = vm.$els.article.querySelectorAll('h1, h2, h3, h4, h5, h6');
for (var i = 0; i < hs.length; i++) {
hs[i].setAttribute('id', 'dir-' + i);
vm.dirs.push({
link: '#dir-' + i,
text: hs[i].innerText,
cls: 'dir-' + hs[i].localName
});
@keng42
keng42 / htmlentity.js
Created November 13, 2015 07:52 — forked from CatTail/htmlentity.js
Javascript: encode(decode) html text into html entity
// encode(decode) html text into html entity
var decodeHtmlEntity = function(str) {
return str.replace(/&#(\d+);/g, function(match, dec) {
return String.fromCharCode(dec);
});
};
var encodeHtmlEntity = function(str) {
var buf = [];
for (var i=str.length-1;i>=0;i--) {