This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//@vilic | |
function deleteHtmlTag(htmlStr){ | |
return return htmlStr.replace(/<(script|noscript|style|button)(?:(["'])[\s\S]*\2|[^>])*>[\s\S]+?<\/\1> | |
/g, "").replace(/<\/?[a-z]+(?:(["'])[\s\S]*\1|[^>])*>/g, ""); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
#sda_banner{ | |
width:960px; | |
height:60px; | |
overflow:hidden; | |
margin:0 auto; | |
position:relative; | |
} | |
#sda_banner_closebtn{ | |
width:19px; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static function InsertTextToResponseBody(oSession: Session, place:String, text:String){ | |
oSession['ui-backcolor'] = 'Orange'; | |
oSession.utilDecodeResponse(); | |
var rPattern = /'(?:[^\\']|\\.)*'|"(?:[^\\"]|\\.)*"|<(\/?(?:head|body))[^<>]*>/ig; | |
var oBody = ''; | |
//简单判断一下编码..尼玛 | |
if( /\butf-8\b/.test(oSession.oResponse.headers['Content-Type'].ToLower())){ | |
oBody = System.Text.Encoding.UTF8.GetString(oSession.responseBodyBytes); | |
}else{ | |
oBody = System.Text.Encoding.Default.GetString(oSession.responseBodyBytes); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function ergodic(){ | |
for file in ` ls $1 ` | |
do | |
if [ -d $1"/"$file ] | |
then | |
ergodic $1"/"$file | |
else | |
echo $1"/"$file >> b | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
title sublime text 2 配置小助手 | |
::st2主程序名称 | |
set sublime_exe=sublime_text.exe | |
::st2主程序全路径 | |
set exepath=%~dp0%sublime_exe% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { | |
font-family: Helvetica, arial, sans-serif; | |
font-size: 14px; | |
line-height: 1.6; | |
padding-top: 10px; | |
padding-bottom: 10px; | |
background-color: white; | |
padding: 30px; } | |
body > *:first-child { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'#fff'.replace(/^#(\w)(\w)(\w)$/,'#$1$1$2$2$3$3').replace(/#|\w{2}/g,function($a,index){ | |
if($a=='#')return 'rgb(' | |
else return parseInt($a,16) + (index == 5 ? ')' : ','); | |
}) | |
'rgb(255,0,255)'.replace(/[\D]+(\d+)\)?/g,function($a,$1,i){ return (!i?'#':'') + (+$1).toString(16).replace(/^\w$/,'$&$&') }) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function (window, document, ns, undefined) { | |
var Node = function (data, parentNode) { | |
this._childCount = 0; | |
this.data = data; | |
this.parentNode = parentNode || null; | |
this.childNodes = {}; | |
}; | |
Node.prototype = { | |
constuctor : Node, | |
appendChild : function (data) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function replacer(str, obj){ | |
return str.replace(/@{(\w+)}/g,function($all,$1){ | |
return obj[$1] === 0 ? 0 : (obj[$1] || ''); | |
}) | |
} |
NewerOlder