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

Saturday, September 01, 2012

Catu Daya eksternal Arduino uno

Hari ini agak apes, mbledosno arduino ne arek TA, :P. Jadi bertanya2, catudaya yang aman untuk arduino yang aman ini yang gimana yah?

Monday, August 27, 2012

multiple instance portable firefox

http://www.terminally-incoherent.com/blog/2009/06/11/running-firefox-and-firefox-portable-at-the-same-time/

Tuesday, July 03, 2012

Mounting partitions from full-disk 'dd' images

Forensics: Mounting partitions from full-disk 'dd' images

Published: 2009-08-18,
Last Updated: 2009-08-19 00:26:36 UTC
by Daniel Wesemann (Version: 1)
3 comment(s)
If you are, as I am, a GCFA who attended Rob Lee's famous training in the not-so-recent past, you probably still are "carving out" partitions from within an acquired full disk "dd" image by running it through another "dd". Given how quickly the disk sizes are increasing, this is highly inefficient both in terms of disk space and analyst time used.
But there's a better way. You already know how to use "loopback mount" on Linux to mount an image? Well, loopback mount supports an "offset" parameter that lets you mount a partition directly from within a larger full-disk image. Thusly:

root@ubuntu:/media/disk-1# ls -al
total 39082701
drwxrwxrwx 1 root root 4096 2009-07-12 13:33 .
drwxr-xr-x 4 root root 4096 2009-08-18 19:04 ..
-rwxrwxrwx 1 root root 878 2009-07-07 11:46 fdisk
-rwxrwxrwx 1 root root 701 2009-07-07 11:47 hdparm
-rwxrwxrwx 2 root root 40020664320 2009-07-07 14:34 image-sda
-rwxrwxrwx 1 root root 43 2009-07-07 12:02 md5sum
-rwxrwxrwx 1 root root 43 2009-06-29 13:13 md5sum-sda
drwxrwxrwx 1 root root 0 2009-07-11 19:03 $RECYCLE.BIN
root@ubuntu:/media/disk-1# fdisk -ul image-sda
You must set cylinders.
You can do this from the extra functions menu.

Disk image-sda: 0 MB, 0 bytes
255 heads, 63 sectors/track, 0 cylinders, total 0 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x9c879c87

Device     Boot Start End      Blocks    Id System
image-sda1 *    63    78140159 39070048+ 7  HPFS/NTFS
Partition 1 has different physical/logical endings:
phys=(1023, 254, 63) logical=(4863, 254, 63)

root@ubuntu:/media/disk-1# mount -o ro,loop,offset=32256 -t auto image-sda /media/image
root@ubuntu:/media/disk-1# cd ..
root@ubuntu:/media# cd image
root@ubuntu:/media/image# ls
AUTOEXEC.BAT favorites ntldr Start Menu blp INFCACHE.1 pagefile.sys System Volume Information boot.ini IO.SYS Program Files temp

CONFIG.SYS MSDOS.SYS RECYCLER WINDOWS Documents and Settings NTDETECT.COM spoolerlogs
root@ubuntu:/media/image#


The magic "32256" offset passed to "mount" is easily explained as the start of the partition you are interested in (63 in this case) multiplied by the unit size (512 in this case).  If you have more than one partition, just repeat the above steps for the other slices.
There you go. This easily saves several hours and untold gigabytes of disk space compared to the GCFA "carving out" method.

taken from: https://isc.sans.edu/diary.html?storyid=6991

Friday, June 15, 2012

Mikrotik Vuln

http://www.133tsec.com/2012/04/30/0day-ddos-mikrotik-server-side-ddos-attack/
http://www.133tsec.com/2012/04/27/0day-mikrotik-winbox-client-side-attack-a-remote-code-execution-exploit/

Monday, June 11, 2012

Removing MySQL from OSX Lion


Removing MySQL from OSX Lion

Recently I've had to remove a version of MySQL 5.5 from my Macbook so that I could go back to a 5.1 version. However it appears that there isn't an automatic way to remove and install an older version. A few google searches revealed a bulk of the removal process, but additional searching revealed a few more steps.
sudo rm /usr/local/mysql
sudo rm -rf /usr/local/mysql*
sudo rm -rf /Library/StartupItems/MySQLCOM
sudo rm -rf /Library/PreferencePanes/My*
rm -rf ~/Library/PreferencePanes/My*
sudo rm -rf /Library/Receipts/mysql*
sudo rm -rf /Library/Receipts/MySQL*
sudo rm -rf /var/db/receipts/com.mysql.*
vim /etc/hostconfig # and remove the line MYSQLCOM=-YES-
9/28/2011 - added comment on last line. Thanks Justin for pointing this out! 

