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
server { | |
listen 80; | |
server_name mysite.com; | |
root /var/www/mysite.com/; | |
location / { | |
if (-f $document_root/maintenance.html) { | |
return 503; | |
} | |
... # the rest of your config goes here |
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
package com.elm.mb.rest.filters; | |
import java.io.IOException; | |
import javax.servlet.FilterChain; | |
import javax.servlet.ServletException; | |
import javax.servlet.http.HttpServletRequest; | |
import javax.servlet.http.HttpServletResponse; | |
import org.apache.commons.logging.Log; |
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
server { | |
listen 80; | |
server_name yourdomain.com www.yourdomain.com; | |
location ~ ^/.well-known { | |
root /var/www/ghost; | |
} | |
location / { | |
return 301 https://$server_name$request_uri; |
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
#init | |
git init | |
# disable ssl verification | |
git config http.sslVerify false | |
# set proxy | |
git config http.proxy http://192.168.15.70:8899 | |
# init repo |
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 | |
set /p path=path: | |
set /p user=user: | |
rem 我们需要修改文件或目录的所有者 | |
takeown /F %path% /R | |
rem 给用户授权文件夹或文件的完全控制权限 |
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
# Download binary files | |
https://github.com/PowerShell/Win32-OpenSSH/releases | |
# Run from cmd.exe (administrator) | |
`powershell.exe -ExecutionPolicy Bypass -File install-sshd.ps1` | |
# Open 22 port (run under Powershell) | |
`New-NetFirewallRule -Name sshd -DisplayName 'OpenSSH SSH Server' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22` | |
# Start service from Services. |
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
# command # ip range # gateway | |
sudo route -n add 172.18.0.0/23 192.168.10.1 | |
sudo route -n delete 172.18.0.0/23 192.168.10.1 | |
# review | |
netstat -nr |
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
sudo apt-get update | |
sudo apt-get install mysql-server |
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
sudo add-apt-repository ppa:webupd8team/java | |
sudo apt-get update | |
sudo apt-get install oracle-java8-installer | |
or | |
sudo apt-get install oracle-java9-installer | |
# Manage Java | |
sudo update-alternatives --config java | |
> There can be multiple Java installations on one server. You can configure which version is the default for use in the command line by using update-alternatives |
OlderNewer