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).

Sunday, October 09, 2011

fix GPG key missing

sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com [key-fingerprint]

lightweight ubuntu versi network_pirates

  1. Install ubuntu dengan cd alternate dan jangan pilih package apapun.
  2. install xorg lxde lxdm openoffice network-manager libasound2-plugins "pulseaudio-*" paman padevchooser paprefs pavucontrol pavumeter pidgin openntpd iptraf iptables iproute ifstat
  3. edit /etc/xdg/ untuk menampilkan network manager applet
  4. selesai :P

Monday, September 26, 2011

Bug direct3d / opengl pada wine

jika sampeyan main DotA pake wine, terus menggunakan wine versi ini:

yusuf81@yusuf81-desktop:/opt/DotA$ wine --version

wine-1.3.28

terus mengalami warning message seperti ini:

err:d3d:swapchain_blit >>>>>>>>>>>>>>>>> GL_INVALID_OPERATION (0x502) from Swapchain present blit(EXT_framebuffer_blit)

 @ swapchain.c / 334

err:d3d:swapchain_blit >>>>>>>>>>>>>>>>> GL_INVALID_OPERATION (0x502) from Swapchain present blit(EXT_framebuffer_blit)

 @ swapchain.c / 334

fixme:d3d:resource_check_usage Unhandled usage flags 0x8.

fixme:d3d:resource_check_usage Unhandled usage flags 0x8.

fixme:d3d:resource_check_usage Unhandled usage flags 0x8.

dan game hanya berjalan di mode windowed (wine w3l.exe -window) dan/atau harus berjalan pada resolusi yang sama dengan xwindows. 
Terus pas ngegame jalannya game nggembot dan setelah di cek, kelihatannya seluruh proses dilakukan di prosesor, dan prosesor vga, kelihatannya nganggur.
Jika sampeyan mengalami hal-hal tersebut, maka sampeyan semua apes. 
Tunggu saja update wine yang anyar, atau downgrade ke versi yang lama. 
Yang jelas wine versi sebelum ini lancar jaya dan aman. Saya saja yang sok gaya pake repository wine dilaunchpad, terus jadinya keblusuk seperti ini.

NB: Untuk langganan versi wine yang lucu ini (lebih cepet dari standard repository ubuntu, namun dengan resiko gak stabil), silahkan ikuti jejak saya dengan mengetik:
sudo echo "deb http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu natty main" >> /etc/apt/source.list

sudo apt-get update && apt-get upgrade

Namun ingat, segala resiko silahkan ditanggung sendiri

Sekian, Wassalam

[mangkel gara2 gak bisa main dota]

Sunday, September 11, 2011

perintah tunnel ssh

ssh -p 443 -D 1080 -N -f

Saturday, September 03, 2011

wodim dan geniso bento

poro hadlirin penikmat linux yang berbahagia, jangan pakai geniso dan wodim bawaannya debian. Itu package yang bento, pakailah mkisofs dan cdrecord aseli dari brandonsnider di ppa:brandonsnider/cdrtools. Hal ini pernah diulas oleh saudara walecha99 tapi baru hari ini saya melihat bukti dari ke bento an itu.
Sekian

Saturday, August 27, 2011

DNS outage at hosting

Warning, total DNS outage or partial DNS outage (because ip blocked or something else) can cause some php script that need resolving ip address stop working. Use reliable DNS server like google dns or opendns server.
You can use: 8.8.8.8, 8.8.4.4 (google DNS server), 208.67.222.222, 208.67.220.220 (opendns DNS server).

Wednesday, August 24, 2011

"linux clone file system method "copy procedure

Dari:
https://bitcointalk.org/index.php?topic=7374.280
purpose:
There's going to be a HDD installer included on the final version. The reason why I decided not to post instructions on how to install to a local HDD is because of LinuxCoin being in testing. If you really want to you could try formatting you HDD as ext4 then ...


mkdir /mnt/hdd
mount /dev/sdXX /mnt/hdd
cp --preserve -R /{bin,boot,dev,etc,home,lib,lib32,opt,root,run,sbin,selinux,srv,usr,var} /mnt/hdd
mkdir /mnt/hdd/{media,proc,sys,tmp}
mount -o bind /dev /mnt/hdd/dev
mount -t proc /proc /mnt/hdd/proc
chroot /mnt/hdd
apt-get install grub2
grub-install /dev/sdX
exit

 