Web references:
taken from: http://johnmcostaiii.net/2011/removing-mysql-osx-lion/

Sunday, June 10, 2012

Aerosmith - Hole In My Soul

 
I'm down a one way street
With a one night stand
With a one track mind
Out in no man's land
(The punishment sometimes don't seem to fit the crime)

Yeah there's a hole in my soul
But one thing I've learned
For every love letter written
There's another one burned
(So you tell me how it's gonna be this time)

Is it over
Is it over
'Cause I'm blowin' out the flame

Take a walk outside your mind
Tell me how it feels to be
The one who turns the knife inside of me
Take a look and you will find there's nothing there girl
Yeah I swear, I'm telling you girl yeah 'cause
There's a hole in my soul that's been killing me forever
It's a place where a garden never grows
There's a hole in my soul, yeah I should have known better
'Cause your love's like a thorn without a rose

I'm as dry as a seven year drought
I got dust for tears
And I'm all tapped out
(Sometimes I feel broke and can't get fixed)

I know there's been all kinds of shoes underneath your bed
Now I sleep with my boots on but you're still in my head
(And something tells me this time I'm down to my last licks)

'Cause if it's over
Then it's over
And it's driving me insane

Take a walk outside your mind
Tell me how it feels to be
The one who turns the knife inside of me
Take a look and you will find
There's nothing there girl yeah I swear
I'm telling you girl, yeah,
'Cause there's a hole in my soul
That's been killing me forever
It's a place where a garden never grows
There's a hole in my soul
Yeah, I should have known better
'Cause your love's like a thorn
Without a rose

Is it over
Yeah it's over
And I'm blowin' out the flame

Take a walk outside your mind
Tell me how it feels to be
The one who turns the knife inside of me
Take a look and you will find
There's nothing there girl yeah I swear
I'm telling you girl, yeah,
'Cause there's a hole in my soul
That's been killing me forever
It's a place where a garden never grows
There's a hole in my soul
Yeah, I should have known better
'Cause your love's like a thorn
Without a rose 

Sunday, March 18, 2012

BADSIG Cure

Try deleting the key
sudo apt-key del 16126D3A3E5C1192
then updating the repository
sudo apt-get update
You should get a NO_PUBKEY error instead of a BADSIG error and
sudo apt-key finger
should not find the key (called "Ubuntu Extras Archive Automatic Signing Key")
Now add the key
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 16126D3A3E5C1192
The result of apt-key finger should have
pub   1024D/3E5C1192 2010-09-20
      Key fingerprint = C474 15DF F48C 0964 5B78  6094 1612 6D3A 3E5C 1192
uid                  Ubuntu Extras Archive Automatic Signing Key 

If that does not work, try
apt-get clean            # Remove cached packages
cd /var/lib/apt
mv lists lists.old       # Backup mirror info
mkdir -p lists/partial   # Recreate directory structure
apt-get clean
apt-get update           # Fetch mirror info
Source: this ubuntu forums thread
linkimprove this answer

Wednesday, March 07, 2012

search and replace n occurrence with awk

awk '/Jack/{c++;if(c==2){sub("Jack","Rob");c=0}}1' file

Thursday, March 01, 2012

12 years and counting

12 years and counting, but the feeling won't go.
It's like bitter syrup, already swallow it long time a go but still smell it today. You all maybe think this very funny, or awkward.  Whatever dud, you can say anything, you can laugh as loud as you can. You can call me crazy, whatever. It's didn't change this feeling, nor erase it.

Friday, February 24, 2012

Convert and resize picture with imagemagick

for img in *.jpg; do
base=`basename $img .jpg`
echo $base;
convert -resize 640x480 "$img" "$base.png"
done

Wednesday, December 21, 2011

love in mathematic with gnuplot

yusuf81@yusuf81-desktop:~$ gnuplot

    G N U P L O T
    Version 4.4 patchlevel 2
    last modified Wed Sep 22 12:10:34 PDT 2010
    System: Linux 2.6.38-13-generic

    Copyright (C) 1986-1993, 1998, 2004, 2007-2010
    Thomas Williams, Colin Kelley and many others

    gnuplot home:     http://www.gnuplot.info
    faq, bugs, etc:   type "help seeking-assistance"
    immediate help:   type "help"
    plot window:      hit 'h'

Terminal type set to 'wxt'
gnuplot> set xrange [-2:2]
gnuplot> set yrange [-2:2]
gnuplot> set samples 10000
gnuplot> set title "Love in MATH"
gnuplot> plot (sqrt (cos (x)) * cos (200 * x) + sqrt (abs (x)) -0.7) * (4-x * x) ** 0.01
gnuplot>


Enhanced by Zemanta

Saturday, December 10, 2011

don't create dynamic tables

Relational database terminologyImage via Wikipedia
If you are creating a table dynamically, that most likely means you do not understand relational database ideology and as a result doing something wrong.
Just create all the tables at application setup from ready made dump and do not create any tables at runtime.
No need to use dynamic table name at all.
taken from:
http://stackoverflow.com/questions/3665784/php-pdo-prepared-statements-dont-work-when-creating-a-table
Enhanced by Zemanta

Monday, December 05, 2011

Andjoeran Pengoeasa, "GIATLAH MEMBATJA"

In linux, comprehensive manual always exist, in example just simply type "man find", then you will enlighted how to find your pr0n file that had size twenty megs or more. 

Before you play and mess the code/installation and anything, please put your eyes to at least 5 tutorial. Don't stick only with 1 tutorial. Why more tutorial is better?, because more tutorial will give you different angle of perspective.

And remember all error message always explain why and where you did something wrong. The place for error sometimes buried in dmesg, /var/log/syslog or /var/log/messages. When you got those messages, simply copy paste it to google will yield the answer.

You will get more bright information with that way, than you asking the questions to the old man with rusty brain and dirty mouth like me :P. This isn't because  me and those old bags down here is lazy nor feel 3l33t, but this is not how the good discussion flow. It's already said, one of the old bags (@Bino Oetomo) tell that he crawl google through 20 pages, when he got some error or problem. I and I not crazy as that old bags, I just crawl first 5 pages, then redefine the keyword with proper keywords.

And after you do that ways, but still had no enlightenment, then you can floor it to this playground. Tell the action that you already did, and the proper documentation that you already read. I or maybe another guys will happily discuss it, and good discussion will flow. This is what we call "sama-sama belajar, belajar bersama-sama" (I'm not translate this, because this idiom seems moronic when it's said with another langs). 

Almost forgot something, you must had the vision and clearly know what are you doing. Sometimes the tutorial is does in different environment and different purpose, you must adjust it manually.

And last one, please understand this fucking language. No exception for this, because this moronic things (I mean this poor operating system, yes I talking about this damn OS), build in the western world, not from magelang, situbondo, kendal payak or another place in this island. This fact that we must admitted. So goods articles or howtos will came from their language.  

PS: If you cannot understand this article, please get your ass to bookshop and buy some oxford dicts, burn it, put it on a glass of water, and drink it with single shots, after that, we will meet in another side :)).

memperbaiki file modification based on exif data

memperbaiki file modification based on exif data
--------------------------------------------------------------------------------
for f in *.jpeg
do
  exiftool -S -d "%Y%m%d%H%M.%S" -DateTimeOriginal "${f}" \
  | awk '{ print $2 }' \
  | xargs -I % touch -m -t % "${f}"
done
--------------------------------------------------------------------------------
Enhanced by Zemanta

Tuesday, November 22, 2011

USB modem, networkmanager dan native networking stack

Gini lho ceritanya, orang2 itu kadang pada bingung menggunakan modem usb bawaannya provider gsm dan evdo di ubuntu, dan solusi nya selalu menggunakan wvdial yang dalam hal ini helper untuk setting native stack networking, padahal saya menggunakan networkmanager  bawaannya gnome/ubuntu selalu berhasil. Yang jadi pertanyaan, apanya yang salah? kukur2.

Native stack networking/tcp-ip.
Ini adalah mekanisme inisialisasi network paling kuno. Di setiap distro utama (redhat,slackware,debian) tempatnya berbeda-beda.
Kalo di slackware kalo gak salah ada di /etc/rc.network (kalo gak salah), soalnya slackware ngambil model konfigurasi ala bsd.
Kalo di redhat ada di /etc/sysconfig/network-scripts/ifcfg-device dan di /etc/sysconfig/network
Kalo di debian ada di /etc/network/interfaces
Setting dns ada di /etc/resolv.conf baik untuk debian, redhat maupun slackware (ini gara2 semua menggunakan libc/glibc).