Skip to content

Instantly share code, notes, and snippets.

View girvan's full-sized avatar
Hello World!

Hi girvan

Hello World!
View GitHub Profile
2012-12-27 23:44:23 +0800 127 5111
2012-12-27 23:45:02 +0800 119 922
2012-12-27 23:46:02 +0800 125 9067
2012-12-27 23:47:01 +0800 116 3061
          time                     |  file1  |  file2  | file 3            

-----------------------------------------|----------|-------|------- 2012-12-27 16:01:01 +0800 | 820 | 96 | 259 2012-12-27 16:02:01 +0800 | 741 | 254 | 260 2012-12-27 16:03:01 +0800 | 504 | 94 | 250 2012-12-27 16:04:01 +0800 | 694 | 87 | 279 2012-12-27 16:05:02 +0800 | 534 | 90 | 249 2012-12-27 16:06:01 +0800 | 830 | 388 | 250 2012-12-27 16:07:01 +0800 | 872 | 89 | 254 2012-12-27 16:08:01 +0800 | 492 | 92 | 258

          time                     |  file1  |  file2  | file 3            

-----------------------------------------|----------|-------|------- 2012-12-28 00:00:01 +0800 | 464 | 199 | 7916 2012-12-28 00:01:01 +0800 | 953 | 3149 | 1987 2012-12-28 00:02:02 +0800 | 5458 | 200 | 2758 2012-12-28 00:03:01 +0800 | 413 | 593 | 2231 2012-12-28 00:04:02 +0800 | 960 | 204 | 1925 2012-12-28 00:05:02 +0800 | 1183 | 207 | 5960 2012-12-28 00:06:01 +0800 | 640 | 296 | 2867

          time                     |  file1  |  file2  | file 3  | file 4  |  file5

-----------------------------------------|----------|-------|-------|------|------| 2012-12-28 00:00:01 +0800 | 147 | 158 | 149 | 158 | 1350 2012-12-28 00:01:01 +0800 | 321 | 794 | 151 | 178 | 154 2012-12-28 00:02:02 +0800 | 157 | 178 | 153 | 181 | 151 2012-12-28 00:03:01 +0800 | 178 | 163 | 151 | 165 | 163 2012-12-28 00:04:02 +0800 | 158 | 173 | 176 | 168 | 165 2012-12-28 00:05:02 +0800 | 152 | 155 | 151 | 167 | 170 2012-12-28 00:06:01 +0800 | 151 | 171 | 153 | 156 | 157 2012-12-28 00:07:01 +0800 | 157 | 157 | 165 | 147 | 169

@girvan
girvan / gist:4619304
Created January 24, 2013 09:46
wretch migration css
p, b, span {font-weight:normal;margin:0;padding:0;}
h1, #main2, h1 .description, u {display:none;}
.description, .description b, .description span, .description p {display:block;}
.description {margin:12% 20% 0 20%;background-color:lightblue;padding:30px;border:dashed 2px gray;}
.pili {font-size:32px;font-family:Simhei, arial;}
.pili p {}
.pili span {margin:24px 0 45px 0;text-align:center;}
.pili b {text-align:center;font-size:18px;}
.pili b a {font-family:cursive;}
var from_base='http://www.wretch.cc/blog/tpaobj', to_base = 'http://tpaobj.pixnet.net/blog'
, mapping = [['/1860654','/post/31234807'],
['/1861329','/post/31234809'],
['/1861358','/post/31234811'],
['/1893014','/post/31234823'],
['/1909423','/post/31234829'],
['/1912188','/post/31234835'],
['/1926607','/post/31234839'],
['/1929166','/post/31234841'],
['/1936046','/post/31234843'],
@girvan
girvan / javascript-queue.js
Last active December 12, 2015 06:28
javascript queue
/*
Example:
queue(function(){ click_it(); }, 1000);
queue(function(){ refresh_it(); }, 1800);
// it will run click_it() at 1sec, and run refresh_it() at 2.8sec
*/
var _queue_runner;
@girvan
girvan / gist:5030225
Created February 25, 2013 14:41
change jquery from ajax.googleapis.com to cdnjs.cloudflare.com
find ./* -type f -exec sed -i \
"s/ajax.googleapis.com\/ajax\/libs\/jquery\//cdnjs.cloudflare.com\/ajax\/libs\/jquery\//g" {} \;
@girvan
girvan / s3.php
Last active December 14, 2015 17:39
s3 service
<?php
define('S3_PATH', '/var/www/data/s3');
define('S3_DN', 's3.exammple.com');
function _s3_check($s3_filename)
{
$cmd = sprintf("ssh %s 'ls -al %s 2>/dev/null && echo 1;';"
,S3_DN, S3_PATH . '/' . $s3_filename);
$resp = shell_exec($cmd);
javascript:
(function(){function c(){var e=document.createElement("link");e.setAttribute("type","text/css");e.setAttribute("rel","stylesheet");e.setAttribute("href",f);e.setAttribute("class",l);document.body.appendChild(e)}function h(){var e=document.getElementsByClassName(l);for(var t=0;t<e.length;t++){document.body.removeChild(e[t])}}function p(){var e=document.createElement("div");e.setAttribute("class",a);document.body.appendChild(e);setTimeout(function(){document.body.removeChild(e)},100)}function d(e){return{height:e.offsetHeight,width:e.offsetWidth}}function v(i){var s=d(i);return s.height>e&&s.height<n&&s.width>t&&s.width<r}function m(e){var t=e;var n=0;while(!!t){n+=t.offsetTop;t=t.offsetParent}return n}function g(){var e=document.documentElement;if(!!window.innerWidth){return window.innerHeight}else if(e&&!isNaN(e.clientHeight)){return e.clientHeight}return 0}function y(){if(window.pageYOffset){return window.pageYOffset}return Math.max(document.documentElement.scrollTop,document.body.scrollTop)}func