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 | |
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin | |
export PATH | |
cur_dir=$(pwd) | |
#set up email | |
email="root@localhost.com" | |
echo "Please input email:" | |
printf "(Default email: root@localhost.com):" | |
read email | |
echo "" |
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 | |
#Add virtual host | |
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin | |
export PATH | |
# Check if user is root | |
if [ $(id -u) != "0" ]; then | |
printf "Error: You must be root to run this script!\n" | |
exit 1 | |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<title>LLNMP一键安装包 by vpssh.org</title> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<meta name="author" content="zhumaohai"> | |
<meta name="keywords" content="LLNMP,LLNMP一键安装包,一键安装包"> | |
<meta name="description" content="您已成功安装lLNMP一键安装包!"> | |
<style type="text/css"> | |
<!-- |
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/sh | |
# | |
# nginx – this script starts and stops the nginx daemon | |
# | |
# chkconfig: - 85 15 | |
# description: Nginx is an HTTP(S) server, HTTP(S) reverse \ | |
# proxy and IMAP/POP3 proxy server | |
# processname: nginx | |
# config: /opt/nginx/conf/nginx.conf | |
# pidfile: /opt/nginx/logs/nginx.pid |
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
user www www; | |
worker_processes 1; | |
error_log /usr/local/nginx/logs/nginx_error.log crit; | |
pid /usr/local/nginx/nginx.pid; | |
#Specifies the value for maximum file descriptors that can be opened by this process. | |
worker_rlimit_nofile 1024; | |
events | |
{ | |
use epoll; | |
worker_connections 1024; |
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
<?php | |
/* ----------------modified from Yahei--------------------- */ | |
error_reporting(0); //抑制所有错误信息 | |
@header("content-Type: text/html; charset=utf-8"); //语言强制 | |
ob_start(); | |
$title = "PHP探针"; | |
$version = "v0.4.0"; //版本号 |
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
<?php | |
phpinfo(); | |
?> |
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
proxy_redirect off; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
client_max_body_size 50m; | |
client_body_buffer_size 256k; | |
proxy_connect_timeout 30; | |
proxy_send_timeout 30; | |
proxy_read_timeout 60; |
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
// Params | |
// 1. {} add a query in here if you don't want to select all records (unlikely) | |
// 2. $rename one or more fields by setting the keys of the object to the old field name and their values to the new field name. | |
// 3. Set multi to true to force it to operate on all documents otherwise it will only operate on the first document that matches the query. | |
// | |
// Run this in the MongoDB shell. | |
db.<collectionName>.update( {}, { $rename: { '<oldName1>': '<newName1>', '<oldName2>': '<newName2>' } }, {multi: true} ) |
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
var path = require('path'); | |
var express = require('express'); | |
var nunjucks = require('nunjucks'); | |
var app = express(); | |
var ytdl = require("youtube-dl"); | |
var request = require("request"); | |
var utils = require('utility'); | |
// view engine setup | |
nunjucks.configure('views', { |