Archive of articles classified as' "tips"

Back home

A start job is running for raise network interfaces (5 mins)


I have encountered a problem with a Wifi-only Ubuntu machine to be waited as long as 5 minutes when booting. The error message show that “A start job is running for raise network interface”. This is burdensome.

Before jumping into fix the issue, there is a full documentation on this at –

I did simple Google and found a useful answer on Ubuntu forum




What I did is to modify 

$ sudo vi /etc/systemd/system/network-online.targets.wants/networking.service 

and changed like – 



It all worked great!

No Comments

[ubuntu] Consolas Font Install


1 Install package

2 Make and execute

  • Make

  • Content of

  • Execute script

3 Install consolas font

  • Execute font-manger and install fonts in temp dir

  • Install font
    • Click Install Fonts and select font files.


4 Remove temp dir and scirpt

5 External Link

No Comments

[ubuntu] Set a Real Time Photo of Earth


Himawaripy‘ is a small Python 3 script that fetches a near-real time picture of Earth taken by the Japanese Himawari 8 weather satellite and sets it as your desktop background.

Once installed you can set the app to run as a cron job every 10 minutes (in the background, naturally) so that it can fetch and set a realtime picture of Earth as your desktop wallpaper.

Because Himawari-8 is a geostationary satellite you’re only ever going to images of the earth as seen from above Australasia — but with real time weather patterns, cloud formations and lighting it’s still makes for spectacular scene, even if seeing things above the UK would be better for me!

Advanced settings allow you to configure the quality of the images pulled from the satellite , but keep in mind that any increase in quality will result in an increased file size, and a longer download wait!

Lastly, while this script is very similar to many others that we’ve covered over the years it is up-to-date and working.

Get Himawaripy

Himawaripy has been tested on a range of desktop environments, including Unity, LXDE, i3, MATE and a host of other desktop environments. It is free, open-source software but is not entirely straightforward to set up and configure.

Find all instructions on getting the app installed and set up (hint: there’s no one-click installer) on the project’s GitHub page.

Real time earth wallpaper script on GitHub

Install & Use


A few readers asked me to update this post with a line-by-line guide to using the app. All the steps are on the main Github page, but here they are anyway.

1. Download & Extract Himawaripy

Well this is the easiest step. Hit the download button below to grab the latest build of the script, and then extract it to your Downloads folder.

Download Himawaripy Master (.zip)

2. Install python3-setuptools

You’ll need to install this package manually as it does not come pre-installed on Ubuntu:

3. Install Himawaripy

In the Terminal app you need to ‘cd’ into the folder you extracted earlier and run the following install command:

4. Check it’s running and download the latest real-time image by running:

5. Set up a cron job

This step is needed if you wish for the script to run and update automatically in the background (if you’d rather you can update it manually by running ‘himarwaripy’ at any time)

In the terminal run:

Add the following new line (default is every 10 minutes)

The Ubuntu Wiki has detailed information on configuring cron.

You won’t need to keep running once you’ve checked that the app has installed. It will run automatically, every 10-minutes or so in the background.


No Comments

알고리즘 문제 풀이 : 자주 쓰이는 코드


* 초보자를 위한 추천 읽을꺼리 강의 자료에서 모음

1) 입력을 그대로 출력

2) 1 부터 n 까지 합

3) 간편한 최대 공약수 구하기

4) char 변수 연산

4-1) char <-> int 변환


4-2) 대소문자 변환

5) int 의 최대값과 큰 값으로 초기화 필요시

6) 문자열 세기

7) 숫자 하나씩 꺼내쓰기

9) 스택

10) 큐

11) 반올림
반올림에 대해서 따로 처리할 필요가 없다
.2f 는 소수점 셋째 자리에서 반올림한후 소수점 둘째 자리까지 출력하라는 의미

12) 덱 (deq)


1) 이분 탐색

2) 행렬을 이용한 그래프 표현

3) 행렬을 이용한 그래프 표현(가중치)

4) DFS – 인접행렬

