Category: OS

Solve Windows 8 Disk 100%

Solve Windows 8 Disk 100%

After using Windows 8 for nearly 9 months, i realized Disk 100% usage for very long time was unusual. Here is solution to solve this issue. 1. Press Windows + R and type “services.msc” 2. Disable BITS Right click on BITS and select “Properties”: Disable it by : Reboot and you can see that disk …

+ Read More

Mysql drop all databases

Mysql drop all databases

Here is a quick mysql script to drop all databases except test and information schema : Go to mysql command-line and execute this : 1select group_concat(concat(‘drop database `’,SCHEMA_NAME,’`;’) SEPARATOR ‘ ‘ ) from information_schema.schemata where SCHEMA_NAME !=’mysql’ and SCHEMA_NAME !=’information_schema’;

Solve Java Application killed / closed in Ubuntu 13.04 Raring

Solve Java Application killed / closed in Ubuntu 13.04 Raring

After update Ubuntu 13.04 Raring, suddenly all Java based application like LibreOffice, Aptana, Eclipse, Netbeans get killed / closed without any-reason. To solve this : 1sudo apt-get remove libwebkitgtk-1.0-0 Kudos to : http://daddycat.blogspot.com/2013/05/when-eclipse-is-killed-after-ubuntu.html

Solve php fpm upstream sent too big header while reading response header from upstream

Solve php fpm upstream sent too big header while reading response header from upstream

When your php5-fpm and NGINX got this errors: 12013/07/22 09:55:20 [error] 10446#0: *5 upstream sent too big header while reading response header from upstream, client: 127.0.0.1, server: www.yodi.biz, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "www.yodi.biz" That’s meaning you need to resize your fastcgi buffers in our nginx.conf. In Ubuntu or Debian it’s located at …

+ Read More

Solve Nvidia on Lenovo z500

Solve Nvidia on Lenovo z500

This is quickfix how to get rid of errors : “You are not currently using a display attached to an Nvidia GPU”. Make sure you already install the latest Nvidia Driver (use updates) from Nvidia (not Lenovo). Then, checkout on Bios settings for graphics to use “switchable mode”. If everything is fine, now first step …

+ Read More

Ubuntu 13.04 Raring installation on Macbook Pro 7.1

Ubuntu 13.04 Raring installation on Macbook Pro 7.1

For the very first time, i’m very happy that Macbook Pro can works 100% on Linux (Ubuntu 13.04). I used to use Fedora 18 & 19, but there is problem in VGA (Nvidia 320M) installation. Also the driver nouveau can’t works well and gave bad influence in game development with OpenGL. But today, Nvidia 320M …

+ Read More

Outlook Custom Domain IMAP / POP3 Configuration

Outlook Custom Domain IMAP / POP3 Configuration

Here is a quick configuration IMAP and POP3 for Outlook custom domain email. Incoming Settings 12345Username: username@domain.com Password: password Port: 995 Security: Enable SSL Server: pop3.live.com Outgoing Settings 12345Username: username@domain.com Password: password Server: smtp.live.com Port: 587 Security: Enable TLS Done!

Solve Skype libQtWebKit.so.4 problem

Solve Skype libQtWebKit.so.4 problem

When install Skype 4 on Fedora 18, I got errors : 12error: Failed dependencies:         libQtWebKit.so.4 is needed by skype-4.1.0.20-fc16.i586 To solve this problem, I just need to install: 1sudo yum install qtwebkit.i686

Install Fedora 18 Medialess Macbook Pro Mountain Lion

Install Fedora 18 Medialess Macbook Pro Mountain Lion

Fedora 18 can’t be installed via CD / DVD or USB boot if you’re Mac OS X is mountain lion. Luckly, we still can use medialess. If you don’t have Fedora or Linux installed, you can start with Fedora 17 boot CD which it’s works perfectly (you need to install this first). Using medialess meaning, …

+ Read More

Development Debian Wheezy on Amazon EC2

Development Debian Wheezy on Amazon EC2

Here is complete guide to setup debian wheezy server in Amazon EC2. Remember to login using “admin” user, since “root” is not allowed by default. 1. Install software Add backports on “/etc/apt/sources.list : 1deb http://ftp.debian.org/debian/ wheezy-backports main 12sudo apt-get update && sudo apt-get upgrade -y sudo apt-get install nmap vim bind9 mysql-server mysql-client apache2  php5 …

+ Read More

Windows mysql command line

Windows mysql command line

To enable mysql command line in DOS or PowerShell in Windows 8, we just need update System Environment Variable and put MySQL bin folder into the PATH. 1C:Program FilesMySQLMySQL Server 5.6bin

Set Java 7 on Mac OS X Mountain Lion

Set Java 7 on Mac OS X Mountain Lion

We can use Java 7 JDK as default JavaVM in our OS X Mountain Lion. First, we need to install JDK 7 from Here. Check installed java by “java -version”. If we got this errors : 1Unable to locate an executable at "/Library/Java/JavaVirtualMachines/jdk1.7.0_21.jdk/bin/java" (-1) Then, we need to fix path by editing ~/.bash_profile : 1export …

+ Read More

Solve MySQL can’t be opened because it is from an unidentified developer.

Solve MySQL can’t be opened because it is from an unidentified developer.

When we install MySQL on MacOSX Mountain Lion, we might have this errors when clicking on MySQL pkg: 1“mysql-5.6.12-osx10.7-x86.pkg” can’t be opened because it is from an unidentified developer. To solve this problems, go to “Settings” and “Security Settings”. Unlock to make a change and select “Allow applications downloaded from” into “anywhere”.

Solve configure: error: no acceptable C compiler found in $PATH

Solve configure: error: no acceptable C compiler found in $PATH

