Thursday, July 30, 2015

install solaris openstack on virtualbox

Jadi begini.. ternyata gak support
setelah lihat di web:
http://docs.oracle.com/cd/E36784_01/html/E37629/gnwoi.html#scrolltoc

Oracle Solaris Kernel Zones can run in guests on Oracle VM Server for SPARC. Each Oracle VM Server for SPARC domain has an independent limit for the number of kernel zones that you can run. The limit is 768 for SPARC T4 or SPARC T5 systems, and 512 for SPARC M5 or SPARC M6 systems.
Kernel zones cannot run in Oracle VM Server for x86 guests or on Oracle VM VirtualBox.

Gemblung right?

Tuesday, June 23, 2015

fix locale

fix locale on some python or another script that locale-sensitive
export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
locale-gen en_US.UTF-8
sudo dpkg-reconfigure locales
 taken from:
http://askubuntu.com/questions/205378/unsupported-locale-setting-fault-by-command-not-found

Saturday, January 31, 2015

sha512sum

to generate recursively:
find . -type f -exec sha512sum {} \; > sha512sum-${PWD##*/}

to check:
sha512sum -c sha512sum-${PWD##*/} | grep -i fail

ps.: "${PWD##*/}" is only the directory name, like: "pwd | rev | cut -d / -f1 | rev"

from:
http://www.shell-fu.org/lister.php?id=850

Monday, January 26, 2015

Remedial for hacked incident

 sudo grep '/alias.php\|/Association.php\|/blog.php\|/buffer.php\|/cache.php\|/class.wpcom-json-api-get-media-endpoint.php\|/db.php\|/dirs.php\|/file.php\|/footer.php\|/functions.php\|/global.php\|/idna_convert.class.php\|/info.php\|/menu.php\|/options.php\|/patError.php\|/PlainHTTPFetcher.php\|/shortcodes.php\|/twentyten.php\|/twentythirteen.php\|/utf.php\|/vs3xmo1.php\|/vs3xmo1.php' /var/log/xxx/xx-xx.com_access_log | cut -f 1 -d " " | sort |


find /home/ -type f -iname "*.php" -print0 | xargs -0 grep -i "qV="

https://gist.github.com/facelordgists/5761101

http://houseoflaudanum.com/navigate/snippets/removing-spam-from-postfix-queues/

This command does several things.
  1. Read in the mailqueue
  2. Look for sender address that end with `example.com`
  3. Ignore senders with valid addresses (`david` and `john`)
  4. Deletes all those messages from the queue
$ mailq | tail +2 | grep -v '^ *(' | awk 'BEGIN { RS = "" } { if ($7 ~ "example.com$" && $7 !~ "^david|^john" && $9 == "" ) print $1 } ' | tr -d '*!' | sudo postsuper -d -
http://www.cyberciti.biz/faq/searching-multiple-words-string-using-grep/

http://www.cyberciti.biz/tips/howto-postfix-flush-mail-queue.html


To remove all mail from the queue, enter:
# postsuper -d ALL
To remove all mails in the deferred queue, enter:
# postsuper -d ALL deferred

Tuesday, August 12, 2014

enable ssh on mac os x

SSH access by users is controlled by the local copy of Directory Services. (Controlled using dscl)
First off run dscl . list /Groups | grep 'access_ssh'. If the returned value says com.apple.access_ssh-disabled then all users have SSH access. If not, then we need to give the user access.
To add the user you need to run:
sudo dscl . append /Groups/com.apple.access_ssh user USERNAME
(replace USERNAME with the short username of the user) as well as:
sudo dscl . append /Groups/com.apple.access_ssh groupmembers `dscl . read /Users/USERNAME GeneratedUID | cut -d " " -f 2`
(replace USERNAME with short username as well)

taken from:
http://superuser.com/questions/166179/how-to-enable-remote-access-for-another-account-on-mac-remotely-via-ssh

Tuesday, June 17, 2014

InnoDB: Completed initialization of buffer pool InnoDB: Error: checksum mismatch in data file ./ibdata1

untuk menangani:
131104 11:17:16 InnoDB: Completed initialization of buffer pool InnoDB: Error: checksum mismatch in data file ./ibdata1 131104 11:17:16 InnoDB: Could not open or create data files
maka dilakukan
mysqld_safe  --innodb_force_recovery 4
diambil dari 
http://lifeandshell.com/mysql-innodb-error-checksum-mismatch/

Saturday, January 18, 2014

Finding out largest tables on MySQL Server

mysql> SELECT CONCAT(table_schema, '.', table_name),
    ->        CONCAT(ROUND(table_rows / 1000000, 2), 'M')                                    rows,
    ->        CONCAT(ROUND(data_length / ( 1024 * 1024 * 1024 ), 2), 'G')                    DATA,
    ->        CONCAT(ROUND(index_length / ( 1024 * 1024 * 1024 ), 2), 'G')                   idx,
    ->        CONCAT(ROUND(( data_length + index_length ) / ( 1024 * 1024 * 1024 ), 2), 'G') total_size,
    ->        ROUND(index_length / data_length, 2)                                           idxfrac
    -> FROM   information_schema.TABLES
    -> ORDER  BY data_length + index_length DESC

    -> LIMIT  10;

taken from: http://www.mysqlperformanceblog.com/2008/02/04/finding-out-largest-tables-on-mysql-server/

Sunday, January 05, 2014

rapalan mysql akbar :D

mysqlcheck --all-databases -r #repair
mysqlcheck --all-databases -a #analyze
mysqlcheck --all-databases -o #optimize

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

Friday, December 14, 2012

portableapps start.exe error and cannot launch

"PortableAppsPlatform.exe file is not a valid PortableApps.com release and cannot be launched",
when you bump with that error, and recently you cannot install some software (dropbox installer for example). Then you will realize that update process of some software will get failure (mozilla for example).
This problem because you had culprit at your tmp directory.

"C:\Users\netw0rk\AppData\Local\Temp"
It got wrong permission. The normal permission of tmp folder is inherit from parent, so the solution is simple, just check inherit check-box and press OK.

That's it!

glossary:
http://miscee.blogspot.com/2012/11/portableappsplatformexe-file-is-not.html
http://answers.microsoft.com/en-us/windows/forum/windows_8-windows_install/cant-install-multiple-programs/dd263736-cccb-478d-9537-b89af0d554da?page=1


Sunday, December 02, 2012

sudo equivalent for windows

trick that using scheduled task
http://willmtz.blogspot.com/2011/10/how-to-force-application-to-open-in.html
or using runas saved cred
http://www.sevenforums.com/tutorials/193743-elevated-program-shortcut-create-standard-user.html
dunno about this
http://superuser.com/questions/244959/run-as-administrator-shortcut-without-password-prompt

Monday, September 10, 2012