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