Skip to content

Instantly share code, notes, and snippets.

View wuliupo's full-sized avatar
🎯
Focusing: Jenkins, Vue, React

Pauli wuliupo

🎯
Focusing: Jenkins, Vue, React
View GitHub Profile
@wuliupo
wuliupo / fix-calendar-position.aspx.cs
Last active August 29, 2015 13:56
fix the position of asp:CalendarExtender
<asp:TextBox ID="idInputButton" runat="server" />
<asp:ImageButton ID="idImageButton" ImageUrl="~/Images/calender.png" AlternateText="Click to show calendar" runat="server" />
<asp:MaskedEditExtender ID="fromCalendarMEE" runat="server"
TargetControlID="idInputButton" Mask="9999/99/99" MaskType="Date" Century="2000" AutoComplete="true" CultureName="sv-SE"/>
<asp:CalendarExtender OnClientShown="fixCalendarPosition" ID="fromCalendarButtonExtender" runat="server" TargetControlID="idInputButton" PopupButtonID="idImageButton" Format="yyyy'-'MM'-'dd" />
<script type="text/javascript">
function fixCalendarPosition(cal) {
var off = $(cal._element).offset();
$(cal._container).css({position: 'fixed', left: off.left, top: off.top + 22});
@wuliupo
wuliupo / itstar-app.htm
Last active August 29, 2015 13:57
小应用列表
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0" name="viewport" />
<link rel="stylesheet" type="text/css" href="./common/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="./common/css/common.css">
<title>应用列表</title>
<base target="_blank">
@wuliupo
wuliupo / functions.php
Last active August 29, 2015 13:57
wordpress language switch, no refesh, cookie remember;多语言切换,不刷新页面,cookie 记住当前语言
<?php
// /wp-content/themes/****/functions.php
add_filter( 'body_class', 'lang_body_classes' );
function lang_body_classes( $classes ) {
if($_GET['lang']=='en' || $_COOKIE['lang']=='en'){
$classes[] = 'en';
@setcookie('lang', 'en');
}
return $classes;
}
@wuliupo
wuliupo / list.php
Last active August 29, 2015 13:57
list files under data folder
<!DOCTYPE HTML>
<html lang="en">
<head>
<title>文件列表</title>
<meta charset="UTF-8" />
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0" name="viewport" />
<link rel="stylesheet" type="text/css" href="../../common/css/bootstrap.min.css" />
<style type="text/css">
@media screen and (max-width:600px) {
@wuliupo
wuliupo / cruisecontrol.css
Last active August 29, 2015 13:57
change cruisecontrol style
.compile-data, .compile-error-data,.compile-warn-data, .modifications-data, .modifications-evenrow, .modifications-oddrow{
white-space: normal;
word-wrap: break-word;
word-break: break-all;
max-width: 99%;
}
.compile-data, .compile-error-data,.compile-warn-data {
display: block;
}
.modifications-evenrow, .modifications-oddrow {
<!DOCTYPE html>
<html>
<head>
<title>Bar Colors Example</title>
</head>
<body>
<div class="action"><button id="Real">Real</button><button id="Relative">Relative</button></div>
<div id="canvas" class="example-chart" style="height:1000px;width:100%"></div>
<script type="text/javascript" src="jquery.min.js"></script>
<script type="text/javascript" src="../src/jquery.jqplot.js"></script>
@wuliupo
wuliupo / wc2014.ics
Created June 13, 2014 09:32
World Cup 2014 Calendar
BEGIN:VCALENDAR
METHOD:PUBLISH
VERSION:2.0
X-WR-CALNAME:世界杯
PRODID:-//Apple Inc.//Mac OS X 10.9.2//EN
X-APPLE-CALENDAR-COLOR:#711A76
X-WR-TIMEZONE:Asia/Shanghai
CALSCALE:GREGORIAN
BEGIN:VTIMEZONE
TZID:Asia/Shanghai
@wuliupo
wuliupo / ScriptInHTML.html
Last active August 29, 2015 14:03
ScriptInAjax
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>ScriptInHTML</title>
</head>
<body>
<button type="button" onclick="loadData();" >click me to load data</button>
<div id="loading">Loading</div>
<script type="text/javascript" src="//code.jquery.com/jquery-latest.js"></script>
@wuliupo
wuliupo / choujiang.htm
Created May 4, 2016 06:24
滚动抽奖活动
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=gb2312"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>抽奖活动</title>
<style type="text/css">
body{font-size:12px;text-align:center;line-height:40px;}
.result_box{margin:0 auto;width:700px;max-width:100%;padding:10px 0;text-align:center;border:3px solid #40AA53;background:#efe;}
.result_box #oknum{width:99%;color:#cc0000;font-size:50pt;font-family:Verdana;text-align:center;border:none;background:#efe;}
@wuliupo
wuliupo / get.php
Created June 14, 2016 05:13
PHP get remote file, anti anti spam
<?php
$url = getParam('url');
$encode = getParam('encode');
$file = 'cache/'.md5($url);
$exist = file_exists($file);
if($exist && (time() - filemtime($file) < 3600)){ // use cache during 10 minutes
echo file_get_contents($file);
exit();
}