Skip to content

Instantly share code, notes, and snippets.

View Glowin's full-sized avatar

Glow Chiang Glowin

View GitHub Profile
@Glowin
Glowin / tce_import_xml_questions.php
Last active April 1, 2021 15:14
TCExam在线考试系统CSV转换成xml
echo '<div class="tceformbox">'.K_NEWLINE;
echo '<h1>csv转换为xml</h1>'.K_NEWLINE;
echo '<form action="transf.php" method="post" enctype="multipart/form-data" id="form_ratingeditor">'.K_NEWLINE;
echo '<div class="row">'.K_NEWLINE;
echo '<span class="label">'.K_NEWLINE;
echo '<label for="file">csv文件:</label>'.K_NEWLINE;
echo '</span>'.K_NEWLINE;
echo '<span class="formw">'.K_NEWLINE;
echo '<input type="file" name="file" id="file" /><br />'.K_NEWLINE;
echo '</span>'.K_NEWLINE;
@Glowin
Glowin / rucinaxian.txt
Created February 20, 2012 03:08
2012哥伦比亚大学中国新年晚会留学生群口相声《如此纳贤》台词整理
甲:黝黑锃亮似金刚,水中沉浮吞波澜。有人说江中怪,有人说是葫芦瓢。
二人打赌向前瞧,原来是这奥巴马在河里洗澡。
这映场小诗一首啊,今儿个过春节呢我给您说一段。说这当今社会啊……
(阎罗王、马面登场)
阎王爷:秦时明月汉时关
马面:万亿国债钱未还
@Glowin
Glowin / zhanzuo.user.js
Created March 23, 2012 09:45
黑龙江科技学院图书馆考研自习室占座脚本
/*
Library Auto Zhanzuo => A javascript snippet to help you book seats online.
Copyright (C) 2012-2013 Glow
Includes jQuery
Copyright 2011, John Resig
Dual licensed under the MIT or GPL Version 2 licenses.
http://jquery.org/license
Includes Sizzle.js
@Glowin
Glowin / first.js
Created September 5, 2012 12:16 — forked from sofish/first.js
面试的时候我会经常问,js 中如何获得 <ul> 下的第一个 <li>,你的答案是什么?
// 大家写在评论中吧,代码高亮可以这样写:
// ```js
// your code
// ```
// update: Fri Aug 31 08:39:21
// copyright: https://gist.github.com/3549352
// 加个性能测试:http://jsperf.com/get-dom-s-first-element
var util = {};
@Glowin
Glowin / usth.php
Created September 19, 2012 07:55
黑科技新网站迁移内容代码
<?php
set_time_limit(0);
//连接 access 数据库
$conn = new com("ADODB.Connection");
$connstr = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" . realpath("a.mdb");
$conn -> Open($connstr);
$rs = new com("ADODB.RecordSet");
$sql = "select * from PE_Article";
@Glowin
Glowin / ls.php
Created December 19, 2012 02:32 — forked from se4c0met/ls.php
<?php
/*
due to the open_basedir restriction, $tgtPath must be something like the following path param:
http://<your domain>.aws.af.cm/ls.php?path=/var/vcap.local/dea/apps/f-0-21341234123412abcdefgc75cc0f96b9/app/
to discover what are the allowed paths, try supplying any path, e.g. '/' then view the error logs via:
af logs <your app name>
*/
@Glowin
Glowin / fm.js
Last active December 10, 2015 11:08
百度随心听 http://fm.baidu.com 的核心播放代码
(function(a, b) {
function c(b, c) {
var g = b.nodeName.toLowerCase();
if ("area" === g) {
var g = b.parentNode, i = g.name;
if (!b.href || !i || "map" !== g.nodeName.toLowerCase())
return !1;
g = a("img[usemap=#" + i + "]")[0];
return !!g && d(g)
}
@Glowin
Glowin / qmfl_portal.js
Last active December 12, 2015 02:09
腾讯音乐2012年终盘点音乐播放器代码
if (typeof (MUSIC) == "undefined" || !MUSIC) {
var MUSIC = {version: "1.0",_QMFL: true,_debugMode: false};
}
MUSIC.emptyFn = function() {
};
MUSIC.returnFn = function(v) {
return v;
};
(function() {
@Glowin
Glowin / rss.py
Created February 17, 2013 06:58
我的 calibre RSS订阅列表
from calibre.web.feeds.news import BasicNewsRecipe
class myFeed (BasicNewsRecipe):
__author__ = u'Glowin <jiangbian66@gmail.com>'
__url__ = 'http://glowface.net'
__version__ = '1.0.1'
__license__ = 'GPL v3'
__copyright__ = u'2013, Glowin <jiangbian66@gmail.com>'
title = u'My Fav Feed'
description = u'Founded in September 2006, Smashing Magazine delivers useful and innovative information to Web designers and developers. Our aim is to inform our readers about the latest trends and techniques in Web development. We try to persuade you not with the quantity but with the quality of the information we present. Smashing Magazine is and always has been independent.'
@Glowin
Glowin / dabblet.html
Created May 2, 2013 10:11 — forked from anonymous/dabblet.html
Untitled
<P>&nbsp;&nbsp;秦奋忏悔了4个小时,牧师受不了了。<br><br>&nbsp;&nbsp;牧师说:我们的教堂太小了,装不下他那么大的罪恶,前面还有一个比较大的教堂。