5) DFS

6) BFS – 인접행렬

7) BFS – 격자

8) BFS – 나이트



2) MAX

3) MIN

4) ABS

5) Log 출력

6) 수행시간 측정

7) 나머지 연산

8) BigInteger for C++
C에서 BigInteger 사용에 관한 백준님의 추천링크

9) quick sort

10) merge sort


No Comments

Convert FLAC to MP3


high quality (320kb):

medium qualit (192kb)



No Comments

Turn Your Home Router Into a Super-Powered Router with DD-WRT


Disclaimer: this article was rooted from

Wireless is everywhere and routers are the force that makes it happen, so why not supercharge yours to take proper advantage of it? DD-WRT will let you boost your router’s range, add features, and more.

DD-WRT has a ton of features—more than we can cover in this guide, which is focused on helping you get your router upgraded. Stay tuned, as we’ll go into more depth in a couple more days on all the great things you can do with it, but even if you don’t use the additional features, DD-WRT is worth installing to make your router work better.

What Is DD-WRT?

netgear wnr2000v2

Here’s our router. Behold: the Netgear WNR2000, revision 2. It’s a mighty fine one, too, but it’s still not the best. Why, exactly? Your router is only as good as its firmware, the software that makes it tick. When you buy a router from Linksys/Cisco, Netgear, D-Link, or others, you’re bound to their software. It’s a nice arrangement; you respect their limitations, and they promise to help with your problems. But what if your warranty’s expired, or you want to shuck their limitations? Maybe you want to take your hardware and push it to its most extreme limits. That’s where DD-WRT steps in.

DD-WRT is an open-source alternative firmware for routers. Its software unlocks features that aren’t present on all routers: static routing, VPN, repeating functions, the list goes on. It also unlocks settings that aren’t accessible normally, like antenna power and overclocking.

Router Support

dd-wrt website 1

Turning your home router into an almost professional-level tool is a great project that has one major caveat: support. Not all routers are built or designed the same way. Even two of the same model can have different revision numbers with very different internal components. Because of this, the first step is doing plenty of research. It’s best to have a router that’s fully supported, so if you end up buying one, be sure to check the DD-WRT Supported Routers page first. Also make use of their Router Database, which will help you find particular instructions for your model and revision. Most devices have model and revision numbers on the back panel, and if there’s no revision number, it’s safe to assume that it’s 1.0.

For our purposes, the important spec to consider is NVROM, or ROM. This is where the firmware is kept, so even if your router has 16MB of RAM, it won’t work with a 4MB image of DD-WRT without at least that much ROM. Because of this, there are a few different versions of DD-WRT available at varying file sizes. Some are trimmed down to fit in smaller ROM configurations. Others are built with specific features in mind, like VPN, SD card support, or a Samba client. For more information, check out the File Versions table.


The most important thing in any project is research. Do all of your homework for this one, because (here it comes):

DISCLAIMER: Changing your router’s firmware can result in unintentional consequences, such as “bricking.” It’s unlikely, and we’ve never had a device that couldn’t be fixed in some way, but it’s important to understand that it’s a very real possibility. Just to be clear: you assume all responsibility for anything you do; we’re not liable for anything that should go wrong.

As mentioned above, start with the Supported Devices page to see if you’ve got a DD-WRT-friendly router. If you don’t see anything specific, or even if you do, check into the Router Database. Here, you’ll find links to forum pages of those who’ve completed the process for specific models/revisions, as well as the setbacks and workarounds they’ve found. Most importantly, you’ll find links to compatible versions of firmware.

forum post

The friendly forum gave us some useful info for our particular model. Our router, the Netgear WNR2000 is revision 2, which means it’s compatible (revision 1 is not). It’s only got 4MB of ROM, so we had to stick to the mini version. We followed the download links and read up on what to do to complete the procedure in full detail.

dd-wrt website 2

