蓋索林 Gasolin

人們總是高估一年可以完成的事,卻低估十年能完成的事


  • Home

  • Archives

  • Tags

  • Search

我的實體筆記本配置 (2019-Q1版)

Posted on 2019-02-23   |   794 words, 1 min. read | Comments:

為了平衡日常太依靠電子產品的趨向,前年開始就嘗試使用實體筆記本作一些紀錄,2018一月中開始嘗試養成更頻繁地使用實體筆記本的習慣。在幾經調整後,目前我使用B5方格筆記本做基礎,搭配不同的魔擦筆來作筆記。實體筆記本的好處是除了一般的紀錄,還可以隨意畫心智圖,黏照片,貼紙,蓋印章等。在紀錄的過程中,取得某種程度的內心平靜。

基本配置

  • 一本30~40元左右的 B5 方格筆記本
  • Storage.it 筆記本封套
  • 搭配5隻筆
    • Pilot FRIXION BALL Slim 0.38藍色筆桿 + 0.5 魔擦筆筆芯
    • Pilot HI-TEC-C coleto 雙色筆桿 + 0.38 紅/綠筆芯
    • Pilot FRIXION light 水藍色魔擦螢光筆
    • Pilot FRIXION COLORS 褐/黑色魔擦筆

頁面配置

在開始一本新筆記本時會做以下事

  • 右下角寫下隔頁的頁碼

順便了解這本筆記本有多少頁可寫

  • 索引頁

參考各種筆記術書籍,我在每本筆記本前幾頁會空出索引區,將筆記本內容索引起來,以便之後查找。

  • 寶地圖頁

貼上一些感覺幸福的圖片,和較中長期的目標

  • 子彈筆記符號頁

簡單的子彈筆記符號 (. 任務, x 完成, > 延期, ^ 開始, -> 跳頁 <- 續上頁) 個人的簡寫(B 看的書, Y Youtube, R 閱讀文章 M 看的電影 S 看的劇 A 透過 Audible 聽的書 P 透過 Podcast 聽的節目)

  • Future Log

接下來幾個月已預定的重要事項,比較細的還是用Google日曆。

  • 回顧頁

每本筆記本的最後一頁是回顧頁。分成Keep, Problem, Try三個欄位。邊寫邊補

  • Keep: 什麼習慣值得保持
  • Problem: 記筆記/生活的過程中遇到什麼問題
  • Try: 根據看到的問題,在下一本(或這一本)想嘗試的改善方法

內容頁

日記格式

  • 標題為 月/日, (可選加 天氣, 簡單總結)
  • 日計帳 (分作三欄:投資,消費, 花費)
  • 簡易工作日誌、當日聽到看到值得紀錄的文章,影片等
  • 看書的筆記、Quote、心得、照片、車票、門票等。
  • 日與日之間,加上分隔線。

偶而會到附近的超商或家樂福,將照片從手機傳到立可得快印機台,將四張照片印成一張4x6的照片(一張6元)印出,剪開貼到筆記本中。

檢討

大前研一力推A4大小的筆記本,可以較不被筆記本寬度限制地思考。

原來我也使用A4筆記本,但幾個月前以攜帶便利(Storage.it 筆記本封套最大只出 B5)為考量,改採B5大小。在使用幾個月後,現在確實感覺偏小,下一本我會考慮換回A4。

我也有做數位版的每月回顧筆記,若持續使用順利的話再來分享。

PS: 暫時還沒想好(也還沒需求)實體筆記該如何數位化。

Tuning for my daily Elementary OS Juno

Posted on 2019-02-22 | Edited on 2019-02-23   |   237 words, 1 min. read | Comments:

I’ve been use Elementary OS as my primary laptop OS over a year and have been written some posts for it. I Upgraded to Elementary OS Juno at December last year. Juno is based on Ubuntu 18.04, the experience is very positive. Most things works fine and not much things need to tune for daily usage.

Here’s my setup for my Dell XPS 13-9360 laptop.

1. Package installer

  1. Insatll Eddy on AppCenter instead of sudo apt install gdebi
  2. install essentials
sudo apt install software-properties-common git

## 2. Setup Fonts

$ apt instsall firacode

3. Pairing Bluetooth Mouse and Make right click works for Touchpad

The Bluetooth connectoin is basically stable. No need for extra setup.

To make right click works for Touchpad, go Settings > Mouse & TouchPad, select from MultiTouch to TouchPad in Physical Click section.

4. Saving Power

tlp is a good tool for auto power management and now it can be installed through the default repo.

sudo apt-get install tlp
sudo tlp start