Thursday, July 14, 2011

in_array strange behavior

use in_array in php?
better check this out because I had mess my script because this strange behavior.
http://www.php.net/manual/en/function.in-array.php#102681

Wednesday, June 29, 2011

Gallery - D'arcy

Langitpun kelam dan kelabu
Matanya terkatup dengan sayu
Fatamorgana hal yang sudah sangat biasa
Optimispun percuma saja
Na... na... na... na... na...

Oh D`arcy terbuai tinggi
Lihatlah dia bersembunyi
Pelarian adalah Suatu keseharian
Terbangkan D`arcy ke impian

Reff :
Oh ooo D`arcy... (2x)
Kesakitan si D`arcy
Menjadi sebuah hobi
ooh oo D`arcy

Na... na... na... na... na...

Terdekap di sudut gelap
Kata hati tak pernah tetap
Kekecewaan D`arcy makin lengkaplah kini
Dengan musik yang mengiringi

Monday, June 20, 2011

These Days

I was walking around, just a face in the crowd
Trying to keep myself out of the rain
Saw a vagabond king wear a Styrofoam crown
Wondered if I might end up the same
There's a man out on the corner
Singing old songs about change
Everybody's got their cross to bare, these days

She came looking for some shelter with a suitcase full of dreams
To a motel room on the boulevard
I guess she's trying to be James Dean
She's seen all the disciples and all the wanna be's
No one wants to be themselves these days
Still there's nothing to hold on to but these days

These days the stars seem out of reach
These days there ain't a ladder on the streets
Oh no, no, no
These days are fast, nothing lasts in this graceless age
There ain't nobody left but us these days

Jimmy shoes busted both his legs, trying to learn to fly
From a second story window, he just jumped and closed his eyes
His momma said he was crazy, he said "Momma, I've got to try
Don't you know that all my heroes died
And I guess, I'd rather die than fa-fa-fade away, yeah"

These days the stars seem out of reach, yeah
But these days there ain't a ladder on the streets
Oh no, no, no
These days are fast, love don't lasts in this graceless age
Even innocence has caught the midnight train
And there ain't nobody left but us these days

I know Rome's still burning
Though the times have changed
This world kept turning round and round and round and round
These days

These days the stars seem out of reach, yeah
But these days there ain't a ladder on these streets
Oh no, no, no
These days are fast, love don't lasts in this graceless age
Even innocence has caught the midnight train
And there ain't nobody left but us these days

These days the stars seem out of reach, yeah
These days there ain't a ladder on these streets
Oh no, no, no
These days are fast, nothing lasts
There ain't no time to waste
There ain't nobody left to take the blame
Oh no, no, no
Oh no, no, no, these days
There ain't nobody left but us these days



Bon Jovi - These Days - These Days

Monday, May 23, 2011

SANE PROJECT

Pilih salah satu:
  1. Arduinno / Embedded Sub Project
  2. TPlink MR3220 - OpenWRT Sub Project
  3. Mikrotik-Routerboard Sub Project
  4. Yashica Superfx3 / Photography Sub Project

10.10 to 11.04

Ngene ceritane, ndelok iklannya 11.04 kok ketoke apik tenan desktop-e, tur yo bosen ambek 10.10. akhirnya saya memantapkan diri untuk mengupgrade os dari 10.10 ke 11.04. Setelah ngrepoti wong akeh dengan sedikit memaksa meminta iso nya 11.04, akhirnya saya dapat iso nya 11.04 yang versi desktop.

Pertanyaan: "Kenek opo seh gak nggawe network dist-upgrade?".
Jawaban    : "Soale saiki aku fakir bandwidth, hahah, pertimbangannya, jika upgrade menggunakan iso, sik iso ngirit bw meskipun sithik)".

Gara2 saya ini pemalas, ya akhirnya saya rekadaya gimana caranya saya bisa install iso itu tanpa burning cd atau ngosongi flashdisk. Akhirnya dengan sulap "
"mount -o /home/yusuf81/ubuntu-11.04-desktop.iso /media/cdrom/" saya bisa nge mount iso itu. Tapi lha kok pas saya buka2 foldernya dan saya utak-utek gak ada instruksi atau cara agar gimana caranya upgrade tanpa boot. Lha mestinya kalo nalar sehat tur waras, brandal2 yang mbuat ubuntu lak mestinya ngasih cara gimana caranya upgrade tanpa boot. Kalo gak ngasih cara itu berarti kalah skill sama brandal2 yang baca artikel ini dong, hahahaha!. Lha berhubung saya sudah nyerah (otak tak mampu waktu tak punya), akhirnya saya ngrepek di google.

