Skip to content

Instantly share code, notes, and snippets.

View qichunren's full-sized avatar
🌈
Focusing contribute

Qichunren qichunren

🌈
Focusing contribute
View GitHub Profile
#!/bin/bash
ps aux | grep dispatch.fcgi | egrep -v grep | awk '{print $2}' | xargs kill -9
function $(s){return document.getElementById(s);}
var lunarInfo=new Array(
0x04bd8,0x04ae0,0x0a570,0x054d5,0x0d260,0x0d950,0x16554,0x056a0,0x09ad0,0x055d2,
0x04ae0,0x0a5b6,0x0a4d0,0x0d250,0x1d255,0x0b540,0x0d6a0,0x0ada2,0x095b0,0x14977,
0x04970,0x0a4b0,0x0b4b5,0x06a50,0x06d40,0x1ab54,0x02b60,0x09570,0x052f2,0x04970,
0x06566,0x0d4a0,0x0ea50,0x06e95,0x05ad0,0x02b60,0x186e3,0x092e0,0x1c8d7,0x0c950,
0x0d4a0,0x1d8a6,0x0b550,0x056a0,0x1a5b4,0x025d0,0x092d0,0x0d2b2,0x0a950,0x0b557,
0x06ca0,0x0b550,0x15355,0x04da0,0x0a5d0,0x14573,0x052d0,0x0a9a8,0x0e950,0x06aa0,
0x0aea6,0x0ab50,0x04b60,0x0aae4,0x0a570,0x05260,0x0f263,0x0d950,0x05b57,0x056a0,
new Validation('<%="category_#{category.id.to_i}"%>', {immediate: false, onFormValidate: function(result, form){
if(result){
$('submit_<%=category.id.to_i%>').value='保存..';
$('submit_<%=category.id.to_i%>').disable();
new Ajax.Request('<%=url_for(:action => "update_category_score_params", :id => category.id.to_i)%>', {
asynchronous:true, evalScripts:true,onComplete:function(response){$('submit_<%=category.id.to_i%>').value='保存';$('submit_<%=category.id.to_i%>').enable();$('submit_<%=category.id.to_i%>').value='保存';},parameters:Form.serialize(form)}
);
}}});
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\DeleteSVN]
@="Delete SVN Folders"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\DeleteSVN\command]
@="cmd.exe /c \"TITLE Removing SVN Folders in %1 && COLOR 9A && FOR /r \"%1\" %%f IN (.svn) DO RD /s /q \"%%f\" \""
#产生随机的密码
def generate_password
chars = ("a".."z").to_a + ("0".."9").to_a
#puts chars
Array.new(6, '').collect{chars[rand(chars.size)]}.join
end
#测试
puts generate_password
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>MODAL DEMO</title>
<script type="text/javascript" src="jquery-1.3.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
set nu
set autoindent
colorscheme evening
set encoding=utf-8
set fileencodings=utf-8,chinese,latin-1
if has("win32")
set fileencoding=chinese
else
set fileencoding=utf-8
endif
@qichunren
qichunren / oracle中的存储过程
Created March 1, 2010 08:14
oracle存储过程
--搜索关键字的记录
CREATE OR REPLACE PROCEDURE P_NEWKEYWORD(
p_keyword VARCHAR
)IS
v_keyword_id number;
v_now date:=sysdate;
BEGIN
BEGIN
SELECT ID INTO v_keyword_id FROM KEYWORDS WHERE keyword=p_keyword AND ROWNUM=1;
@qichunren
qichunren / Pager object example
Created February 26, 2010 09:55 — forked from anonymous/Pager object example
simple php framework的分页
<?PHP
// First off, how many items per page?
$per_page = 4;
// Next, get the total number of items in the database
$num_videos = $db->getValue("SELECT COUNT(*) FROM videos where status = 'approved' ORDER BY dt");
// Initialize the Pager object
$pager = new Pager($_GET['p'], $per_page, $num_videos);
@qichunren
qichunren / oracle数据库中相关命令
Created February 24, 2010 08:04
oracle数据库命令
# 关于oracle plsql developer
imp file=xxx fromuser=xxx touser=xxx
sqlplus "/as sysdba"
startup