2016年9月22日 星期四

[JAVA] Parsing JSON

最近要在 Android5.1 上處理 JSON 格式的 HTTP request

記錄一下心得

1. 會使用的下列 class

import org.json.JSONException;
import org.json.JSONObject;
import org.json.JSONArray;

[MAC] Bash Configuration

environment : MacBook Pro @ OS X EL Capitan Version 10.11.6

1. create ~/.bash_profile and ~/.bashrc

I mainly use .bashrc but there are some programs will use .bash_profile.

Therefore, I also create .bash_profile and the only functionality of .bash_profile

is redirecting to .bashrc.

Here is the .bash_porfile

# use bashre
if [ -f ~/.bashrc ]; then
    source ~/.bashrc
fi

2. Some configurations of ~/.bashrc

[TOOL] tmux Configuration

environment : MacBook Pro @ OS X EL Capitan Version 10.11.6

1. Use homebrew to install tmux
brew install tmux
2. Configure
modify the ~/.tmux.conf
(1) 將控制鍵從 Ctrl+b 改成 Ctrl+f
# Use something easier to type as the prefix
set -g prefix C-f
unbind C-b
bind C-f send-prefix

2016年7月7日 星期四

[SSH] SSH Login Without Password

每次要用 ssh 連線遠端 server,都還要打一次密碼

想要省掉這個步驟,改用 key 的方式來登入

1. 在自己的電腦,輸入以下指令

ssh-keygen -t rsa or ssh-keygen -t rsa -b 4096
可以更改 filename,但記得不要設定 passphrase,直接 enter過去就好

2016年5月27日 星期五

[IDE] Sublime Text 3 - Add new language and syntax

之前習慣使用 notepad++,來自訂一個自己的語法以及 syntax highlight rule

現在工作環境換到MAC上,打算改用 sublime 來做記錄

這邊紀錄一下,怎麼新增 language 和 syntax rule

1. 參考網址

   首先用 package control 安裝 PackageDev

2016年5月16日 星期一

[NodeJs] NodeJs Access Google Spreadsheet

這次紀錄一下怎麼使用 Node 來存取 Google 的 spreadsheet

1. 到 https://console.developers.google.com/project 並建立專案


   在創建專案的時候,google 會和你說此專案的 ID 是什麼

2016年4月23日 星期六

[MEAN_STACK] miniERP - Development Log 5 : Leave Epaper

這次是要增加假單的功能

功能有: 選擇假別、選擇天數、選擇代理人、選擇簽核人

並且可以發送 email 通知來簽核,以及更改主頁功能

會有四個子頁面 : 我的所有表單、我簽核過的表單、等代簽核的表單、需要我簽核的表單

基本實做的方式和觀念,和前面部分都一樣

這邊主要記錄一些比較特別的部分