Skip to content

Instantly share code, notes, and snippets.

View seognil's full-sized avatar
πŸ‘Ÿ
You can always get another job, but will never get your time back.

Asher Lin seognil

πŸ‘Ÿ
You can always get another job, but will never get your time back.
View GitHub Profile
{
// * ================================================================================ YoutubePlaylistTimer
// * ---------------------------------------------------------------- seek video and bind timeupdate event
const YoutubePlaylistTimer = () => {
delegateEvent("video", "timeupdate", updatePlaylistTimer);
};
// * ---------------------------------------------------------------- update playlist timer when timeupdate
#! /usr/bin/env node
// * ================================================================================ lolcat
/**
* hsl color space
* https://stackoverflow.com/questions/36721830/convert-hsl-to-rgb-and-hex#answer-54014428
*/
const hsl2rgb = (h, s = 1, l = 0.5) => {
const a = s * Math.min(l, 1 - l);
@seognil
seognil / bilibili-enhanced.css
Last active November 15, 2022 09:43
bilibili enhanced (personal usage)
/* override player top title bar mask */
.bpx-player-top-wrap .bpx-player-top-mask,
.bilibili-player-video-top .bilibili-player-video-top-mask {
background: none !important;
}
/* override player bottom control bar */
.bpx-player-control-wrap,
.bilibili-player-video-control-wrap {
opacity: 0.7;
@seognil
seognil / fix-google-translate-cn.sh
Created November 9, 2022 12:58 — forked from bookfere/fix-google-translate-cn.sh
Fix Google Translate CN for macOS
#!/bin/bash
# Copyright (c)2022 https://bookfere.com
# This is a batch script for fixing Google Translate and making it available
# in the Chinese mainland. If you experience any problem, visit the page below:
# https://bookfere.com/post/1020.html
set -e
IPS=(
74.125.137.90
@seognil
seognil / fix-google-translate-cn.bat
Created November 9, 2022 12:58 — forked from bookfere/fix-google-translate-cn.bat
Fix Google Translate CN for Windows
:: Copyright (c)2022 https://bookfere.com
:: This is a batch script for fixing Google Translate and making it available
:: in the Chinese mainland. If you experience any problem, visit the page below:
:: https://bookfere.com/post/1020.html
@echo off
setlocal enabledelayedexpansion
chcp 437 >NUL
set "ips[0]=74.125.137.90"
Markdown 2 hrs 24 mins β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–β–‘β–‘β–‘β–‘β–‘β–‘ 67.8%
TypeScript 51 mins β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 24.4%
Other 16 mins β–ˆβ–‹β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 7.8%
Text 0 secs β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 0.0%
JSON 0 secs β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 0.0%
@seognil
seognil / jsperf-local.js
Created February 7, 2018 04:55
jsperf, test your function performance in browser
;(function () {
// * ---------------------------------------------------------------- tester
var p = performance
function loopTest(fn) {
var count = 1
var time = 0
while (time < 100) {