Look at LSB init scripts for more information.
Copy to /etc/init.d
:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
function http(method, url, request) { | |
let init = { method: 'GET' } | |
if(method != 'GET') { | |
init.body = request.body | |
} | |
return fetch(url, init). | |
then(function(response){ | |
if(response.ok){ | |
response.json().then(function(json){ |
From https://nodejs.org/api/modules.html | |
require(X) from module at path Y | |
1. If X is a core module, | |
a. return the core module | |
b. STOP | |
2. If X begins with './' or '/' or '../' | |
a. LOAD_AS_FILE(Y + X) | |
b. LOAD_AS_DIRECTORY(Y + X) | |
3. LOAD_NODE_MODULES(X, dirname(Y)) |
Look at LSB init scripts for more information.
Copy to /etc/init.d
:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
kill $(ps aux | grep '[p]ython csp_build.py' | awk '{print $2}') |
require 'digest/sha1' | |
require 'base64' | |
# client request | |
# GET / HTTP/1.1 | |
# Upgrade: websocket | |
# Connection: Upgrade | |
# Host: example.com | |
# Origin: null | |
# Sec-WebSocket-Key: sN9cRrP/n9NdMgdcy2VJFQ== |
zh-CN: | |
admin: | |
home: | |
name: "首页" | |
pagination: | |
previous: "« 上一页" | |
next: "下一页 »" | |
truncate: "…" | |
misc: | |
filter_date_format: "mm/dd/yy" # a combination of 'dd', 'mm' and 'yy' with any delimiter. No other interpolation will be done! |
error_page 400 404 405 =200 @40*_json; | |
location @40*_json { | |
default_type application/json; | |
return 200 '{"code":"1", "message": "Not Found"}'; | |
} | |
error_page 500 502 503 504 =200 @50*_json; | |
location @50*_json { |
class A{ | |
public B b; | |
} | |
class B{ | |
public A a; | |
} | |
public class Main{ | |
public static void main(String[] args){ | |
A a = new A(); |
<?php | |
/* | |
*--------------------------------------------------------------- | |
* APPLICATION ENVIRONMENT | |
*--------------------------------------------------------------- | |
* | |
* You can load different configurations depending on your | |
* current environment. Setting the environment also influences | |
* things like logging and error reporting. |
# 查看网络端口占用情况 | |
netstat -an | grep 9000 | |
# 通过list open file命令可以查看到当前打开文件,在linux中所有事物都是以文件形式存在,包括网络连接及硬件设备。 | |
lsof -i:9000 | |
# 查看php.ini文件的位置 | |
php --ini |