Skip to content

Instantly share code, notes, and snippets.

@waveiron
waveiron / network-tweak.md
Created January 28, 2022 04:55 — forked from mustafaturan/network-tweak.md
Linux Network Tweak for 2 million web socket connections

Sample config for 2 million web socket connection

    sysctl -w fs.file-max=12000500
    sysctl -w fs.nr_open=20000500
    # Set the maximum number of open file descriptors
    ulimit -n 20000000

    # Set the memory size for TCP with minimum, default and maximum thresholds 
 sysctl -w net.ipv4.tcp_mem='10000000 10000000 10000000'
This file has been truncated, but you can view the full file.
_fox@sina.com
_ldw_@163.com
_moller_@163.com
_simmy_@163.com
_slj@163.com
_zhou_jun_@163.com
0.aidejiushini@163.com
0.zhengzhong.0@163.com
0_ooooo@163.com
00-00@live.cn
@waveiron
waveiron / centos-install-phantomjs-and-casperjs
Last active December 9, 2017 03:59 — forked from florinel-chis/centos-install-casperjs
install casperjs on centos (x64)
wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2
bunzip2 phantomjs-2.1.1-linux-x86_64.tar.bz2
tar xf phantomjs-2.1.1-linux-x86_64.tar
mv phantomjs-2.1.1-linux-x86_64/ /opt/
ln -s /opt/phantomjs-2.1.1-linux-x86_64/ /opt/phantomjs
ln -s /opt/phantomjs/bin/phantomjs /usr/local/bin/
#check what you've just done
which phantomjs
phantomjs --version
@waveiron
waveiron / install.sh
Created July 2, 2016 14:42
CentOS LAMP + 5.5, Laravel and Composer install script.
echo ">>> Starting install script"
sudo yum -y update
echo ">>> Installing Apache, MySQL and PHP"
sudo rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm
sudo yum install -y nano git-core httpd php55w php55w-common php55w-mysql php55w-mcrypt php55w-gd
sudo yum install -y yum-plugin-replace
sudo yum replace -y mysql-libs --replace-with mysql55w-libs
sudo yum install -y mysql55w mysql55w-server
ExpLd
-----
A [Pen](http://codepen.io/waveiron/pen/ExpLd) by [hailang](http://codepen.io/waveiron) on [CodePen](http://codepen.io/).
[License](http://codepen.io/waveiron/pen/ExpLd/license).
/*
* Author: http://stuffandnonsense.co.uk/blog/about/hardboiled_css3_media_queries/
*/
/* Smartphones (portrait and landscape) ----------- */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px) {
/* Styles */
}