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
<script src="http://www.google-analytics.com/ga.js" ></script> | |
<script> | |
try { | |
var pageTracker = _gat._getTracker('UA-6851063-1'); | |
pageTracker._trackPageview(); | |
} catch(e) {} | |
</script> | |
<form action="http://www.google.com.tw/cse" target="_blank" style="margin : 10px 0" > | |
<input type="hidden" name="cx" value="partner-pub-1821434700708607:3830778188" > |
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
<div id="target" ></div> | |
<script> | |
var google_ad_client = 'ca-pub-1821434700708607', | |
google_ad_slot = '2826960791', | |
google_ad_width = 728, | |
google_ad_height = 90; | |
(function() { | |
var w = document.write; | |
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 deflate(css) { | |
// remove remark | |
css = css.replace(/\/\*[\s\S]*?\*\//g, ''); | |
// uniform @import | |
css = css | |
.replace(/@import\s+url\(\s*"([^"]+)"\s*\)\s*;/g, '@import "$1";') | |
.replace(/@import\s+url\(\s*\'([^\']+)\'\s*\)\s*;/g, '@import "$1";') | |
.replace(/@import\s+url\(\s*([\S^\)]+)\s*\)\s*;/g, '@import "$1";') | |
.replace(/@import\s*"([^"]+)"\s*;/g, '@import "$1";') |
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
<script> | |
for(var page = 1; page <= 20; ++page) { | |
for(var pageNum = 1; pageNum <= 20; ++pageNum) { | |
if (page <= pageNum) { | |
console.log(getPageDetail(page, pageNum)); | |
} | |
} | |
} | |
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 folderID = '1234567890', | |
pageNum = 100; | |
var jsons = [], | |
files = []; | |
for (var i = 0; i < pageNum; ++i) { | |
jsons.push($.getJSON('https://app.box.com/index.php?rm=box_item_list&q[sort]=name&q[direction]=DESC&q[id]=d_' + folderID + '&q[page_num]=' + i + '&q[page_size]=20&q[theme_id]=1&q[collection_id]=0')); | |
} | |
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 | |
$user = 'demo'; | |
$html = ''; | |
for ($i = 1; $i <= 100; ++$i) { | |
$html .= file_get_contents("http://photo.xuite.net/$user*$i"); | |
} | |
$tokens = array_slice(explode('<p class="album_info_title">', $html), 1); |
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 | |
$user = 'demo'; | |
$videos = array(); | |
for ($i = 1; $i <= 3; ++$i) { | |
foreach (array_slice(explode('<div class="media_thumb">', file_get_contents('http://vlog.xuite.net/' . $user . '*' . $i)), 1) as $token) { | |
$hq = strpos($token, '<div class="media_hq">') !== false; | |
$token = substr($token, strpos($token, '<a href="/play/') + 15); |
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 | |
$q = 'demo'; | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, 'https://www.google.com.tw/search?q=' . rawurlencode($q) . '&tbm=nws&tbs=qdr:d'); | |
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.91 Safari/537.36'); | |
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); | |
curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); | |
$html = curl_exec($ch); |
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 | |
require('phpQuery/phpQuery.php'); | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_USERAGENT, 'facebookexternalhit/1.1 (+https://www.facebook.com/externalhit_uatext.php)'); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); | |
$articles = array(); |
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
<style> | |
div { | |
background-color: #005e81; | |
color: #FFF; | |
font-weight: bold; | |
font-size: 240px; | |
font-family: sans-serif; | |
width: 540px; | |
height: 528px; | |
padding-top: 12px; |