find /home/wwwroot/ -type f -print0 | xargs -0 sed -i 's/string/replacement/g'
或
find /home/wwwroot/ -type f -exec sed -i 's/string/replacement/g' {} \;
find /home/wwwroot/ -type f -print0 | xargs -0 sed -i 's/string/replacement/g'
或
find /home/wwwroot/ -type f -exec sed -i 's/string/replacement/g' {} \;
// ==UserScript== | |
// @name Enable Copy | |
// @description Allow you copy-paste action on "copy-protected" website | |
// @version 1.2 | |
// ==/UserScript== | |
setInterval("document.oncontextmenu=null;document.contextmenu=null;document.ondragstart=null;document.onkeydown=null;document.onmousedown=null;document.onmousemove=null;document.onmouseup=null;document.onselectstart=null;document.selectstart=null;window.oncopy=null;document.oncopy=null;document.body.oncopy=null;document.body.onselect=null;document.body.onbeforecopy=null;document.body.contextmenu=null;document.body.oncontextmenu=null;document.body.ondragstart=null;document.body.onkeydown=null;document.body.onmousedown=null;document.body.onmousemove=null;document.body.onmouseup=null;document.body.selectstart=null;document.body.onselectstart=null;window.contextmenu=null;window.oncontextmenu=null;window.ondragstart=null;window.onkeydown=null;window.onmousedown=null;window.onmousemove=null;window.onmouseup=null;window.selectstart=null;window.onselectstart=null;window |
/** | |
* browser sinffing | |
* http://james.padolsey.com/javascript/detect-ie-in-js-using-conditional-comments/ | |
*/ | |
(function(){ | |
var ie = (function(){ | |
var undef, | |
v = 3, | |
div = document.createElement('div'), |
/*检测浏览器语言*/ | |
function get_client_language($availableLanguages, $default='en'){ | |
if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { | |
$langs=explode(',',$_SERVER['HTTP_ACCEPT_LANGUAGE']); | |
//start going through each one | |
foreach ($langs as $value){ | |
##MySQL数据库SQL(Structured Query Language)结构化查询语言常用基本操作: | |
/*DDL(Data Definition Language)数据定义语言*/ | |
##创建数据库: | |
create database '数据库名称' charset utf8; | |
##删除数据库: | |
drop database '数据库名称'; | |
##显示所有数据库: | |
show databases; | |
##使用数据库 | |
use '数据库名称'; |
curl -A "Mozilla" "http://translate.google.com/translate_tts?tl=en&q=hello+world" > hello.mp3 |
#!/usr/bin/env python | |
# Knuth-Morris-Pratt demonstration | |
# Kyle Gorman <kgorman@ling.upenn.edu> | |
# | |
# A naive Python implementation of a function that returns the (first) index of | |
# a sequence in a supersequence is the following: | |
def subsequence(needle, haystack): | |
""" | |
Naive subsequence indexer; None if not found |
#! /usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import os | |
import re | |
import time | |
import email | |
import poplib | |
import imaplib | |
import cStringIO |
// created by zhanglei http://www.love4026.org at 2011-2-23 | |
var img=document.getElementsByTagName('img');function getElementsByClassName(strClassName){var arrElements=document.all?document.all:document.getElementsByTagName('*');var arrReturnElements=new Array();strClassName=strClassName.replace(/\-/g,"\\-");var oRegExp=new RegExp("(^|\\s)"+strClassName+"(\\s|$)");for(var i=0;i<arrElements.length;i++){if(oRegExp.test(arrElements[i].className)){arrReturnElements.push(arrElements[i]);}}return(arrReturnElements)}function getFloat(el){if(!window.getComputedStyle||!document.defaultView){if(el.getAttribute('align')=='left'||el.getAttribute('align')=='right')var y=el.getAttribute('align');else var y=el.currentStyle['styleFloat'];}else var y=document.defaultView.getComputedStyle(el,null).getPropertyValue('float');return y;}for(var i=0;i<img.length;i++){if(img[i].height>100&&img[i].width>100){var innerhtml=document.createElement('div');innerhtml.innerHTML='<span>Get a Quote</span>';innerhtml.className="imgHoverBtn";va |
#!/usr/bin/env python | |
import SocketServer | |
from threading import Thread | |
class service(SocketServer.BaseRequestHandler): | |
def handle(self): | |
data = 'dummy' | |
print "Client connected with ", self.client_address |