Kesimpulan pas umak umik di google, harus memilih salah satu:
1. pake apt-cdrom untuk add iso 11.04 itu ke repository
2. atau pake versi alternate 11.04, yang di khususkan untuk upgrade secara "bootless" (istilah mekso).

Lha berhubung sing kecekel tangan 11.04 untuk desktop, ya saya masih ngotot, bijimane caranya agar bisa install os kemplu ini tetep bisa ke upgrade. Akhirnya nyerah deh, ngalahi ngosongi flashdisk and sama unetbootin itu iso slompret di dump ke flashdisk, soale saya mbedek di iso versi desktop ini ada menu upgrade nya jika di boot. Setelah booting klepek2 (maklum USB lambat), os di load, tak pendeliki menu2 nya, termasuk menu install. Eh ternyata gak ada, brandal2 itu gak mbuat menu upgrade di versi desktop. Jan koplo tenan!. Akhirnya aku mempertimbangkan upgrade metode nambah repo, cuman kok gak srek. Gak sreknya itu saya menduga mestine onok skrip dist-upgrade yang hanya didapat dari skrip instalan yang ada di alternate. Dengan kata lain, 11.04 desktop iku cuman gawe live cd and clean install thok. Berhubung setting dan data males memigrate, ya pokok yok opo carane upgrade nya kudu melalui standard procedure.


Setelah misuh2 secukupnya, akhirnya saya mbukak http://request.ub.ac.id/ , masukkan url nya 11.04 yang versi alternate. Eh ternyata sudah ada yang donlod, ya akhirnya saya mbesoknya klenuk2 ke temen saya yang di FIA, nunut ngopi 11.04 yang alternate.

Wis, akhire dapet iso kemplu 11.04 alternate, begitu tak mount, lhaaa, onok menu cdrom-upgrade.sh, langsung ae tak run nggawe sudo. Nggoeng, langsung jalan menu upgrade nya. Pas tak pilih menu "with no upgrade from network", lha kok installernya menampilkan pesan lek iki sistem gak iso di upgrade. Lhe?, kampret tenan, begitu tak tak pilih menu "with network connection", langsung jalan lancar. "Ya wis babahno nggawe network, paling ya ndonlodnya sithik", batinku. Begitu di urak urek di itung ambek upgrade scriptnya, ternyata njaluk donlod patang atus mega (400 mega). Lha kok gedhe men?, ternyata setelah tak analisa, wong iki sopware wis kisenan akeh jadi nya ya donlodnya malih akeh.

Yawis gas ae, gak papa donlod 400 mega, wong yo gak kringeten, tak tinggal moco buku. Hoeng hoeng hoeng, begitu atene nginstall ghostscript, lha kok sistem error. Tak jarke ae, tak catet thok, wong yo sik proses, ate lapo?, lek d penggak iso malah bubrah kabeh.
Tak enteni proses setting sampe mari, tapi gara2 mau onok sing error, malih proses install lan setting pedot tengah, onok 2 menu terakhir sing durung dilakoni. Berhubung sistem onok nang status unsteady state, akhire sistem tak reboot disik.
Begitu sistem reboot, sistem berjalan dengan gak stabil. Boot pertama hang, boot kedua hang pas load menu. Boot ketiga wis lumayan lancar. Cuman pas tak coba
"apt-get upgrade" apt system meminta untuk melakukan apt-get -f install. Perintah iki menandakan bahwa ada proses dpkg sing masih nyantol, belum selesai.
Habis itu ternyata skrip untuk custom usbmodeswitch sudah gak diperlukan, jadinya ya tak del.
Begitulah Kisah upgrade saya, oh ya bagi yang masih bingung ini cerita mengenai apa, ini cerita mengenai upgrade ubuntu. Hahaha

Sunday, May 22, 2011

Jika error menjalankan NetBSD dan OpenBSD di virtualbox

http://forums.virtualbox.org/viewtopic.php?f=1&t=26275

Re: BSD and problems installing

