This file contains hidden or 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
root@app:/var/tmp# /usr/bin/time -v cat www1/error.log www1/error.log.1 www2/error.log www2/error.log.1 | sed -r -n 's/^\[(\w)\w+ (\w+ \w+).+/\2 \1/p' | awk '{count[$1]++}END{for(j in count) print j" "count[j]}' FS=: | sort; | |
Command being timed: "cat www1/error.log www1/error.log.1 www2/error.log www2/error.log.1" | |
User time (seconds): 0.37 | |
System time (seconds): 19.54 | |
Percent of CPU this job got: 3% | |
Elapsed (wall clock) time (h:mm:ss or m:ss): 8:55.67 | |
Average shared text size (kbytes): 0 | |
Average unshared data size (kbytes): 0 | |
Average stack size (kbytes): 0 | |
Average total size (kbytes): 0 |
This file contains hidden or 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
root@app:~# date; | |
Thu Oct 24 22:59:57 CDT 2013 | |
root@app:~# cd /var/log/apache2; mkdir combined_error_logs; | |
root@app:/var/log/apache2# rsync -a -e ssh root@www1:/var/log/apache2/error* combined_error_logs/www1;You have new mail in /var/mail/root | |
root@app:/var/log/apache2# rsync -a -e ssh root@www2:/var/log/apache2/error* combined_error_logs/www2;You have new mail in /var/mail/root | |
root@app:/var/log/apache2# date; | |
Thu Oct 24 23:02:03 CDT 2013 | |
root@app:/var/log/apache2# cd combined_error_logs/www1; gunzip *.gz; cd ../..; | |
root@app:/var/log/apache2# cd combined_error_logs/www2; gunzip *.gz; cd ../..; | |
root@app:/var/log/apache2# date; |
This file contains hidden or 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
Trying to do this within Coda 2 -> Preferences -> Editor -> Custom Syntax Modes worked on one computer but gave me an error on another. So for that computer, I did this: | |
Used https://github.com/zenangst/Coda-2-Modes: | |
cd ~/Library/Application\ Support/Coda\ 2 | |
mv Modes Modes.bak | |
git clone [email protected]:zenangst/Coda-2-Modes.git Modes | |
sed -i -e 's/<extension>xml<\/extension>/<extension>xml<\/extension><extension>mtml<\/extension>/' Modes/XML.mode/Contents/Resources/ModeSettings.xml |
This file contains hidden or 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
Katakana Codes | |
ァアィイゥウェエォオカガキギクグケゲコゴサザシジスズセゼソゾタダチヂッツヅテデトドナニヌネノハバパヒビピフブプヘベペホボポマミムメモャヤュユョヨラリルレロヮワヰヱヲンヴヵヶヷヸヹヺ・ | |
Punctuation and Symbols | |
゛゜ーヽヾ | |
Phonetic Extensions for Ainu | |
ㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ | |
Circle Forms |
This file contains hidden or 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
<?php | |
// 2013-10-16 [email protected]: initial commit | |
/** | |
* Return Google Core Reporting API access token | |
* @return string|bool access token or false if embedded parameters invalid | |
*/ | |
function getAccessToken() | |
{ |
This file contains hidden or 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
<mt:Ignore>this is password protected by the accompanying .htaccess and .htpw files</mt:Ignore> | |
<mt:Section regex_replace="/\n\s*\n/mg","\n"> | |
<$mt:Include module="timing" part="start"$> | |
<mt:Ignore>Number of years to show</mt:Ignore> | |
<$mt:Var name="total_years" value="2"> | |
<mt:Ignore>Store values for past $total_years years to test entry dates against. Will result in something like: Y0=2013; Y1=2012; Y2=2011</mt:Ignore> | |
<$mt:Date format="%Y" setvar="now_year"$> | |
<mt:For from="1" to="$total_years"> |
This file contains hidden or 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
<?php | |
/* | |
This script looks up items most viewed according to Google Analytics in a given time span and given certain blog or entry restrictions, returning either a listing for debugging or JSON data for further processing. | |
The possible parameters are: | |
* days int Number of days of history to pull results from. Default is 7. | |
* entry_id int Entry IDs (from Movable Type) of entries that should NOT be included in results, such as to prevent the currently viewed story from showing up in a "Read Next" sidebar. Multiple IDs can be provided by supplying multiple instances of this parameter, i.e. entry_id=300&entry_id=301 |
This file contains hidden or 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
CURRENT_VERSION=`find /var/solr/data/wordpress/conf -type f -printf '%T@ %p\n' | sort -n | tail -1 | cut -f1 -d"."` | |
REPO_VERSION=`find /root/configs/var/solr/data/wordpress/conf -type f -printf '%T@ %p\n' | sort -n | tail -1 | cut -f1 -d"."` | |
if [ "$CURRENT_VERSION" -lt "$REPO_VERSION" ] | |
then | |
cp -a /root/configs/var/solr/data/wordpress/conf /var/solr/data/wordpress | |
service solr restart | |
fi |
This file contains hidden or 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
#!/usr/bin/perl | |
use DateTime; | |
use File::Path; | |
use DBI; | |
use File::Basename; | |
require File::Spec->catfile(dirname(__FILE__),'nearme-dump.cnf'); | |
my $root = '/mnt/nfs/bak/nearme'; | |
my $time = DateTime->now()->ymd(); |
This file contains hidden or 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
hostname= | |
username= | |
database= | |
password= | |
cd /var/www/html/wp-content/uploads | |
export MYSQL_PWD=$password | |
MYSQL_CONN="mysql -B -h$hostname -u$username $database --disable-column-names" |