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 update | |
apt-get -y install libxml2-dev libssl-dev pkg-config libbz2-dev libcurl4-openssl-dev libpng-dev libjpeg-dev libfreetype6-dev libgmp-dev libc-client-dev libicu-dev libmcrypt-dev freetds-dev libmysqlclient-dev libpq-dev libxslt-dev apache2-suexec-custom | |
ln -s /usr/lib/x86_64-linux-gnu/libsybdb.so.5 /usr/lib/libsybdb.so.5 | |
ln -s /usr/lib/x86_64-linux-gnu/libsybdb.so /usr/lib/libsybdb.so | |
cd php-5.X.XX | |
./configure --with-freetype-dir=/usr/lib --prefix=/usr/local/php-5.X.XX --with-mysql --with-mysqli --with-mssql --enable-exif --enable-soap --with-mcrypt --with-mhash --with-curl --enable-mbstring --with-gettext --with-zlib --enable-ftp --with-openssl --with-xsl --with-pgsql --enable-calendar --enable-bcmath --with-bz2 --with-imap --with-imap-ssl --with-pdo-mysql --with-jpeg-dir --with-png-dir --with-gd --enable-zip --with-xmlrpc --enable-sockets --enable-intl --with-gmp |
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
Today, after working with Windows for over 15 years now, I finally came across the solution to the | |
dreadfull BSOD STOP 0x0000007B after replacing the motherboard of a computer, or after moving the | |
harddrive to another computer, or after doing a P2V, or after ... you get the point. | |
Requirements: | |
- Windows install / boot CD | |
- Chipset / Mobo / Storage drivers of the new motherboard or storage controller | |
Steps: | |
- extract all the drivers to a USB thumb drive |
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
# Vagrantfile - update to use the shell provision module to run a bootstrap script | |
config.vm.provision :shell, :path => "bootstrap.sh" | |
# bootstrap.sh | |
#!/usr/bin/env bash | |
# | |
# Bootstrap the vagrant VM by installing Ansible and | |
# letting ansible do the provisioning in local connection mode | |
# |
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 launchctl unload -w /System/Library/LaunchDaemons/com.apple.smbd.plist | |
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.smbd.plist | |
sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server.plist EnabledServices -array disk |
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
#!/bin/bash | |
# Get current swap usage for all running processes | |
SUM=0 | |
OVERALL=0 | |
for DIR in `find /proc/ -maxdepth 1 -type d | egrep "^/proc/[0-9]"` ; do | |
PID=`echo $DIR | cut -d / -f 3` | |
PROGNAME=`ps -p $PID -o comm --no-headers` | |
for SWAP in `grep Swap $DIR/smaps 2>/dev/null| awk '{ print $2 }'` | |
do | |
let SUM=$SUM+$SWAP |
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
diagnose debug reset | |
diagnose debug enable | |
diagnose debug flow show console enable | |
diagnose debug flow filter add <IP-ADDRESS-TO-FILTER> | |
diagnose debug flow trace start <NUMBER-OF-PACKETS> |
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
for KEY in ABCDEFGHIJKLMN | |
do | |
gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv $KEY | |
gpg --export --armor $KEY | apt-key add - | |
done | |
# oneliner | |
for KEY in ABCDEFGHIJKLMN; do gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv $KEY; gpg --export --armor $KEY | apt-key add -; done |
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
sub vcl_recv { | |
... | |
if (req.http.Accept-Encoding) { | |
if (req.url ~ "\.(jpeg|jpg|png|gif|gz|tgz|bz2|tbz|mp3|ogg|swf|flv)$") { | |
unset req.http.Accept-Encoding; | |
} elsif (req.http.Accept-Encoding ~ "gzip") { | |
set req.http.Accept-Encoding = "gzip"; | |
} elsif (req.http.Accept-Encoding ~ "deflate" && | |
req.http.user-agent !~ "MSIE") { | |
set req.http.Accept-Encoding = "deflate"; |
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
# in case of VM and live update of harddisk size, first rescan scsi bus to refect changes | |
for DEV in `ls -1 /sys/class/scsi_device/`; do echo 1 > /sys/class/scsi_device/$DEV/device/rescan; done | |
# resize partitions, assumes /dev/sda2 is extended and /dev/sda5 is logical in /dev/sda2 | |
parted /dev/sda | |
> resizepart 2 -1s | |
> resizepart 5 -1s | |
> q | |
# rescan partion table |
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
# this requires that MySQL is accessed through TCP/IP, not the unix socket. | |
# run tcpdump for 30 seconds capturing traffic on port 3306 | |
timeout 30 tcpdump -s 65535 -x -nn -q -tttt -i any port 3306 > mysql.tcp.txt | |
# run pt-query-digest on collected file | |
pt-query-digest --type tcpdump mysql.tcp.txt >pt.out |
OlderNewer