Skip to content

Instantly share code, notes, and snippets.

View girvan's full-sized avatar
Hello World!

Hi girvan

Hello World!
View GitHub Profile
@girvan
girvan / gist:5715525
Last active December 18, 2015 03:08
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=1" />
<meta name="viewport" id="viewport" />
<script>
(function(s, o){
var p = (o == 0),
w = p ? 768 : 1024,
c = p ? 320/w : 480/w;
document.getElementById('viewport').setAttribute('content', 'width=' + w + ',initial-scale=' + c);
})(screen, window.orientation);
</script>
@girvan
girvan / gist:5718987
Last active December 18, 2015 03:29
viewport modifier
<?php
function smarty_modifier_viewport($content = null)
{
$html = '';
// no viewport
if(!empty($content))
$html = '<meta name="viewport" content="' . $content . '" />';
****** ERROR: 不是不開,時候未到
****** ERROR: 他倆竟是同班同學???
****** ERROR: 本月巡迴演出11場。
****** ERROR: 目前就促績效數。
****** ERROR: 深夜加油站,我沒遇見蘇格拉底
****** ERROR: 本月巡迴演出8場。
****** ERROR: 好吃的麥當當薯條。。。
****** ERROR: 2009年是個節約年。。。
****** ERROR: 相簿暫時開放。。。
****** ERROR: 元旦寶寶,生日快樂!!
@girvan
girvan / gist:6017328
Last active May 3, 2017 08:57
bots request header

facebook

  'HTTPS: 
  USER_AGENT: facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)
  HOST: tw.piliapp.com
  ACCEPT: */*
  ACCEPT_ENCODING: deflate, gzip
  RANGE: bytes=0-524287
  CONNECTION: keep-alive
@girvan
girvan / gist:6145342
Last active December 20, 2015 14:19
koko css
/* yun123062 : Thu, 25 Jul 2013 17:56:34 +0800 */
table {
border-collapse:collapse;
border-spacing:0;
}
address,caption,cite,code,dfn,em,th,var {
font-style:normal;
font-weight:400;
}
@girvan
girvan / gist:6145343
Last active December 20, 2015 14:19
koko desc
<div class="fs-desc">
記錄生活。旅遊。攝影。美食
</div>
<div id="nav" class="nav fs-bar">
<a href="http://yun965900.pixnet.net/blog/category/430408">婚攝服務</a>
<span class="sp">|</span>
<a href="http://yun965900.pixnet.net/blog">蕓凡攝影</a>
<span class="sp">|</span>
@girvan
girvan / gist:6145361
Last active December 20, 2015 14:19
umie css
/* umie : Sun, 21 Jul 2013 19:16:07 +0800 */
body,div,dl,dt,dd,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td {
margin:0;
padding:0;
}
table {
border-collapse:collapse;
border-spacing:0;
width:100%;
@girvan
girvan / gist:6145399
Last active December 20, 2015 14:19
gogoami desc
<div id="fs-desc">
時尚/穿搭/美妝/保養/旅行/美食/生活
</div>
<a id="email" href="http://fashion.piliapp.com/tool/show-email/[email protected]"></a>
<div id="nav" class="nav fs-bar">
<a href="/" class="focus">網誌首頁</a>
<span class="sp">|</span>
<a href="http://fashion.piliapp.com/tool/show-email/[email protected]" target="_blank">E-mail</a>
@girvan
girvan / gist:6145400
Last active December 20, 2015 14:19
gogoami css
/* gogoami : Thu, 25 Jul 2013 02:01:39 +0800 */
#comment-form table {
width:96%;
margin:0 auto;
}
#comment-form td,#comment-form th {
border:1px solid #555;
padding:3px 5px;
}
@girvan
girvan / gist:6227302
Created August 14, 2013 01:34
regex test 0
girvan@JARVIS:~$ php -r '$p = "/(fb\.me\/|facebook\.com\/)(profile\.php\?id=|groups\/)(\d+)/";
> $s = "facebook.com/profile.php?id=1234";
> preg_match($p, $s, $m);
> var_dump($m);'
array(4) {
[0]=>
string(32) "facebook.com/profile.php?id=1234"
[1]=>
string(13) "facebook.com/"
[2]=>