Almost all sources unanimously recommend three specific things:

  1. Do a hard reset on your router before you update. This usually requires a 30/30/30 procedure.
  2. Hard wire your router when you update the firmware. NEVER over wireless.
  3. Use Internet Explorer (or Safari) unless specifically stated that other browsers are okay.

There’s a ton of reasons which the documentation will reveal to you, but the first two are written in stone, and the last has held true for almost any router, and it won’t hurt either.

Most routers have a pinhole on their back with you need to push and hold to perform a hard reset. The 30/30/30 procedure is primarily directed for devices with DD-WRT already on them, but it’s also required for some other models and won’t hurt to do anyway. It deletes the Non-Volatile RAM. From the DD-WRT website, the procedure is as follows:

  • With the unit powered on, press and hold the reset button on back of unit for 30 seconds
  • Without releasing the reset button, unplug the unit and hold reset for another 30 seconds
  • Plug the unit back in STILL holding the reset button a final 30 seconds (please note that this step can put Asus devices into recovery mode…see note below!) [Note]

This procedure should be done BEFORE and AFTER every firmware upgrade/downgrade.

Do not use configuration restore if you change firmware builds (different svn build numbers).

The Process

Hard reset, as outlined above, or per the instructions for your specific router.

hard reset router

So after our hard reset, we waited for the lights to return to normal, and we hard-wired the router to our laptop. During this phase, we turned off the wireless connection so that just the wired connection to our WRN2000 was active. This prevents any mishaps and makes it simple to connect to the web-interface through the defaults.

wired router

Next, fire up Internet Explorer and go to your router’s default page, and log in.


Use the default username and password, usually printed on your device’s back panel or easily found on the internet.

router upgrade

Click on the Router Upgrade link.

choose image

Browse to the correct image and click Upload, and wait patiently. Very patiently. You’ll see the loading screen tell you to wait while the router reboots, and you’ll see the lights flash on and off for a while. Wait about five minutes, and err on the longer side. When you’re ready, log in to your router. DD-WRT’s IP address is, the username is ‘root’, and the password is ‘admin’.

You’ll be greeted with your brand new interface.

dd-wrt starter

UPDATE: Fellow How-To Geek writer, Aviad, pointed out that at this point, we need to do another hard reset/restore to factory default settings. This will solidify your DD-WRT installation and will prevent any issues that would come up otherwise. It’s mentioned in the block quote above, but to reiterate: perform another hard reset NOW.

If things didn’t work out, you may have had a “bad” flash. Your router may be bricked, but odds are you can recover from it in some fashion. The first place to check out is How to Recover From a Bad Flash, and the second is the DD-WRT Forum. As long as your do your homework and be precise with the instructions, you’ll be fine.

Now that you have DD-WRT on your router, here are a few other things you might find interesting:

How To Remove Advertisements with Pixelserv on DD-WRT

How To Setup a VPN Server Using a DD-WRT Router

And there’s more to come!

No Comments

bookmark sync with Samsung Internet 4.x


In case you are on with Samsung Internet 4.x, you might have wondered how you could best sync your PC Chrome bookmark with your Samsung Internet for Android on your Galaxy device.

Here are some of the tips you could take on!

  1. How to import bookmark data from PC Chrome, Opera, and Firefox
    • Install Samsung sync extensions on Chrome Web Store [1]
    • login using Samsung account, and sync.
    • check “bookmark > Samsung account > Desktop bookmark > Chrome”
  2. How to bookmark sync with Samsung account
    • Settings > Accounts > +Add Account > select “Samsung account” or “Firefox account” > select “Sync Internet”
No Comments

mac os x ._ files


Background & Problem

I always hated Mac OS X’s “._” files that are automatically created. I use Mac, Linux, and Windows machines at home, and they are all connected via samba. These files are created by the operating system to speed up searches, store metadata (data used by the os) about a folder preferences, etc. Windows and MacOS both.

The problem is that whenever I edit files using Macbook Pro, it creates a bunch of annoying ._* files to store, for example, .DS_Store file, in which I ended up searching and deleting all at once later, using Linux command : $> find \( -name ".DS_Store" -or -name ".Trashes" -or -name "._*" -or -name ".TemporaryItems" \) -delete

