This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt-get install bootlogd | |
sed $'s/\^\[/\E/g;s/\[1G\[/\[27G\[/' /var/log/boot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80 default; | |
server_name stats.example.com; | |
return 301 https://stats.example.com$request_uri; | |
} | |
upstream php-fpm { | |
server unix:/var/run/php5-fpm.sock; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go/install)" | |
brew install mysql nginx mongodb redis rabbitmq | |
brew install php55 --with-fpm --with-imap --with-homebrew-openssl php55-imagick php55-mongo php55-pcntl php55-pspell php55-redis php55-xdebug php55-apcu | |
sudo chown root /usr/local/opt/nginx/homebrew.mxcl.nginx.plist | |
sudo gem install --no-ri --no-rdoc capistrano -v 2.15.5 | |
PHP: | |
php-fpm.conf (display-errors) | |
/usr/local/etc/php/5.5/conf.d/99-custom.ini: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/etc/php5/fpm/php-fpm.conf | |
error_log = syslog | |
syslog.ident = php-fpm | |
This will log to syslog PHP-FPM stuff that usually gets logged to /var/log/php5-fpm.log and is not that interesting: | |
... php-fpm[3537]: [NOTICE] fpm is running, pid 3537 | |
... php-fpm[3537]: [NOTICE] ready to handle connections | |
... php-fpm[3537]: [NOTICE] Finishing ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat exmaple.com.crt COMODORSADomainValidationSecureServerCA.crt COMODORSAAddTrustCA.crt > example.com.crt | |
If some browsers are complaining add "AddTrustExternalCARoot.crt" to the chain: | |
cat exmaple.com.crt COMODORSADomainValidationSecureServerCA.crt COMODORSAAddTrustCA.crt AddTrustExternalCARoot.crt > example.com.crt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# apt-get install libjpeg-dev libpng-dev | |
# apt-get install tesseract-ocr libtesseract3 | |
# apt-get install python-pip python-dev | |
# Or install pip with wget https://bootstrap.pypa.io/get-pip.py -> python get-pip.py | |
# /usr/local/bin/pip install pillow | |
# Download and unpack https://code.google.com/p/pytesser/ | |
# edit pytesser.py and change "import Image" to "from PIL import Image" | |
from PIL import Image | |
from PIL import ImageEnhance |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo sysctl -w net.inet.tcp.msl=1000 | |
Default value is 15000 (15s) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt-get purge perl python python2.7 python2.7-minimal python-apt python-apt-common python-chardet python-debian python-debianbts python-fpconst python-minimal python-reportbug python-soappy python-support python-xapian exim4 exim4-base exim4-config exim4-daemon-light tasksel tasksel-data busybox anacron dnsutils w3m consolekit geoip-database ftp fuse curl accountsservice acl avahi-daemon ispell iamerican ibritish ienglish-common isc-dhcp-client isc-dhcp-common netcat netcat-traditional ntpdate os-prober parted rsync curl task-english tcpdump tcpd dbus dc console-common console-data console-setup console-setup-linux mlocate wamerican install-info installation-report bc binutils debian-faq doc-debian dosfstools ed eject hdparm heirloom-mailx xauth usbutils aptitude aptitude-common libboost-iostreams1.49.0 libept1.4.12 libsigc++-2.0-0c2a libsqlite3-0 libxapian22 debconf-i18n libtext-iconv-perl wget whois xz-utils time unzip texinfo arping gettext gettext-base manpages man-db | |
apt-get autoremove | |
dpkg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Ovo mora biti izvan server bloka | |
upstream memcached_backend { | |
server 127.0.0.1:11211; | |
keepalive 50; | |
} | |
# unutar server bloka | |
location /widget/ { | |
.... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brew install gource | |
brew install ffmpeg |