by jgribbin » 6. Sep 2010, 10:36
I have to start it in a terminal window (actually alt-f2 works as well) w/ :

[jimg@dartangnan ~]$ VBoxSDL --norawr0 --startvm NetBSD

There are 2 dashes in front of the switches, you only appear to have 1.

I do this for both the install and to run it after the install. I had to connect the install ISO to do the install, then disconnect the ISO to run the installed OS. Running Virtual Box in this manner appears to eliminate the opportunity to use F12 to select the boot medium.

I am doing this on Fedora 12. If doing this in Windows, i suspect you should be able to do "start run" then enter what I have. I don't have a Windows box at the moment to check it.

The --norawr0 tells it there is no ring 3, at least according to the
documentation. --norawr3 would mean it has no ring 0. I know this sounds
backwards, but that's what the documentation I found says.

I believe this "ring" stuff has to do with protected modes in the processor. I'm not enough of a CPU guru to be certain.

Maybe someone on the list knows how to put this in Virtual Box's setup so that it can be
started in the usual way Virtual Box is set up for.

Jim G

---------------------------------------------------------------------------------------------------------------------------------
http://www.virtualbox.org/manual/ch03.html#id457899
OpenBSD

Requires hardware virtualization to be enabled. Versions 3.7 and later are supported. Guest Additions are not available yet.

Thursday, April 14, 2011

Mendalami HTB pada QoS RouterOS Mikrotik

Artikel

Mendalami HTB pada QoS RouterOS Mikrotik

Kategori: Fitur & Penggunaan

Implementasi QoS (Quality of Services) di Mikrotik banyak bergantung pada sistem HTB (Hierarchical Token Bucket). HTB memungkinkan kita membuat queue menjadi lebih terstruktur, dengan melakukan pengelompokan-pengelompokan bertingkat. Yang banyak tidak disadari adalah, jika kita tidak mengimplementasikan HTB pada Queue (baik Simple Queue maupun Queue Tree), ternyata ada beberapa parameter yang tidak bekerja seperti yang kita inginkan.Beberapa parameter yang tidak bekerja adalah priority, dan dual limitation (CIR / MIR).

Pada pembahasan artikel ini, kita akan mengambil contoh sebuah sistem QoS sederhana, di mana kita ingin mengalokasikan bandwidth sebesar 400kbps untuk 3 client, di mana masing-masing client bisa mendapatkan maksimal 200kbps. Di antara ketiga client tersebut, memiliki prioritas yang berbeda, yaitu: 1,2, dan 3.
Untuk mempermudah pemantauan dan pembuktian, kita akan menggunakan queue tree.
Cara paling mudah untuk melakukan queue dengan queue tree, adalah dengan menentukan parameter :
  • parent (yang harus diisi dengan outgoing-interface),
  • packet-mark (harus dibuat terlebih dahulu di ip-firewall-mangle),
  • max-limit (yang merupakan batas kecepatan maksimum), atau dikenal juga dengan MIR (Maximum Information Rate)
Untuk percobaan awal, semua priority diisi angka yang sama: 8, dan parameter limit-at tidak kita isi. Gambar berikut ini adalah ilustrasi apa yang akan terjadi dengan konfigurasi di atas.

Karena alokasi bandwidth yang tersedia hanya 400kbps, sedangkan total akumulasi ketiga client melebihinya (600 kbps), maka ketiga client akan saling berebut, dan tidak bisa diprediksikan siapa yang akan menang (menggunakan bandwidth secara penuh) dan siapa yang akan kalah (tidak mendapatkan bandwidth yang sesuai).
Misalkan q1 adalah client dengan prioritas tertinggi, dan q3 adalah client dengan prioritas terbawah. Kita akan mencoba memasukkan nilai prioritas untuk masing-masing client sesuai dengan prioritasnya.

Tampak pada gambar di atas, meskipun sekarang q1 sudah memiliki prioritas tertinggi, namun ketiga client masih berebutan bandwidth dan tidak terkontrol.
Gambar berikut akan mencoba mengimplementasikan nilai limit-at. Seharusnya, limit-at adalah CIR (Committed Information Rate), merupakan parameter di mana suatu client akan mendapatkan bandwidthnya, apapun kondisi lainnya, selama bandwidthnya memang tersedia.

