Skip to content

Instantly share code, notes, and snippets.

Enable macOS Server Performance Mode

Performance mode changes the system parameters of your Mac. These changes take better advantage of your hardware for demanding server applications.

A Mac with macOS Server that needs to run high-performance services can turn on performance mode to dedicate additional system resources for server applications. Note, however, that performance mode can be enabled even without macOS Server being installed to achieve similar benifits for other high-performance services.

sudo nvram boot-args="serverperfmode=1 $(nvram boot-args 2>/dev/null | cut -f 2-)"
sudo reboot

Reference: https://support.apple.com/en-us/HT202528.

{
"server":"0.0.0.0",
"server_port":8388,
"local_address": "127.0.0.1",
"local_port":1080,
"password":"fuckgfw",
"timeout":300,
"method":"aes-256-cfb",
"fast_open": true
}
@fyunli
fyunli / nginx_deployment.yaml
Created May 22, 2019 09:45 — forked from petitviolet/nginx_deployment.yaml
sample Nginx configuration on Kubernetes using ConfigMap to configure nginx.
apiVersion: v1
kind: ConfigMap
metadata:
name: nginx-conf
data:
nginx.conf: |
user nginx;
worker_processes 3;
error_log /var/log/nginx/error.log;
events {
修改vue.config.js中的baseUrl为'./'
module.exports = {
baseUrl: './'
};
然后执行npm run build
What is expected?
所有URL都应以“./”开头,成为相对路径,以便适配混合app开发。
建议一:
@fyunli
fyunli / git
Created October 15, 2018 05:44
git pull origin master
git pull origin bonus:bonus
@fyunli
fyunli / box-shadow.html
Created August 25, 2018 06:41 — forked from ocean90/box-shadow.html
CSS3 Box Shadow, only top/right/bottom/left and all
<!DOCTYPE html>
<html>
<head>
<title>Box Shadow</title>
<style>
.box {
height: 150px;
width: 300px;
margin: 20px;
VBoxManage controlvm win10 setvideomodehint 1440 900 32
@fyunli
fyunli / springboot-hibernate-json-lazyload
Created December 8, 2017 06:50
SpringBoot+jpa+hibernate返回json数据实现按需加载数据
- import jar
```
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-hibernate5</artifactId>
<version>2.9.0.pr4</version>
</dependency>
```
@Grab(group='com.fasterxml.jackson.core', module='jackson-databind', version='2.3.3')
import com.fasterxml.jackson.databind.JsonNode
import com.fasterxml.jackson.databind.ObjectMapper
import com.fasterxml.jackson.databind.node.ArrayNode
import com.fasterxml.jackson.databind.node.ObjectNode
import com.fasterxml.jackson.databind.node.ValueNode
import org.pentaho.di.core.row.*
import org.pentaho.di.core.row.value.*
@fyunli
fyunli / jquery easyui 1.3.2 form _load sub object
Last active December 14, 2015 21:09
let jquery easyui form load sub object data
function _load(data){
var form = $(target);
for(var name in data){
var val = data[name];
/**
* added by fyunli for load sub object data in json
*/
if(typeof val == 'object' && val != null){
try{
for(var subname in val){