5. Auto adjust color temperature

It’s build-in now.

Go Settigns > Monitor > Night Light to toggle it on.

6. Chinese Input Method

Instead of configure by yourself. It’s build-in now.

  1. Select Traditional Chinese during install Elementary OS.
  2. Enter System > Language & Area > Keyboard Setting > Input Method Settings.
  3. Remove all other IME except 新酷音 and it just works.

Interact Bitfinex API with Node-RED

Posted on 2019-01-07 | Edited on 2019-02-23   |   689 words, 1 min. read | Comments:

Imgur

Anticipate how API choices and abstractions impact the way other people would solve the problem
  • Designing very large (JavaScript) applications

There are many ways to access Bitfinex API to get most of Bitfinex exchange functionalities. For example, you can access REST API, websocket API, or call the language specific API library to eaze the interaction efforts. But in my opinion interact via Node-RED Bitfinex function block is the most easiest one.

Getting start with Node-RED and Bitfinex API

To get start, you can

  1. install Node-RED npm install -g node-red.
  2. Start Node-RED via node-red command, then go settings > Palette > Install tab in node-red
  3. search bitfinex to install this module.

Interact with Node-RED

Node-RED is a great way to interact with everything online, with a more intuitive interface.

To simplify the interaction with Bitfinex, I wrapped the Bitfinex function block for Node-RED, which makes bitfinex API very easy to access in Node-RED. You can visually show exchange data in node-red’s dashboard, mashup with other services, or trade from weird objects around your house.

For example, you can follow the screenshot to make below REST API work.

Imgur

Access websocket API is very simple as well

Imgur

You can use configuration block to put your apiKey and apiSecret.

Imgur

Visualize data with Node-RED dashboard

Once you got the data via bitfinex function block, it’s pretty easy to visualize value and diagram with Node-RED dashboard

Imgur

Imgur

One more thing

You may not know the tickers api) allow query multiple symbols at once, like rest.tickers(['tETHUSD', 'tBTCUSD']) and this functoin block supports multiple outputs as well!

Imgur

If you make something interesting with Bitfinex API and node-RED, please let me know! (You can share to https://github.com/gasolin/node-red-contrib-bitfinex/issues)

Other way to interact with Bitfinex API

For reference, You can learn more ways to access the Bitfinex API below.

Inreact with the REST API

We could read the API doc and find we can get the recent ETH/USD pair states via open the browser and visit https://api.bitfinex.com/v2/tickers?symbols=tETHUSD

We’ll get an minimal array as the returned data. Refer to the doc we know each column means:

[
// on trading pairs (ex. tBTCUSD)
[
SYMBOL,
BID,
BID_SIZE,
ASK,
ASK_SIZE,
DAILY_CHANGE,
DAILY_CHANGE_PERC,
LAST_PRICE,
VOLUME,
HIGH,
LOW
],
]

Then we can process the array to get what we want. For example, to access the last price of ETH/USD, we could find the result from array[0][7] (The first item in returned array denotes ETH/USD result array, the 8th item(the array count from 0 so its 7) in ETH/USD result array is the LAST_PRICE)

Interact with API library

But for more complicated interaction like place an order with authenticated API, we generally prefer to call language specific library to simplify the process.

The Bitfinex official doc listed several open source language specific libraries for developers.

For example, we can use nodejs/javascript to access Bitfinex API via Bitfinex’s nodejs API library

To install the library, call

$ npm install bitfinex-api-node

Then you can edit a demo.js file with content:

const BFX = require('bitfinex-api-node')
const bfx = new BFX()
const rest = bfx.rest(2)
rest.tickers(['tETHUSD']).then(tickers => {
console.log(tickers)
})

to get same result as directly call the REST API on the browser.

Though You may not know the node API build-in the data model mapping, which saves you from manually parsing the returned result.

All you need to do is pass { transform: true} parameter when access the bfx.rest method:

const rest = bfx.rest(2, { transform: true })

Then you can get value via ticker.lastPrice, ticker.high…

If you want to access authenticated APIs, just pass the apiKey and apiSecret when construct the bfx api instance.

const bfx = new BFX({
apiKey: '...',
apiSecret: '...',
})

The API call seems not hard but it did require some effort to make all works.

Disclosure: I am currently working on Bitfinex. Node-red-contrib-bitfinex is the personal project though.

12…170
gasolin

gasolin

508 posts
90 tags
RSS
HomePage Github SlideShare Twitter Read Watch Visited Tip Me
© 2005 – 2019 true
Powered by Hexo v3.8.0
|
Theme – NexT.Pisces v6.7.0