Glossary:
- md: multiple devices
command | description |
---|---|
cat /proc/mdstat |
show status of all raids |
mdadm --detail /dev/md0 |
detailed status of raid md0 |
resolver 8.8.8.8; | |
location /video/ { | |
if ($request_uri ~ "^/video/(.+?)/.+") { | |
set $upstream_host $1.googlevideo.com; | |
add_header Content-Disposition "attachment; filename=video.mp4;"; | |
} | |
rewrite /video/.+?/(.+)$ /$1 break; | |
proxy_buffering off; | |
proxy_pass https://$upstream_host; | |
proxy_set_header Host $upstream_host; |
#To create a classic TCP listening daemon, similar to netcat -l, use a variation of the following command. | |
socat TCP-LISTEN:8080 stdout | |
#use remotly a command shell | |
socat TCP4-LISTEN:1234,reuseaddr,fork 'SYSTEM:/bin/cat /home/infos.txt' | |
#sslify a server | |
socat OPENSSL-LISTEN:443,reuse‐addr,pf=ip4,fork,cert=server.pem,cafile=client.crt TCP4-CONNECT:localhost:80 | |
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.
/* | |
* Copyright (C) 2006, 2008 Valery Kholodkov | |
* Client body reception code Copyright (c) 2002-2007 Igor Sysoev | |
* Temporary file name generation code Copyright (c) 2002-2007 Igor Sysoev | |
*/ | |
#include <ngx_config.h> | |
#include <ngx_core.h> | |
#include <ngx_http.h> | |
#include <nginx.h> |
ffmpeg -y -i v1.wmv -r 30000/1001 -aspect 16:9 -b:v 1150k -bt 2300k -vcodec libx264 -pass 2 -threads 2 -ss 00:02:18 -t 30 -acodec libfaac -ac 2 -ar 44100 -ab 128k -profile:v main -tune fastdecode v.mp4 | |
-vcodec libx264 -crf 20 -threads 2 -r 24000/1001 -acodec libmp3lame -ac 2 -ar 44100 -ab 128k -y -s 800:450 -aspect 16:9 kyou01.avi | |
-vcodec libx264 -crf 20 -threads 2 -r 24000/1001 -y -aspect 16:9 -s 800:450 -profile:v high -tune psnr -acodec libfaac -ac 2 -ar 48000 -ab 128k | |
-vcodec libx264 -crf 20 -threads 2 -r 24000/1001 -y -aspect 16:9 -s 960:540 -profile:v high -tune fastdecode -acodec libfaac -ac 2 -ar 48000 -ab 128k | |
-c:v libx264 -crf 21 -profile:v main -threads 2 -r 24000/1001 -c:a libmp3lame -ac 2 -ar 44100 -ab 128k -y -s 720:540 -aspect 4:3 |
<?php | |
/* | |
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP) | |
Author: _ck_ (with contributions by GK, stasilok) | |
Version: 0.1.7 | |
Free for any kind of use or modification, I am not responsible for anything, please share your improvements | |
* revision history | |
0.1.7 2015-09-01 regex fix for PHP7 phpinfo | |
0.1.6 2013-04-12 moved meta to footer so graphs can be higher and reduce clutter |
<?php | |
# Nginx don't have PATH_INFO | |
if (!isset($_SERVER['PATH_INFO'])) { | |
$_SERVER['PATH_INFO'] = substr($_SERVER["ORIG_SCRIPT_FILENAME"], strlen($_SERVER["SCRIPT_FILENAME"])); | |
} | |
$request = substr($_SERVER['PATH_INFO'], 1); | |
$file = $request; | |
$fp = @fopen($file, 'rb'); |
ffprobe -v quiet -print_format json -show_format -show_streams "lolwut.mp4" > "lolwut.mp4.json" |
# -- coding: utf-8 -- | |
from win32api import * | |
from win32gui import * | |
import win32con | |
import sys, os | |
import struct | |
import time | |
class WindowsBalloonTip: |