Skip to content

Instantly share code, notes, and snippets.

<style>
.bizmail_loginpanel{font-size:12px;width:300px;height:auto;border:1px solid #cccccc;background:#ffffff;}
.bizmail_LoginBox{padding:10px 15px;}
.bizmail_loginpanel h3{padding-bottom:5px;margin:0 0 5px 0;border-bottom:1px solid #cccccc;font-size:14px;}
.bizmail_loginpanel form{margin:0;padding:0;}
.bizmail_loginpanel input.text{font-size:12px;width:100px;height:20px;margin:0 2px;border:1px solid #C3C3C3;border-color:#7C7C7C #C3C3C3 #C3C3C3 #9A9A9A;}
.bizmail_loginpanel .bizmail_column{height:28px;}
.bizmail_loginpanel .bizmail_column label{display:block;float:left;width:30px;height:24px;line-height:24px;font-size:12px;}
.bizmail_loginpanel .bizmail_column .bizmail_inputArea{float:left;width:240px;}
.bizmail_loginpanel .bizmail_column span{font-size:12px;word-wrap:break-word;margin-left: 2px;line-height:200%;}
@bjjay
bjjay / test_frame.js
Created November 5, 2012 02:14
framework for test
var testList = {
"player_manager":[
"init_get_instance---''---true---noauto",
"case_create_delete---''---true---true",
"case_delete_after_playing---''---true---true",
"case_delete_while_playing---''---true---true",
"case_create_del_2_player_for_same_uri---''---true---true",
"case_create_del_2_player_for_diff_uri---''---true---true",
"case_max_player---''---true---true",
@bjjay
bjjay / test_frame.js
Created November 1, 2012 08:10
framework for test
var player_manager=[
"init_get_instance---''---true---noauto",
"case_create_delete---''---true---true",
"case_delete_after_playing---''---true---true",
"case_delete_while_playing---''---true---true",
"case_create_del_2_player_for_same_uri---''---true---true",
"case_create_del_2_player_for_diff_uri---''---true---true",
"case_max_player---''---true---true",
];
@bjjay
bjjay / getMAC.py
Created July 23, 2012 14:09
get PC MAC address
import uuid
mac=uuid.UUID(int = uuid.getnode()).hex[-12:]
mac=":".join([mac[e:e+2] for e in range(0,11,2)])
@bjjay
bjjay / sqlite.js
Created June 27, 2012 09:09
sqlite class
//copyright by lanxyou lanxyou[at]gmail.com
var lanxDB=function(dbname){
var db=openDatabase(dbname,'1.0.0','',65536);
return{
//返回数据库名
getDBName:function(){
return dbname;
},
//初始化数据库,如果需要则创建表
init:function(tableName,colums){
@bjjay
bjjay / jsTemplate
Created June 20, 2012 10:23
javascript template
// By default, Underscore uses ERB-style template delimiters, change the
// following template settings to use alternative delimiters.
_.templateSettings = {
evaluate : /<%([\s\S]+?)%>/g,
interpolate : /<%=([\s\S]+?)%>/g,
escape : /<%-([\s\S]+?)%>/g
};
// JavaScript micro-templating, similar to John Resig's implementation.
// Underscore templating handles arbitrary delimiters, preserves whitespace,
@bjjay
bjjay / gist:2652089
Created May 10, 2012 09:21
unzip files
#!/bin/bash
for item in `ls -d */*.zip`
do
sub=`echo $item | cut -d / -f 1`
unzip $sub/*.zip -d $sub
unrar e $sub/*.rar $sub
rm -f $sub/*.zip $sub/*.rar
done;
@bjjay
bjjay / openshift.md
Created May 1, 2012 14:15 — forked from wynemo/openshift.md
openshift python tutorail

ubuntu 11.10 install openshift client tools

  • ruby stuff

      $ sudo aptitude install ruby
      $ sudo aptitude install rubygems
      $ sudo gem install json_pure
      $ sudo gem install rake
      $ sudo gem install rhc
    
  • fix the error file mime-types-1.18.gemspec then re-install all gems needed