Skip to content

Instantly share code, notes, and snippets.

View hsuanxyz's full-sized avatar
👀
🍴 🌟

Hsuan Lee hsuanxyz

👀
🍴 🌟
View GitHub Profile
@hsuanxyz
hsuanxyz / ec2_monitor.ipynb
Created September 18, 2024 08:14
aws ip speedtest
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('plugin-manager'), require('@angular/core')) :
typeof define === 'function' && define.amd ? define('plugin-a', ['plugin-manager', '@angular/core'], factory) :
(global = global || self, global['plugin-a'] = factory(global.pluginManager, global.ng.core));
}(this, function (pluginManager, core) { 'use strict';
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
@hsuanxyz
hsuanxyz / phrasebookClean.js
Created October 16, 2018 02:38
Google Translate Phrasebook Clean
function clean() {
const wordEles = [...document.querySelectorAll('.gt-pb-stc')];
const repeats = [];
wordEles.forEach((e, i) => {
const isRepeat = [...wordEles].splice(i + 1, wordEles.length - 1).some(s => {
return s.innerText.toLocaleLowerCase() === e.innerText.toLocaleLowerCase()
});
if (isRepeat) {
repeats.push(e);
@hsuanxyz
hsuanxyz / chrome-history-select-all.js
Last active July 28, 2017 18:32
全选 Chrome 60+ 浏览历史
/**
* @version 0.0.1
* @author HsuanLee
* @description 全选 Chrome 60+ 浏览历史
* @tutorial
* ////////////////////////////////
* // //
* // 1. 访问 chrome://history //
* // 2. 粘贴到控制台运行 //
let items = [
{id:4, config:null},
{id:4, config:null},
{id:1, config:'hello'},
{id:2, config:'hello'},
{id:7, config:null},
{id:3, config:'hello'},
]
// 定义安权重值排序的数组
/**
* Created by hsuanlee on 12/05/2017.
*/
//字符串长度
export function stringLen (val){
if(!val || typeof val !== 'string'){
return 0
}