Ternyata q1 masih tidak mendapatkan bandwidth sesuai dengan limit-at (CIR) nya. Padahal, karena bandwidth yang tersedia adalah 400kbps, seharusnya mencukupi untuk mensuplai masing-masing client sesuai dengan limit-at nya.
Berikutnya, kita akan menggunakan parent queue, dan menempatkan ketiga queue client tadi sebagai child queue dari parent queue yang akan kita buat. Pada parent queue, kita cukup memasukkan outgoing-interface pada parameter parent, dan untuk ketiga child, kita mengubah parameter parent menjadi nama parent queue. Pertama-tama, kita belum akan memasukkan nilai max-limit pada parent-queue, dan menghapus semua parameter limit-at pada semua client.

Tampak pada contoh di atas, karena kita tidak memasukkan nilai max-limit pada parent, maka priority pada child pun belum bisa terjaga.
Setelah kita memasang parameter max-limit pada parent queue, barulah prioritas pada client akan berjalan.

Tampak pada contoh di atas, q1 dan q2 mendapatkan bandwidth hampir sebesar max-limitnya, sedangkan q3 hampir tidak kebagian bandwidth. Prioritas telah berjalan dengan baik. Namun, pada kondisi sebenarnya, tentu kita tidak ingin ada client yang sama sekali tidak mendapatkan bandwidth.
Untuk itu, kita perlu memasang nilai limit-at pada masing-masing client. Nilai limit-at ini adalah kecepatan minimal yang akan di dapatkan oleh client, dan tidak akan terganggu oleh client lainnya, seberapa besarpun client lainnya 'menyedot' bandwidth, ataupun berapapun prioritasnya. Kita memasang nilai 75kbps sebagai limit-at di semua client.

Tampak bahwa q3, yang memiliki prioritas paling bawah, mendapatkan bandwidth sebesar limit-at nya. q1 yang memiliki prioritas tertinggi, bisa mendapatkan bandwidth sebesar max-limitnya, sedangkan q2 yang prioritasnya di antara q1 dan q3, bisa mendapatkan bandwidth di atas limit-at, tapi tidak mencapai max-limit. Pada contoh di atas, semua client akan terjamin mendapatkan bandwidth sebesar limit-at, dan jika ada sisa, akan dibagikan hingga jumlah totalnya mencapai max-limit parent, sesuai dengan prioritas masing-masing client.
Jumlah akumulatif dari limit-at tidaklah boleh melebihi max-limit parent. Jika hal itu terjadi, seperti contoh di bawah ini, jumlah limit-at ketiga client adalah 600kbps, sedangkan nilai max-limit parent hanyalah 400kbps, maka max-limit parent akan bocor. Contoh di bawah ini mengasumsikan bahwa kapasitas keseluruhan memang bisa mencapai nilai total limit-at. Namun, apabila bandwidth yang tersedia tidak mencapai total limit-at, maka client akan kembali berebutan dan sistem prioritas menjadi tidak bekerja.

Sedangkan, mengenai max-limit, max-limit sebuah client tidak boleh melebihi max-limit parent. Jika hal ini terjadi, maka client tidak akan pernah mencapai max-limit, dan hanya akan mendapatkan kecepatan maksimum sebesar max-limit parent (lebih kecil dari max-limit client).

Jika semua client memiliki prioritas yang sama, maka client akan berbagi bandwidth sisa. Tampak pada contoh di bawah ini, semua client mendapatkan bandwidth yang sama, sekitar 130kbps (total 400kbps dibagi 3).

Yang perlu diingat mengenai HTB:
  1. HTB hanya bisa berjalan, apabila rule queue client berada di bawah setidaknya 1 level parent, setiap queue client memiliki parameter limit-at dan max-limit, dan parent queue harus memiliki besaran max-limit.
  2. Jumlah seluruh limit-at client tidak boleh melebihi max-limit parent.
  3. Max-limit setiap client harus lebih kecil atau sama dengan max-limit parent.
  4. Untuk parent dengan level tertinggi, hanya membutuhkan max-limit (tidak membutuhkan parameter limit-at).
  5. Untuk semua parent, maupun sub parent, parameter priority tidak diperhitungkan. Priority hanya diperhitungkan pada child queue.
  6. Perhitungan priority baru akan dilakukan setelah semua limit-at (baik pada child queue maupun sub parent) telah terpenuhi. 
Panduan praktis cara perhitungan limit-at dan max-limit

