This file contains hidden or 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
// ==UserScript== | |
// @name twse | |
// @namespace twse | |
// @description twse | |
// @include http://mis.twse.com.tw/stock/fibest.jsp?stock=* | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
/** | |
這是搭配 twse 股票報價的 script |
This file contains hidden or 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
.float {float: left; width: 40%; background-color: green; margin: 10px;} | |
.inline-one {height: 50px;} | |
.inline-two {height: 100px;} |
This file contains hidden or 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
1. 連到任一網頁如 google.com | |
2. 點擊網址列旁的星星加入書籤 | |
3. 將書籤連結改為以下之一 | |
最初可用版本 | |
javascript:$('head').append('<script src="https://cdn.rawgit.com/benbai123/HTML_CSS_Javascript_practice/ucpaging/tmp/uccustomize.js"></script>'); | |
第二版 |
This file contains hidden or 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
## | |
# from ubuntu 14.04 container first | |
# ref: https://docs.docker.com/engine/tutorials/dockerimages/ | |
## | |
# pull ubuntu 14.04 and run it | |
sudo docker pull ubuntu:14.04 | |
sudo docker run -t -i --expose 3306 --expose 3000 -p 3306:3306 -p 3000:3000 ubuntu:14.04 /bin/bash | |
# container up, run in container below |
This file contains hidden or 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
@echo off | |
SETLOCAL enabledelayedexpansion | |
SET scpbase=C:\Users\Bai\SCP\ | |
SET scplatest=C:\Users\Bai\SCP\Latest | |
:: install WinSCP on Windows | |
:: install openssh server on Ubuntu | |
:: sudo apt-get install openssh-server | |
:: sudo ufw allow 22 | |
:: 取當日 | |
:loop |
This file contains hidden or 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
var focuspwTimer, blurpwTimer; | |
function resetPwTimer () { | |
clearTimeout(focuspwTimer); | |
clearTimeout(blurpwTimer); | |
} | |
function focusPw () { | |
resetPwTimer(); | |
focuspwTimer = setTimeout(function () { | |
if (!$('#pwfocusbox')[0]) { | |
$('.cd-user-modal') |
This file contains hidden or 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
var _handleTradeWaitingQueue = [], // 處理的 queue | |
concurrentTradeLimit = 300, // 同時處理上限 | |
concurrentTradeCount = 0; // 處理計數 | |
function afterTradeHandle () { | |
// 計數小於上限 且 有未處理項目才處理 | |
if (concurrentTradeCount < concurrentTradeLimit | |
&& _handleTradeWaitingQueue.length) { | |
concurrentTradeCount++; | |
handle(_handleTradeWaitingQueue.shift()); |
This file contains hidden or 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
# Ref: https://docs.docker.com/engine/installation/linux/ubuntulinux/ | |
# Update package information, ensure that APT works with the https method, and that CA certificates are installed. | |
sudo apt-get update | |
sudo apt-get install apt-transport-https ca-certificates | |
# Add the new GPG key. | |
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D | |
# Open the /etc/apt/sources.list.d/docker.list file in your favorite editor. |
This file contains hidden or 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
## | |
# from ubuntu 14.04 container first | |
# ref: https://docs.docker.com/engine/tutorials/dockerimages/ | |
## | |
# pull ubuntu 14.04 and run it | |
sudo docker pull ubuntu:14.04 | |
sudo docker run -t -i --expose 3306 --expose 80 -p 3306:3306 -p 80:80 ubuntu:14.04 /bin/bash | |
This file contains hidden or 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
gzip 測試使用線上 gzip 網站 | |
可以直接估狗 gzip online 就找得到了 | |
http://www.txtwizard.net/compression | |
sample JSON 為連到 | |
https://www.urcosme.com/find-product/1 | |
開啟 Chrome Developer Tools 的 console | |
執行以下 SampleJSON.js 內的 JavaScript *1 | |
即會從當前頁面爬內容生成 JSON string |
NewerOlder