This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="zh-cmn"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>死宅程序员</title> | |
<!-- 配套视频讲解:https://www.bilibili.com/video/BV1b94y1z74s/ --> | |
</head> | |
<body> | |
<script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const forEachAsync = async (arr, handler, isSerial = true) => { | |
if( isSerial ) { | |
const result = []; | |
return arr.reduce((acc, val) => { | |
return acc.then(()=>handler(val)) | |
.then(ret=>{ | |
result.push(ret); | |
return ret; | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* chrome-extension://aimiinbnnkboelefkjlenlgimcabobli/assets/css-editor.html | |
*/ | |
body { | |
background: #3c4c55; /* VSCode bg color*/ | |
color: #ddd; | |
white-space: pre; | |
font-family: monospace; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# @file plist2json.py | |
# @desc convert plist to json | |
# @usage >python plist2json.py FILE_NAME | |
# @test under python v2.7 | |
# @author g8up | |
# @date 2017.7.21 | |
import sys | |
import json | |
from plistlib import readPlist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 增强 Ctrl + P 快捷键功能 | |
# 当选择一个资源路径,并按 Ctrl + P 时,可自动将选择文本填充到面板, | |
# 你只需回车即可直接跳转到文件 | |
# 配置: | |
# 1、Preferences -> Key Bindings 添加: | |
# | |
# [{ | |
# "keys": ["ctrl+p"], | |
# "command": "show_goto_overlay_with_selection" | |
# }] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SublimeText3 Plugin Doc:http://www.sublimetext.com/docs/3/api_reference.html | |
# python doc: http://www.runoob.com/python/python-tutorial.html | |
# 给右键菜单提供一个命令,点击弹出 cmd 并切换目录到 fis 工程根目录 | |
# 配合描述文件 Context.sublime-menu,内容如下 | |
# [{ | |
# "caption": "FisProjectRoot", | |
# "command": "go_to_fis_project_root" | |
# }] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 解码:把一个 8位 HEX 字符串转换为浮点数 | |
function Hex2Float( numStr ) { | |
return new Float32Array(new Uint8Array( numStr.match(/.{1,2}/g).map( function( num ) { | |
return parseInt( num, 16 ); | |
}).reverse() ).buffer )[0]; | |
}; | |
// test | |
Hex2Float("BB4E28DE");//-0.003145746421068907 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript: void ((function () { | |
/** | |
* 功能:斗鱼自动弹幕语音朗读 | |
* 用法:需要[制作成 Chrome 书签](http://pan.baidu.com/s/1skgEosX) | |
* 版本:v2.0.0 | |
* 日期:2017年12月30日 17:28:17 | |
* 更新:2018年12月31日 16:32:25 | |
*/ | |
const speaker = (word, rate = 1) => { | |
if (word !== '') { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript: void ((function () { | |
/* | |
* 直播房间排序 V2.1.1 | |
* 功能:让直播房间页面按访问量降序排列(目前支持斗鱼、熊猫、战旗) | |
* 需要[制作成 Chrome 书签](http://pan.baidu.com/s/1skgEosX) | |
* 更新时间:2019年9月26日02:38:23,修复斗鱼平台 | |
*/ | |
function Sortor($container, getPeopleNumFn) { | |
this.$container = $container; | |
this.rooms = $container.find('li'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript: void((function () { | |
/** | |
* 熊猫找福利 V1.0.1 | |
* 日期:2016-12-19 22:59:24 | |
* 用途:让熊猫 TV 房间列表页面按在线人数降序排列 | |
* 需要[制作成 Chrome 书签](http://pan.baidu.com/s/1skgEosX)。 | |
*/ | |
if (window.location.host.indexOf('panda') < 0) { | |
window.location.href = 'http://www.panda.tv/cate/lol'; | |
} |
NewerOlder