h - Move left
j - Move down
k - Move up
l - Move right
$ - Move to end of line
0 - Move to beginning of line (including whitespace)
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
Param( | |
[Parameter(Mandatory = $true, | |
HelpMessage="ResourceGroup name of the vm")] | |
[ValidateNotNullOrEmpty()] | |
[string]$rgName, | |
[Parameter(Mandatory = $true, | |
HelpMessage="VM name")] | |
[ValidateNotNullOrEmpty()] | |
[string]$vmName, |
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
After installing it http://sourceforge.net/projects/meld-installer/ | |
I had to tell git where it was: | |
git config --global merge.tool meld | |
git config --global diff.tool meld | |
git config --global mergetool.meld.path “C:\Program Files (x86)\Meld\meld\meld.exe” | |
And that seems to work. Both merging and diffing with “git difftool” or “git mergetool” |
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
## Slow requests grouped by function call | |
cat /var/log/php-fpm/www-slow.log | grep -A 1 script_filename | \ | |
grep -v script_filename | grep -v -e "--" | cut -c 22- | sort | uniq -c | sort -nr | |
## Slow requests grouped by minute | |
cat /var/log/php-fpm/www-slow.log | grep 'pool www' | \ | |
cut -d' ' -f2 | sort | cut -d: -f1,2 | uniq -c | |
## Top 25 1 minute groups of slow requests | |
cat /var/log/php-fpm/www-slow.log | grep 'pool www' | cut -d' ' -f2 | \ |
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
#301 Redirects for .htaccess | |
#Redirect a single page: | |
Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
#Redirect an entire site: | |
Redirect 301 / http://www.domain.com/ | |
#Redirect an entire site to a sub folder | |
Redirect 301 / http://www.domain.com/subfolder/ |
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/sh | |
# Config stuff | |
UPLOAD_HOST="upload.ns.bytemark.co.uk"; | |
UPLOAD_USERNAME=""; | |
UPLOAD_PASSWORD=""; | |
# This stuff is required | |
cd `dirname $0`; | |
export RSYNC_PASSWORD=$UPLOAD_PASSWORD; |
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/sh | |
# Just copy and paste the lines below (all at once, it won't work line by line!) | |
# MAKE SURE YOU ARE HAPPY WITH WHAT IT DOES FIRST! THERE IS NO WARRANTY! | |
function abort { | |
echo "$1" | |
exit 1 | |
} | |
set -e |
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
--[[ | |
Copyright (C) 2007 MySQL AB | |
This program is free software; you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by | |
the Free Software Foundation; version 2 of the License. | |
This program is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
Version 3, 29 June 2007
Copyright © 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
NewerOlder