Tuesday, December 17, 2013

autologin wp

/** Loads the WordPress Environment and Template */
require('./wp-blog-header.php');
$creds = array();
$creds['user_login'] = 'admin';
$creds['user_password'] = 'passwordente';
$creds['remember'] = true;
$user = wp_signon( $creds, false );
header('Location: http://domainente.com/wp-admin');

Wednesday, November 27, 2013

list fungsi excel

=RANDBETWEEN(DATE(bottomdate),DATE(topdate)
http://www.techrepublic.com/blog/microsoft-office/generate-random-dates-within-a-specific-date-range/
=INDEX($A:$A,RANDBETWEEN(1,COUNTA($A:$A)),1)
http://www.ozgrid.com/Excel/excel-random-pick.htm
fake name generator
http://dailydoseofexcel.com/archives/2006/07/13/random-name-generator/

Saturday, June 22, 2013

rupa-rupa

UPDATE wp_posts SET post_content = replace(tablefield, "datjong24th.com", "24thphoto.com");

du -sk * | sort -n | while read size fname; do for unit in k M G T P E Z Y; do if [ $size -lt 1024 ]; then echo -e "${size}${unit}\t${fname}"; break; fi; size=$((size/1024)); done; done

du -sk .[!.]* * | sort -n | while read size fname; do for unit in k M G T P E Z Y; do if [ $size -lt 1024 ]; then echo -e "${size}${unit}\t${fname}"; break; fi; size=$((size/1024)); done; done

 find /home/ -type f -iname "*.php" -print0 | xargs -0 sha512sum | grep -f /home/bidikdata/analisa-vrs/sidik.data

find -type f -mtime -30 | more

find /home/ -type f -newermt 2013-05-20 ! -newermt 2013-05-25 -iname "*.php" | more


Thursday, June 13, 2013

quota at amazon

http://askubuntu.com/questions/109585/quota-format-not-supported-in-kernel

Sunday, March 31, 2013

macport startup install

###########################################################
# A startup item has been generated that will aid in
# starting logwatch with launchd. It is disabled
# by default. Execute the following command to start it,
# and to cause it to launch at startup:
#
# sudo launchctl load -w /Library/LaunchDaemons/org.macports.logwatch.plist
###########################################################

Tuesday, March 26, 2013

Simple Search Engine

http://pctechtips.org/a-simple-php-search-engine-tutorial/
http://onlamp.com/pub/a/php/2002/10/24/simplesearchengine.html?page=3

xss and sql injection prevention

//filtering input for xss and sql injection
$input = strip_tags( $input );
$input = mysql_real_escape_string( $input );
$input = trim( $input );

Wednesday, March 06, 2013

Massal optimizing databases

mysqlcheck -u root -p --auto-repair --check --optimize --all-databases

Friday, January 25, 2013

serba serbi perintah find

touch -t "20121120" /tmp/start
touch --date "2012-12-15" /tmp/end
find -type f -newer /tmp/start -not -newer /tmp/end