Skip to content

Instantly share code, notes, and snippets.

View Gaubee's full-sized avatar
🫐
Growing

Gaubee Gaubee

🫐
Growing
View GitHub Profile
@Gaubee
Gaubee / namespace0.2Vs0.3.js
Last active March 1, 2018 03:03
司徒正美的解析和abcd的解析比较测试。
(function(){
var KEYWORDS = "abstract,boolean,byte,char,double,final,float,goto,implements,int,interface,long,native,package,private,protected,public,short,static,synchronized,throws,transient,volatile,arguments,let,yield";
var NO_VAR_KEYWORDS={};
var REMOVE_RE = /\/\*(?:.|\n)*?\*\/|\/\/[^\n]*\n|\/\/[^\n]*$|'[^']*'|"[^"]*"|[\s\t\n]*\.[\s\t\n]*[$\w\.]+/g;
var SPLIT_RE = /[^\w$]+/g;
var KEYWORDS_RE = new RegExp(["\\b" + KEYWORDS.replace(/,/g, '\\b|\\b') + "\\b"].join('|'), 'g');
var NUMBER_RE = /\b\d[^,]*/g;
var BOUNDARY_RE = /^,+|,+$/g;
var getVariables = this.g1 = function(code) {
code = code
@Gaubee
Gaubee / WebKit-Style.js
Last active December 19, 2015 17:49
write all element's style in the prototye of style. 将元素所有的样式写到style中,方便单文件复制。 mhtml的保存并不完整。
(function (G) {
function simpleDOM(tagName){
var dom = document.createElement(tagName);
document.body.appendChild(dom);
return dom;
}
function getDifStyle(el){
var baseDOM = simpleDOM(el.tagName);
var elStyle = getComputedStyle(el);
var baseDOMStyle = getComputedStyle(baseDOM);
function StartTagToken(){
}
function EndTagToken(){
}
function Attribute(){
}
@Gaubee
Gaubee / MVC_view.html
Created July 15, 2013 07:11
一种模板解析的思路
<html>
<head>
<title>parse View</title>
</head>
<body>
<script type="template">
Hello,{{fullName}}.
<!--{{fullName}} = {{firstName}}+" "+{{lastName}}-->
<hr />
<input ms-value={{firstName}} ms-title = "姓:{{firstName}}" ></input>
@Gaubee
Gaubee / n2a.js
Created July 16, 2013 05:06
汉字转unicode编码
function n2a(str,f){
var reg = f ? /./g : /[\u4e00-\u9fa5]/g;
return str.replace(reg,function(a){
return "\\u" + ('0000'+Number(a.charCodeAt(0)).toString(16)).slice(-4);
});
};

==========

A useful tools or tips list for mobile web application developing

这个项目收集移动端开发所需要的一些资源与小技巧

一些非常重要的工具类网站

@Gaubee
Gaubee / index.html
Last active December 20, 2015 14:59
nodejs远程命令行系统
<html>
<head>
<title>hehe</title>
<meta content="The Shell command runner Based on Nodejs">
<style>
/**
* basic styles for the javascript sandbox console - joss crowcroft
*
* http://josscrowcroft.github.com/javascript-sandbox-console/
*/
@Gaubee
Gaubee / firebug-lite.md
Last active December 21, 2015 04:09
firebug-lite搭建在本地,供虚拟机上的IE调试用

firebug-lite下载地址https://getfirebug.com/releases/lite/latest/firebug-lite.tar.tgz

下载完后直接搭建在本地80端口上,我的80端口是php服务器,支持文件夹路由,所以直接把压缩包解压到www文件夹下

IE6~8都是在虚拟机中调试,要连接Ubuntu上的端口不能用localhost,需要先获取本地IP地址:

$ ifconfig

找到wlan0的ip,比如说是: 192.168.0.109 。所以在虚拟机中的访问地址是 localtion.hastname + location.port + $fire_path

@Gaubee
Gaubee / mix.js
Last active March 1, 2018 03:02
mix to javascript Object
function _mix(sObj, nObj) {
var obj_s, obj_n, i;
if (sObj instanceof Object && nObj instanceof Object) {
for (i in nObj) {
if ((obj_s = sObj[i]) !== (obj_n = nObj[i])) {//避免循环 Avoid Circular
sObj[i] = _mix(sObj[i], nObj[i]);
}
}
return sObj;
} else {
@Gaubee
Gaubee / host
Last active December 22, 2015 23:19
Hosts
#UPDATE:2013-12-07 12:16
127.0.0.1 localhost
#SmartHosts START
#Google Services START
203.208.46.200 0.docs.google.com
203.208.46.200 0.drive.google.com
203.208.46.200 1.docs.google.com