Di asumsikan bandwidth yang tersedia sebesar 1000kbps. Dan jumlah seluruh client adalah 70.  Yang perlu diketahui adalah :
  1. Berapa jumlah maksimal client yang menggunakan internet pada saat yang bersamaan. Jumlah ini belum tentu sama dengan jumlah komputer yang ada, apabila semua client tidak pernah terkoneksi secara bersamaan. Sebagai contoh, untuk kasus ini kita asumsikan adalah 50.
  2. Berapa jumlah minimal client yang menggunakan internet pada saat yang bersamaan. Sebagai contoh, untuk kasus ini kita asumsikan adalah 10
Maka, untuk setiap client (1 client dibuatkan 1 rule queue), limit-at nya adalah 1000 / 50 = 20kbps, dan max-limit nya adalah 1000 / 10 = 100 kbps.

Jangan lupa untuk menambahkan parent dengan max-limit sebesar 1000kbps (tidak perlu limit-at), dan memasukkan semua queue client di bawah parent queue. Jika untuk terminal tertentu membutuhkan priority lebih besar, maka kita bisa menggunakan priority yang berbeda-beda, tergantung dengan urutan prioritasnya.
 
Dibuat oleh: Valens Riyadi - MIKROTIK INDONESIA - www.mikrotik.co.id

Enable disable prepaid voucher by time parameter.

Enable disable prepaid voucher by time parameter.
# apr/14/2011 15:30:21 by RouterOS 4.17
# software id = Y2DT-TVQB
#
/system scheduler
add comment="" disabled=no interval=1d name=paketdinihari-enable on-event=":fo\
    reach i in=[/tool user-manager user find credit-price=1000000 uptime-limit\
    =10h] do={\r\
    \n:log info \"Paket dinihari nyala\";\r\
    \n/tool user-manager user enable numbers=\$i;\r\
    \n}" policy=reboot,read,write,policy,test,password,sniff,sensitive \
    start-date=jan/01/1970 start-time=22:00:00
add comment="" disabled=no interval=1d name=paketdinihari-disable on-event=":f\
    oreach i in=[/tool user-manager user find credit-price=1000000 uptime-limi\
    t=10h] do={\r\
    \n:log info \"Paket dinihari mati\";\r\
    \n/tool user-manager user disable numbers=\$i;\r\
    \n}" policy=reboot,read,write,policy,test,password,sniff,sensitive \
    start-date=jan/01/1970 start-time=06:00:00
add comment="" disabled=no interval=0s name=pln-mati on-event=":delay 00:01:00\
    ;\r\
    \n:local hour;\r\
    \n:local hournow;\r\
    \n:set hour [:totime [/system clock get time]];\r\
    \n:set hournow [:tonum [:pick \$hour 0 2]];\r\
    \n#:log info \$hournow;\r\
    \n:if (([\$hournow] >= 22)||([\$hournow] <= 6)) do={\r\
    \n:log info \"Paket dinihari nyala\";\r\
    \n\t:foreach i in=[/tool user-manager user find credit-price=1000000 uptim\
    e-limit=10h] do={\r\
    \n\t/tool user-manager user enable numbers=\$i;\r\
    \n\t}\r\
    \n} else={\r\
    \n:log info \"Paket dinihari mati\";\r\
    \n\t:foreach i in=[/tool user-manager user find credit-price=1000000 uptim\
    e-limit=10h] do={\r\
    \n\t/tool user-manager user disable numbers=\$i;\r\
    \n\t}\r\
    \n\t\r\
    \n}\r\
    \n\r\
    \n:if (([\$hournow] >= 18)||([\$hournow] <= 6)) do={\r\
    \n:log info \"Paket malam nyala\";\r\
    \n:local kodepaket;\r\
    \n:foreach i in=[/tool user-manager user find] do={\r\
    \n:set kodepaket [:pick [/tool user-manager user get \$i name] 0 4];\r\
    \n:if ((\$kodepaket = \"din1\") || (\$kodepaket = \"din2\") || (\$kodepake\
    t = \"san1\") || (\$kodepaket = \"san2\") || (\$kodepaket = \"san3\")) do=\
    {\r\
    \n/tool user-manager user enable \$i;\r\
    \n}\r\
    \n}\r\
    \n} else={\r\
    \n:log info \"Paket malam mati\";\r\
    \n:local kodepaket;\r\
    \n:foreach i in=[/tool user-manager user find] do={\r\
    \n:set kodepaket [:pick [/tool user-manager user get \$i name] 0 4];\r\
    \n:if ((\$kodepaket = \"din1\") || (\$kodepaket = \"din2\") || (\$kodepake\
    t = \"san1\") || (\$kodepaket = \"san2\") || (\$kodepaket = \"san3\")) do=\
    {\r\
    \n/tool user-manager user disable \$i;\r\
    \n}\r\
    \n}\r\
    \n}\r\
    \n:if (([\$hournow] >= 9)&&([\$hournow] <= 14)) do={\r\
    \n:log info \"Paket pagi nyala\";\r\
    \n:local kodepaket;\r\
    \n:foreach i in=[/tool user-manager user find] do={\r\
    \n:set kodepaket [:pick [/tool user-manager user get \$i name] 0 4];\r\
    \n:if ((\$kodepaket = \"pagi\") || (\$kodepaket = \"sara\")) do={\r\
    \n/tool user-manager user enable \$i;\r\
    \n}\r\
    \n}\r\
    \n} else={\r\
    \n:log info \"Paket pagi mati\";\r\
    \n:local kodepaket;\r\
    \n:foreach i in=[/tool user-manager user find] do={\r\
    \n:set kodepaket [:pick [/tool user-manager user get \$i name] 0 4];\r\
    \n:if ((\$kodepaket = \"pagi\") || (\$kodepaket = \"sara\")) do={\r\
    \n/tool user-manager user disable \$i;\r\
    \n}\r\
    \n}\r\
    \n}\r\
    \n" policy=reboot,read,write,policy,test,password,sniff,sensitive \
    start-time=startup
