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
(function insertScripts(src) { | |
if (src instanceof Array && src.length) { | |
insertScripts(src.shift()) | |
return insertScripts(src); | |
} | |
var script = document.createElement('script'); | |
script.type = 'text/javascript'; | |
script.src = src; | |
document.head.appendChild(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
setInterval(function () { | |
// 取得網頁上所有連結 | |
var a = document.getElementsByTagName('a'); | |
// 針對每個連結跑一次 | |
for (var i in a) { | |
// 檢查是不是真的是連結 | |
if (a.hasOwnProperty(i)) { | |
// 檢查是不是讚的連結 | |
if (a[i].className == "UFILikeLink") { | |
// 檢查是不是還沒按過讚 |
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
function MyArray() { | |
var parent = { // Remember the Origional-methods | |
push: this.push | |
} | |
this.push = function (element) { // Override | |
// Do my actions | |
return parent.push.apply(this, arguments); | |
} |
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
// Batch Big5-URLDecoder | |
// go visit http://www.mytju.com/classcode/tools/urldecode_big5.asp | |
(function insertScripts(src) { | |
if (src instanceof Array && src.length) { | |
insertScripts(src.shift()) | |
return insertScripts(src); | |
} | |
var script = document.createElement('script'); | |
script.type = 'text/javascript'; |
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
// a modification from http://goo.gl/tLbLXr | |
var attachEvent = function(element, event, fn) { | |
if (element.addEventListener) | |
element.addEventListener(event, fn, false); | |
else if (element.attachEvent) // if IE | |
element.attachEvent('on' + event, fn); | |
} | |
var onReady = function(func) { |
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
@sansSerifBold: Helvetica, Arial, "LiHei Pro", "AdobeFanHeitiStd-Bold","Microsoft JhengHei", "新細明體"; // 適合粗體標題使用 | |
@sansSerif: Helvetica, Arial, "LiHei Pro", "Microsoft JhengHei", "新細明體"; // 一般內文適用 | |
body, input, select, button { | |
font-family: @sansSerif !important; | |
} | |
h1,h2,h3,h4,h5,h6{ | |
font-family: @sansSerifBold; | |
} |
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
html.bs-wrap { | |
font-family: sans-serif; | |
-webkit-text-size-adjust: 100%; | |
-ms-text-size-adjust: 100%; | |
} | |
body.bs-wrap { | |
margin: 0; | |
} | |
.bs-wrap article, | |
.bs-wrap aside, |
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: function gmailRawURL(t){return"//mail.google.com/mail/"+String(location).match(/(u\/\d*\/)/)+"?ik="+GLOBALS[9]+"&view=om&th="+t}function downloadURL(t,a){var o=document.createElement("a");o.setAttribute("href",a),o.setAttribute("download",t),o.click(),console.log("Download",a,"as",t)}function download(t,a){var o=document.createElement("a");o.setAttribute("href","data:text/plain;charset=utf-8,"+encodeURIComponent(a)),o.setAttribute("download",t),o.click()}Array.prototype.forEach.call($$(".kQ"),function(t){t.click()}),Array.prototype.forEach.call($$(".kv .adf"),function(t){t.click()}),Array.prototype.forEach.call($$(".h7 .hb .g2.ac2"),function(t){console.log(t.getAttribute("email"))});var mails=$$(".adP.adO"),recieverEmails=Array.prototype.map.call($$(".h7 .hb .g2.ac2"),function(t){return t.getAttribute("email")}),mailUrls=[];for(var i in mails)id=String(mails[i].className).match(/m([\d\w]+)/),id&&mailUrls.push(gmailRawURL(id[1]));mailUrls.forEach(function(t,a){downloadURL(recieverEmails[a]+".eml",t |
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
RewriteEngine On | |
# To externally redirect /dir/foo.html to /dir/foo | |
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s([^.]+)\.html [NC] | |
RewriteRule ^ %1 [R,L,NC] | |
## To internally redirect /dir/foo to /dir/foo.html | |
RewriteCond %{REQUEST_FILENAME}.html -f [NC] | |
RewriteRule ^ %{REQUEST_URI}.html [L] |
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
<?php | |
/* | |
* PHP: Recursively Backup Files & Folders to ZIP-File | |
* (c) 2012-2014: Marvin Menzerath - http://menzerath.eu | |
*/ | |
// Make sure the script can handle large folders/files | |
ini_set('max_execution_time', 600); | |
ini_set('memory_limit','1024M'); |
OlderNewer