2015年9月23日 星期三

如何更新 D-Link 無線分享器 AP 的韌體 How to upgrade D'Link Wireless AP firmware

如何刷 D-Link 無線分享器的韌體? 不論是刷回原廠或是刷成蕃茄都適用。

1. 將 AP 電源關閉並拔掉電源線。
(Turn off WiFi AP, then unplug the power.)

2. 用筆尖按壓 Reset 鍵不放,插入電源線,等待電源燈持續閃爍。
(Use a sharp pen to press and hold the RESET button, then plug in power wired, until the power indicated light blinking.)

3. 先將電腦的區網 IP (LAN IP) 設為 192.168.0.2 ,然後插上 AP 的 LAN 端。
( Set the Intranet IP as 192.168.0.2, then plug the RJ45 network wired to LAN port.)

 

4. 這時候開啟瀏覽器,連至 AP 的 IP 192.168.0.1,此時就能看到 D-LINK 的畫面,選擇你要上傳的韌體。
(Now open your browser, connect to 192.168.0.1 that is your WiFi AP. You can see D-Link portal, to select the firmware you want to upload.)



5. 上傳後看到成功的畫面後重開機就成功囉!
(After uploaded, reboot the device will success.)

很~簡~單~吧
( So~ Ea~ Sy~)

2015年8月12日 星期三

Modify git alias (修改alias)


How do I alias commands in git?
http://stackoverflow.com/questions/2553786/how-do-i-alias-commands-in-git


我的 Git 偏好設定
https://ihower.tw/blog/archives/5436

lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit

[Ubuntu] 修改 bash ,讓 Terminal 不顯示主機名稱


總是覺得 Terminal 的畫面不夠寬嗎? 除了調整字體大小與視窗大小外,還可以透過修改 Bash 來節省空間。

以上圖為例,假使我不希望顯示長長的主機名稱,做法很簡單,只要修改 ~/.bashrc 來達成:

vi ~/.bashrc

找到變數 PS1 後,將 \h 刪除即可,記得重新開 terminal 或執行 bash 才生效。

其它可用的參數:

a : an ASCII bell character (07)
\d : the date in "Weekday Month Date" format (e.g., "Tue May 26")
\D{format} : the format is passed to strftime(3) and the result is inserted into the prompt string; an empty format results in a locale-specific time representation. The braces are required
\e : an ASCII escape character (033)
\h : the hostname up to the first '.'
\H : the hostname
\j : the number of jobs currently managed by the shell
\l : the basename of the shell’s terminal device name
\n : newline
\r : carriage return
\s : the name of the shell, the basename of $0 (the portion following the final slash)
\t : the current time in 24-hour HH:MM:SS format
\T : the current time in 12-hour HH:MM:SS format
\@ : the current time in 12-hour am/pm format
\A : the current time in 24-hour HH:MM format
\u : the username of the current user
\v : the version of bash (e.g., 2.00)
\V : the release of bash, version + patch level (e.g., 2.00.0)
\w : the current working directory, with $HOME abbreviated with a tilde
\W : the basename of the current working directory, with $HOME abbreviated with a tilde
\! : the history number of this command
\# : the command number of this command
\$ : if the effective UID is 0, a #, otherwise a $
\nnn : the character corresponding to the octal number nnn
\\ : a backslash
\[ : begin a sequence of non-printing characters, which could be used to embed a terminal control sequence into the prompt
\] : end a sequence of non-printing characters


參考來源
[1] How to: Change / Setup bash custom prompt (PS1) 
http://www.cyberciti.biz/tips/howto-linux-unix-bash-shell-setup-prompt.html


2015年7月28日 星期二

Ubuntu 開機時不想輸入密碼 How to Login Ubuntu Without Password

想要在開機時不輸入密碼,可以修改 /etc/lightdm/lightdm.conf 下的這行:
autologin-user=你的帳號
取消只要刪掉這行或用#注解或留空白即可


If you do not want to enter password when login ubuntu, edit /etc/lightdm/lightdm.conf
autologin-user=yourname
Cancel that just comment this line by # or remove it, or empty

2015年6月25日 星期四

[Android] Permission Denial when broadcasting Intent



When suffering the problem about Permission Denial, the LOG pattern might like this:
Permission Denial: broadcasting Intent { act=com.abc.intent.YOUR_INTENT flg=0x10 } from com.abc.myapp (pid=1191, uid=10119) requires com.abc.permission.APP_PERMISSION due to registered receiver BroadcastFilter{2463d6a8 u0 ReceiverList{d4f8ecb 695 com.android.systemui/10104/u0 remote:2fa2559a}}


It declaim the intent you broadcasting has no appropriate permission you used.

Now you can think about that any place has defined the permission before you used it?

You can check it by adb bugreport
adb bugreport > bugreport.txt


If you can find the following patterns in report you output, it means your device has granted the permission:
Permissions:
  Permission [com.abc.myapp.permission.WRITE_SETTINGS] (39f2d3cc):
    sourcePackage=com.abc.myapp
    uid=10124 gids=[] type=0 prot=signature|system
    packageSetting=PackageSetting{4b48615 com.abc.myapps/10124}
    perm=Permission{af5ad2a com.abc.permission.APP_PERMISSION}

If not, it means you don't have the permission cause you suffering Permission Denial.



2015年5月22日 星期五

Asus Nexus 7 can't find device in adb debug mode.


Asus Nexus 7 cannot found in Android device chooser.
Besides, adb devices also not list in.

The root cause is computer can not recognize your device (Nexus 7),
When device plugged in computer, it will make a selection of MTP / PTP

If you didn't see the dialog, you can find it in:
Settings --> Storage --> Top Right Option (Computer USB Connection) tap--> choose MTP
Note: I can success in recognize device in choose PTP mode, too.

如果你的 Asus Nexus 7 插上電腦後怎麼通都找不到 Debug  裝置,除了先打開偵錯模式外,也有可能是你沒有選擇 MTP 或 PTP 模式,從
[設定] --> [儲存空間] --> 右上角選項 (USB電腦連線) --> 選 MTP
但有時候 PTP 也能抓到裝置,呵呵。

2015年3月12日 星期四

Ububtu iBus icon disapear 圖示消失

某一天 iBus 的圖示突然消失了,害我心慌慌,雖然仍然可以打字,但是你知道人對於未見的東西總是有恐懼感,而且很不方便。

在網路上找到以下方法‥



killall ibus-daemon (結束程序)
ibus-daemon -d (重啟ibus)

ibus-daemon -d -x -r

資料來源:http://blog.sina.com.cn/s/blog_4d3559c701012lem.html

2015年1月29日 星期四

Update Google Chrome in Ubuntu

參考這裡(ref here )http://superuser.com/questions/130260/how-to-update-google-chrome-in-ubuntu
You must have http://dl.google.com/linux/deb/ in repo list
Now open a terminal. Type following -
sudo apt-get --only-upgrade install google-chrome-stable
This will install the current stable version of it. Now you have to kill all instances (may be hidden) of old Google Chrome.
sudo pkill -15 google-chrome
sudo pkill -15 chrome
Then start google-chrome as you start it.