Friday, September 30, 2016

Memory Consume: mplayer vs iTunes

mplayer vs iTunes

Very high different of memory consume on my macOS Siera to play mp3 music.
How is on yours?


Monday, September 26, 2016

Reset Launchpad Layout macOS


  1. Open the Terminal application and enter the following defaults write command string:

    defaults write com.apple.dock ResetLaunchPad -bool true; killall Dock
  2. Hit return and wait for the Dock to relaunch and Launchpad to reset

Gist Test

Gist adalah cara sederhana untuk berbagi snippet. Semua gist adalah repository git yang mendukung versioning, forking, dan dapat digunakan sebagai repository git.

Step 1: Create a Gist 

  1. Log in to Github 
  2. Click the Gist link at the top of the screen (or go to gist.github.com
  3. Fill out the file name (description is optional) 
  4. Enter your code 
  5. Click Create Public Gist 
  6. Optional: You can also click Add File at the bottom to split your code snippet up into several different files if you need to.

Step 2: Embed your Gist

Once you create your Gist, you will be presented with a confirmation page. Click the show embed link and copy/paste the script tag on to your website.

Sunday, September 25, 2016

Angular 2

Develop Across All Platforms 

Learn one way to build applications with Angular and reuse your code and abilities to build apps for any deployment target. For web, mobile web, native mobile and native desktop.

Speed & Performance 

Achieve the maximum speed possible on the Web Platform today, and take it further, via Web Workers and server-side rendering. Angular puts you in control over scalability. Meet huge data requirements by building data models on RxJS, Immutable.js or another push-model.

Incredible Tooling

Build features quickly with simple, declarative templates. Extend the template language with your own components and use a wide array of existing components. Get immediate Angular-specific help and feedback with nearly every IDE and editor. All this comes together so you can focus on building amazing apps rather than trying to make the code work.

Loved by Millions

From prototype through global deployment, Angular delivers the productivity and scalable infrastructure that supports Google's largest applications.

Thursday, January 21, 2016

Bangsa besar mana yang tidak pernah hancur.

Dahulu kala sudah pernah ada bangsa-bangsa besar, tapi sebesar apapun bangsa itu, suatu saat mengalami kehancuran. Mereka menguasai ilmu pengetahuan, teknologi, sumber daya alam, dan kekayaan lainya. Contoh, kaum Tsamud. Mereka mampu mengelola pertanian dengan profesional. Mereka terkenal cerdas soal arsitektur. Padahal zaman dahulu mungkin belum ada teknologi konstruksi seperti sekarang ini dan mereka sudah bisa membuat hal yang sangat hebat. Seperti gambar berikut ini:




Ada lagi...
Nenek moyang bangsa kita sendiri, pernah mengalami masa kejayaan, misalnya Kerajaan Majapahit siapa yang tidak kenal? Tapi suatu saat hancur juga.




So...?
Bangga menjadi bangsa yang besar...?
Bangga bisa menguasai berbagai macam ilmu pengetahuan dan teknologi...?
Bangga dangan ini dan itu...?

Suatu saat pasti... akan hancur...!
Gak percaya?

Yuk kita pelajari apa saja penyebab kehancuran-kehancuran itu... tapi next time ya...?!!

:-P ~~~~


My SQL check duplicate value



1. Deteksi value yang dobel.
SELECT book_title, COUNT(*) c FROM `book` GROUP BY book_id HAVING c > 1;

2. Hapus salah satu value yang dobel.
DELETE n1 FROM book n1, book n2 WHERE n1.book_id > n2.book_id AND n1.book_title = n2.book_title;


3. That's it.

Friday, August 29, 2014

Magic (Dynamic) Virtual Host and Subdomain

Berikut ini cara membuat virtual host dan subdomain secara magic / dinamis.
Biasanya restart web server. contoh ubuntu -> service apache2 restart
Sekarang tidak perlu lagi restart webserver. Tinggal arahkan saja A Record pada Control Panel Domain ke IP address server.

Aktifkan dulu module berikut ini:
- vhost_alias
dengan cara :
$: sudo a2enmod vhost_alias

Buat symlink:


Bikin symlink biasa   -> ln -s {/path/to/file-name} {link-name}
Bisa AutoUpdate -> ln -sfn {/path/to/file-name} {link-name}

Magic Virtual Host:


$: cd /var/www/domains
$: ln -sfn /var/www/maheswara /var/www/domains/maheswara.com
atau
$: ln -sfn /var/www/maheswara maheswara.com

Edit httpd.conf atau apache2.conf atau site-avalable/*.conf


###################################################
NameVirtualHost *:80
UseCanonicalName Off
<VirtualHost *:80>
   VirtualDocumentRoot /var/www/domains/%0
    <Directory /var/www/domains>
       Options Indexes FollowSymLinks
      AllowOverride All
      allow from all
   </Directory>
</VirtualHost>
###################################################

Magic Sub Domain:


Kalau mau bikin magic sub domain harus ditentukan dulu domain utamanya.
Binggung juga sih, kalau virtual host dan subdomain dibarengin.
Belum nemu caranya. Mangkanya dibikin alternatifnya seperti dibawah ini.
Kalau kamu ketemu caranya tolong di share ya, di komentar bawah ini.. OK Bro?

Ini karena kedalaman subdomain sendiri berbeda.
misalnya :
- *.maheswara.com ===> ini kedalaman level 3, maka ditulis %-3
- *.maheswara.co.id ==> ini kedalaman level 4, maka ditulis %-4

Nah kalau yang ini perlu melakukan :ubuntu -> service apache2 reload
Tapi cuma sekali saja kok, yaitu ketika ada penambahan domain baru yang memerlukan sub domain secara dinamis/magic.
Oya, direktif ServerName gak usah di tentukan, karena sudah dikenali sama settingan di atas, dikasih pagar #ServerName maheswara.com, atau buang aja deh, biar gak ribet ngelihatnya...

###################################################
<VirtualHost *:80>
  ServerAlias *.maheswara.com
  VirtualDocumentRoot /var/www/domains/maheswara.com/%-3
</VirtualHost>
###################################################

Demikian.
Semoga bermanfaat.