Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
apt-get -y remove apache2
apt-get -y remove apache2.2-common
apt-get -y autoremove apache2
apt-get update -y
apt-get install -y git curl wget tmux unzip python python-dev python-distribute python-pip libcurl4-openssl-dev libxml2-dev libxslt1-dev python-lxml git libssl-dev redis-server libpcre3 libpcre3-dev zlib1g-dev build-essential tcl8.5
#安装pre库
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.38.tar.gz
#!/bin/bash
apt-get -y remove apache2
apt-get -y remove apache2.2-common
apt-get -y autoremove apache2
apt-get update -y
apt-get install -y curl wget tmux unzip python python-dev python-distribute python-pip libcurl4-openssl-dev libxml2-dev libxslt1-dev python-lxml git libssl-dev redis-server libpcre3 libpcre3-dev zlib1g-dev build-essential tcl8.5
#安装pre库
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.37.tar.gz
@wangtubs
wangtubs / 2.js
Last active October 28, 2016 20:11
function _n(key,a) {
var b = "",
e,
c,
h,
f,
g,
d = 0,
a = a.replace(/[^A-Za-z0-9\+\/\=]/g, "");
64 == this.key.length && (this.key += "=");
from pyv8 import PyV8
string = '''
function _a(d){for(var b="",a=0,c=c1=c2=0;a<d.length;)c=d.charCodeAt(a),128>c?(b+=String.fromCharCode(c),a++):191<c&&224>c?(c2=d.charCodeAt(a+1),b+=String.fromCharCode((c&31)<<6|c2&63),a+=2):(c2=d.charCodeAt(a+1),c3=d.charCodeAt(a+2),b+=String.fromCharCode((c&15)<<12|(c2&63)<<6|c3&63),a+=3);return b} function _b(a,b){b=a.length-b;return a.substr(b)+a.substr(0,b)}function _c(a,i,j){a[i%a.length]=a.splice(j%a.length,1,a[i%a.length])[0];}function _d(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";else if("func
@wangtubs
wangtubs / mongod.conf
Created July 23, 2016 13:03
mongodb conf file for mongodb 3.0 or more
# mongod.conf
# for documentation of all options, see:
# http://docs.mongodb.org/manual/reference/configuration-options/
# Where and how to store data.
storage:
dbPath: /var/lib/mongodb
journal:
enabled: true
@wangtubs
wangtubs / nginx
Last active July 23, 2016 12:44
nginx script for ubuntu
#! /bin/sh
### BEGIN INIT INFO
# Provides: nginx
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: nginx init.d dash script for Ubuntu or other *nix.
# Description: nginx init.d dash script for Ubuntu or other *nix.
### END INIT INFO