When we need to compile or configure in Mac OS X, this errors might be occurs. 1configure: error: no acceptable C compiler found in $PATH To solve this problem, make sure we already have XCode installed in our Mac OS X. Then, launch XCode and click on “Preferences” menu. Go to “Download” Tab and Install …

+ Read More

Convert WebM into WMV to play in Windows Media Player

Convert WebM into WMV to play in Windows Media Player

Webfm is the movie format if we downloaded this from Youtube. In Fedora, we can convert this file into WMV using FFMPEG. Here is example command : 1ffmpeg -i Billboard.flv -vcodec libvpx -acodec libvorbis Billboard.wmv But if we got errors libvpx like thie: 1Unknown encoder ‘libvpx’ We can solve this “Unknown encoder ‘libvpx’” by remove …

+ Read More

Debian wheezy amazon can’t ssh on EC2

Debian wheezy amazon can’t ssh on EC2

When we already start new EC2 instance with debian wheezy, we realize that we can’t do SSH to server with SSH connection that offered by Amazon. 1Permission denied (publickey). SSH example: 1ssh -i east-micro.pem root@1xx.20.xx2.xx So, apparently in Debian Wiki, instead of using “root”, we should use “admin” to login into server. 1ssh -i east-micro.pem …

+ Read More

Install Python 2.7 Debian 6.0. Squeeze

Install Python 2.7 Debian 6.0. Squeeze

Here are guide to install Python 2.7 into Debian 6.0 Squeeze 1. Add new repo into “/etc/apt/sources.list” 1deb http://ftp.uk.debian.org/debian/ testing main contrib non-free 2. Update and Upgrade 1apt-get update && apt-get upgrade -y 3. Install python 2.7 and set as default 123apt-get install libc6-dev apt-get install python2.7 update-alternatives –install /usr/bin/python python /usr/bin/python2.7 10

Setup git server with Amazon EC2

Setup git server with Amazon EC2

We can setup git server on amazon ec2 intances using gitolite. Here is step to do: 1. Configure SSH config Create new file “~/.ssh/config” which contains your amazon EC2 hostname, user and PEM key location. 1234Host amazon Hostname 23.21.1xx.xxx User root IdentityFile /home/yodi/my-ec2-micro.pem With this configuration, we can login into EC2 instance with : “ssh …

+ Read More

Setup BitCoin on Fedora Linux

Setup BitCoin on Fedora Linux

Here is tutorial on how to setup bitcoin and start mining on Fedora 18 (Linux). First thing first, we need to download dependencies. 1. Install QT Since we will using Bitcoin client, it’s need QT to make it run. 1sudo yum install libQtGTL 2. Download BitCoin client for Linux Go to Bitcoin Download and pick …

+ Read More

Fix slow update query MySQL in Django Session table

Fix slow update query MySQL in Django Session table

After using new relic, i found there is query that took more than long time to finihed. After investigate, I found that “update query” on django session is the most expensive and slowest query. Here is the query: 1UPDATE `django_session` SET `session_data` = %s, `expire_date` = %s WHERE `django_session`.`session_key` = %s I’m wondering what the …

+ Read More

Solve Permission denied (publickey) EC2 to New Server

Solve Permission denied (publickey) EC2 to New Server

I use Debian AMI for this example. Suddenly, I can’t SSH into new server that created. Even worse, i can’t made SSH connection from one server to another server in Amazon EC2. Apparently, the problem is the way of make SSH connection. This is what Amazon EC2 suggestion: 1ssh -i my.pem root@<my-ip-address> And it give …

+ Read More

Solve MySQL Incorrect key file for table /tmp repair it in EC2

Solve MySQL Incorrect key file for table /tmp repair it in EC2

Today i got this errors while installing MySQL in my Debian : 1ERROR 126 (HY000) at line 1: Incorrect key file for table ‘/tmp/#sql_45cf_0.MYI’; try to repair it This errors usually refering for out of space in our server. I just replace server with new EBS which have more space. Then after doing “df -hT”, …

+ Read More

Ec2 fix ebs volume space

Ec2 fix ebs volume space

When creating new EBS from Snapshot in EC2, this EBS will using the old space. For instance, snapshot was 1GB and we launch new EBS with 5GB capacity. After attaching into EC2 server, we’ll find out that the space still the old one (1GB). To fix this EBS volume space, just use “resize2fs”: 1resize2fs /dev/xvda1

Top showing wrong amount of memory usage in server

Top showing wrong amount of memory usage in server

“Top” (Go to console and type top) became a handy tools to track what applications that currently running in our server. But, if we’re using it for showing how much actual memory usage in server, that’s WRONG! Why? First, see this screenshot of my Fedora with my total RAM is 3.6 GB: Top results (Free: …

+ Read More

How to draw cirle / ball objects in PyGame

How to draw cirle / ball objects in PyGame

There is a lack documentation about how to draw circle or ball in Pygame. Here is an example taken from my game source code: 123456self.ball = pygame.Surface((25, 25)) self.ballrect = pygame.draw.circle(self.ball, (0, 255, 0), (15 / 2, 15 / 2), 15 / 2) self.ball = self.ball.convert() self.ball.set_colorkey((0, 0, 0)) self.ballrect.topleft = [0, 0] self.screen.blit(self.ball, self.ballrect)

Setup httpd conf virtualhost apache in Fedora 18

Setup httpd conf virtualhost apache in Fedora 18

Configuring apache / httpd in Fedora 18 to works with custom folder like “htdocs” and do the directory listing index is a bit irritating. Here is the errors that you might be facing like: 1234AH01630: client denied by server configuration htaccess: allow not allowed here AH01276: Cannot serve directory /var/www/: No matching DirectoryIndex (index.html,index.php) found, …

+ Read More