add comment="" disabled=no interval=1d name=paketmalam-enable on-event=":log i\
    nfo \"Paket malam nyala\";\r\
    \n:local kodepaket;\r\
    \n:foreach i in=[/tool user-manager user find] do={\r\
    \n:set kodepaket [:pick [/tool user-manager user get \$i name] 0 4];\r\
    \n:if ((\$kodepaket = \"din1\") || (\$kodepaket = \"din2\") || (\$kodepake\
    t = \"san1\") || (\$kodepaket = \"san2\") || (\$kodepaket = \"san3\")) do=\
    {\r\
    \n/tool user-manager user enable \$i;\r\
    \n}\r\
    \n}" policy=reboot,read,write,policy,test,password,sniff,sensitive \
    start-date=jan/01/1970 start-time=18:00:00
add comment="" disabled=no interval=1d name=paketmalam-disable on-event=":log \
    info \"Paket malam mati\";\r\
    \n:local kodepaket;\r\
    \n:foreach i in=[/tool user-manager user find] do={\r\
    \n:set kodepaket [:pick [/tool user-manager user get \$i name] 0 4];\r\
    \n:if ((\$kodepaket = \"din1\") || (\$kodepaket = \"din2\") || (\$kodepake\
    t = \"san1\") || (\$kodepaket = \"san2\") || (\$kodepaket = \"san3\")) do=\
    {\r\
    \n/tool user-manager user disable \$i;\r\
    \n}\r\
    \n}" policy=reboot,read,write,policy,test,password,sniff,sensitive \
    start-date=jan/01/1970 start-time=05:00:00
add comment="" disabled=no interval=1d name=paketpagi-enable on-event=":log in\
    fo \"Paket pagi nyala\";\r\
    \n:local kodepaket;\r\
    \n:foreach i in=[/tool user-manager user find] do={\r\
    \n:set kodepaket [:pick [/tool user-manager user get \$i name] 0 4];\r\
    \n:if ((\$kodepaket = \"pagi\") || (\$kodepaket = \"sara\")) do={\r\
    \n/tool user-manager user enable \$i;\r\
    \n}\r\
    \n}" policy=reboot,read,write,policy,test,password,sniff,sensitive \
    start-date=jan/01/1970 start-time=09:00:00
add comment="" disabled=no interval=1d name=paketpagi-disable on-event=":log i\
    nfo \"Paket pagi mati\";\r\
    \n:local kodepaket;\r\
    \n:foreach i in=[/tool user-manager user find] do={\r\
    \n:set kodepaket [:pick [/tool user-manager user get \$i name] 0 4];\r\
    \n:if ((\$kodepaket = \"pagi\") || (\$kodepaket = \"sara\")) do={\r\
    \n/tool user-manager user disable \$i;\r\
    \n}\r\
    \n}" policy=reboot,read,write,policy,test,password,sniff,sensitive \
    start-date=jan/01/1970 start-time=14:00:00

