git checkout master # you can avoid this line if you are in master...
git subtree split --prefix dist -b gh-pages # create a local gh-pages branch containing the splitted output folder
git push -f origin gh-pages:gh-pages # force the push of the gh-pages branch to the remote gh-pages branch at origin
git branch -D gh-pages # delete the local gh-pages because you will need it: ref
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
class LinkNode<TValue> { | |
value: TValue; | |
prev: LinkNode<TValue> | null; | |
next: LinkNode<TValue> | null; | |
constructor(value: TValue) { | |
this.value = value; | |
} | |
} |
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
def content_filter(content) | |
# remove url | |
content = content.gsub(URI::DEFAULT_PARSER.make_regexp(['http', 'https']), '') | |
# remove mentions | |
content = content.gsub(/[bB]\d+/, '') | |
# check not empty content | |
raise 'no content' if content.blank? | |
return content | |
end |
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
var A = function() {} | |
A.prototype.value = 'a' | |
var B = function() {} | |
B.prototype = new A() | |
B.prototype.value = 'b' | |
new B().value // return 'b' |
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
-- 6-5-1 | |
insert into Product(pNo, pName, unitPrice, category) | |
values('b10000', '總統之路', 300, 'Book' ); | |
insert into Author(pNo, name) | |
values('b10000', '陳水扁'); | |
insert into Member(mid, pid, name) | |
values('a00001', 'c1000000000', 'Mary'); | |
insert into Browse(mid, pNo, browseTime) | |
values('a00001', 'b10000', to_date('2003-04-05:09:00:08', 'YYYY-MM-DD:HH24:MI:SS')); |
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
var redis = require("redis"); | |
// open connection | |
var redis_url = "redis://password@host:port" | |
var sub = redis.createClient(redis_url) | |
// subscribe channel test | |
sub.on("message", function (channel, message) { | |
console.log("sub channel " + channel + ": " + message); | |
}); |
- 用 chrome 登入 facebook
- 連到 https://www.facebook.com/pokes
- 滑鼠在網頁上按
右鍵
>檢查
>Console
- 複製下面的 javascript 程式貼入 Console 中
function pokeBack() {
var btns = [...document.querySelectorAll('a[ajaxify^="/pokes/inline/?"]')]
var pokeBackBtns = btns.filter(btn => btn.textContent === "戳回去");
ShareX
Popcorn Time sh
Listary
Franz
命令列字元過濾器 ripgrep
brew install ripgrep
NewerOlder