Note that .DS_Store files are hidden files created by Mac OS X in each directory you access with Finder and stores custom attributes of a folder like icon position and background images.

More descriptions can be found at

I have been in trouble with these files many years. I decided to find out how I can avoid this; here is the sample search results [1].


And, I realized that there can be two ways to avoid this thing –

  1. $> dot_clean $PATH  : this will manually delete ._* files including .DS_Store file.

  2. BlueHarvest

Also, these dot files can be placed in smb.conf so that it does not bother you when files are shared across networks and OSes.

Further Treatment

  1. Place the below configuration in each share of smb.conf file.
  2. Mac OS X treatment – run this command on Mac client

I have further searched that an Apple developer officially explained it via mailing list [2], but there seems a lot of arguments regarding this dot file – personally I hated this.


No Comments

monitor network traffic/usage


I just got a useful link from Koding site regarding network traffic monitoring tools –

No Comments

rsync is a way too slower than expected


I have several terabytes to transfer from a machine to another, and decided to use rsync but it was a mistake – it is too slow and took machine down several times – CPU was heated too much, ext4 file system got broken in the destination machine etc. The command I used was  $> rsync -avzh --progress /path/to/source/

I have suspected that rsync’s compression option contributed to this behaviour, so started to Google a bit and got a few related links



Looks like this command works better than the others so far –
$> rsync -e 'ssh -c aes128-ctr' -avP /source/


No Comments

denyhost for Ubuntu 14.04


Since I have upgraded my home server to Ubuntu 14.04, one of my favouriate packages, denyhosts, disappeared. I tried Google [1] to find out what has happened. I realised that denyhosts was removed from Ubuntu 14.04 as it has failed to maintain in upstream efficiently.

However, the spin-off denyhosts homepage still provides source code to download and build on your own –

To finish off installation on your system once you git cloned,

$ sudo python install

And, then,

Also, you need to change DENYHOSTS_BIN variable in /etc/init.d/denyhosts as below:

DENYHOSTS_BIN = "/usr/local/bin/denyhosts"


No Comments

Add additional port for SSH over Mac OSX


You can add additional listening port number other than 22 for ssh on Mac OSX by editing the ssh.plist file:

And, you can add the below block in the file:

So, the file looks something like:

No Comments

Tunneling SSH over HTTP(s)


Often, corporate firewalls and proxies only allow 80 and 443 traffic with excessive packet shaping rules applied. This is indeed pain in your bum if you are interested in doing something over the wall.

I have googled and find a few of interesting articles related to this topic though none of them are successful in my situation.


What I am not sure of is the way to mimic complete 443 web traffic used for SSH tunneling. Only this way I seem to detour our corporate firewall and proxy without a problem – currently these two hurdles cut traffic even if they are on 80 and 443 if it is not a real web transaction.

No Comments

Broadcom Corporation BCM4318 [AirForce One 54g] 802.11g Wireless LAN Controller


I recently have installed Ubuntu 13.10 64bit server image on a home machine with a PCI wifi card installed in it. Out of the fresh installation, it didn’t get recognized unfortunately – i.e., iwconfig nor ifconfig did not show wlan0, for example. The PCI wifi card that I have is (using lspci command):

I had to dig Google to find a solution which I summarized below. First, download the attached and unzip into ~/Desktop directory.

Then, you will be able to see wlan0 when you type iwconfig in console.

Later on, I found a better article at –

No Comments

How to Crop mp3 file with FFmpeg


FFmpeg is a powerful cross-platform codecs that can process audio/video inputs and outputs, but it is very complex to jump into straight away. I was trying to crop an mp3 file using ffmpeg, and discovered a simple way to do so with the following command.

  • -t crop after a specified number of seconds.
  • -ss crop until a specified number of seconds.
  • -acodec copy to maintain encoding and sampling rate as-is.
  • -i use file as an input file.


No Comments