The initial source comes from sdcuike/issueBlog#4
https://github.com/PacktPublishing free to download books code by Packet
https://github.com/EbookFoundation/free-programming-books Very immense
https://github.com/PacktPublishing free to download books code by Packet
https://github.com/EbookFoundation/free-programming-books Very immense
image: ruby:2.4 | |
stages: | |
- deploy | |
deploy_staging: | |
environment: staging | |
stage: deploy | |
script: | |
- which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y ) | |
- eval $(ssh-agent -s) |
user web; | |
# One worker process per CPU core. | |
worker_processes 8; | |
# Also set | |
# /etc/security/limits.conf | |
# web soft nofile 65535 | |
# web hard nofile 65535 | |
# /etc/default/nginx |
# Install software-properties-common package to give us add-apt-repository package | |
sudo apt-get install -y software-properties-common | |
# Install latest nginx version from community maintained ppa | |
sudo add-apt-repository ppa:nginx/stable | |
# Update packages after adding ppa | |
sudo apt-get update | |
# Install nginx |
For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.
Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon
with HyperThreading enabled, but it can work without problem on slower machines.
You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.
# | |
# Simple docker-compose file for Gitlab CE and a Jenkins master. | |
# This is for testing and builds are done on the jenkins master. | |
# | |
version: "2" | |
services: | |
gitlab: | |
image: "gitlab/gitlab-ce:8.15.2-ce.0" |
#!/usr/bin/env python | |
import socket | |
import select | |
import threading | |
HOST = '' | |
PORT = 50007 | |
# use https or socks5 and use the same protocol on pc | |
PROXYHOST = 'your proxy server' | |
PROXYPORT = 8080 |
<?php | |
// enable divi functions | |
add_action( 'wp_enqueue_scripts', 'my_enqueue_assets' ); | |
function my_enqueue_assets() { | |
wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' ); | |
} | |
//add 1440px image size | |
add_image_size('image_1440', 1440, 9999, false); |
<?php | |
/* | |
* Get the Blog ID of the main site in a multisite network. | |
* | |
* @return int The blog_id of the main site. | |
*/ | |
function km_get_main_site_blog_id() { | |
return get_network()->site_id; | |
} |