Sunday, April 10, 2011

Melas men

Despite the stereotype of modeling as a lucrative and glamorous profession, according to the US Bureau of Labor Statistics the median wage for commercial and print models was only $11.22 per hour in 2006.[20] MarketWatch listed modeling as one of the ten worst jobs in America.[20] Print models may work for manufacturers, stores, etc. for little or no pay. Experienced print models can make about $200- $ 500 per hour. Some print models do not work with an agent. The ones that work with an agent must give 15 - 20 % of the model's earnings to the agent. Famous print models can make thousands of dollars.[5]:189
sumber en.wikipedia.org

Wednesday, April 06, 2011

Aku malu

kadang aku malu ketika ingat hal itu, ya, aku sangat malu. Ketika kita bersikap kritis melihat lahan gambut diorat arit jadi perkebunan sawit disumatera, ketika freeport nggunduli hutan di papua. 
Namun disini, dikota kita sendiri gak bisa menyelamatkan hutan kota kita.


IN MEMORIAM Akademi Penyuluh Pertanian Tanjung, Mergan, KOTA MALANG, yang sekarang menjadi perumahan kaum berada.

Tuesday, March 29, 2011

Note for gpg error at ubuntu system

Fix by running this command at root.
apt-get clean
rm /var/lib/apt/lists/*
rm /var/lib/apt/lists/partial/*
apt-get clean
apt-get update

Thursday, March 24, 2011

Software Wars Picture


Hehehe, ini ada gambar aneh bin lucu, silahkan dinikmati....

How to Be a Secret Admirer | eHow.com


How to Be a Secret Admirer | eHow.com

Sunday, February 20, 2011

3 method to open url from php

Method 1:  Curl
//Check for curl before doing anything
if(function_exists(“curl_init”)){
//Initialize curl
$curl_feed = curl_init(“http://netw0rk.blogspot.com/”);
//Curl Options
curl_setopt($curl_feed, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl_feed, CURLOPT_HEADER, 0);
//Store our data
$data = curl_exec($curl_feed);
//Close curl
curl_close($curl_feed);
}
Method 2:  fopen
//Initialize fopen
$fopen_feed = @fopen(“http://netw0rk.blogspot.com/”, “r”);
//Make sure fopen was successfull
if ($fopen_feed) {
//Store our data
$data = “”;
while (!feof($fopen_feed)) {
$data .= fread($fopen_feed, 8192);
}
}
//Close fopen
fclose($fopen_feed);
Method 3:  fsockopen
//Initialize fsockopen
$fsockopen_feed = @fsockopen(“http://netw0rk.blogspot.com/”, 80, $errno, $errstr, 30);
if ($fsockopen_feed){
//Create our headers for the request
$headers = “GET http://netw0rk.blogspot.com/  HTTP/1.1\r\n”;
$headers .= “Host:  netw0rk.blogspot.com”\r\n”;
$headers .= “Connection: Close\r\n\r\n”;
fwrite($fsockopen_feed, $headers);
//Store our data
$data = “”;
while (!feof($fsockopen_feed)){
$data .= fgets($fp, 128);
}
//Close fsockopen
fclose($fsockopen_feed);
// Strip the header information
$data = explode(“\\r\\”, $data);
$data = $data[1];
}

Thursday, February 10, 2011

network security

Now I want to talk about security. After years passed by, I think the noted innovation is:

  1. cisco IOS rootkit. I'ts never heard on wild, but it's really a breaktrough.
  2. Nero NRG infection. I already guess it's will happen.
  3. w32 STUXNET. Haha, welcome to new world weapon.
  4. Software based Radio. Now it's easy to server as BTS from your pc, and eavesdrop all sms traffic that pass your bts.

Nganggur

Nganggur iku gak enak, believe me. Cuman jika kita terlalu terikat dengan pekerjaan, maka kita akan terpenjara dengan pekerjaan itu. Kita harus bisa mengatur bagaimana hidup kita itu seimbang. Imbang antara dolan lan kerjo. Imbang antara hak dan kewajiban, intinya disitu!