2016年12月28日 星期三

Node.js

  • Node.js® 

    1. a JavaScript runtime built on Chrome's V8 JavaScript engine
      • 一種用JavaScript寫的virtual machine (translator)
    2. uses an event-driven, non-blocking I/O model that makes it lightweight and efficient.
    3. npm (package ecosystem) is the largest ecosystem of open source libraries in the world.

  • General

    • install: Node.js v7.3.0 and npm v3.10.10
    • JavaScript
    • NVM (Node Version Manager), nave

  • Web

  • Database

    • mongoDB
    • mongoose

  • Multimedia 

    • fluent-ffmpeg
    • image-ninja
    • sharp
    • GraphicsMagick
    • ImageMagick
    • canvas


  • http://cnodejs.org

2016年12月26日 星期一

The BAR

Samuel J. Tilden
Memorial read before the Association of the bar of the city of New York,
Tuesday, December 14th, 1886

The bar,
if it is to continue to exist,
if it would restore itself to the dignity and honor which it once possessed,
must be bold in defence and,
if need be, bold in aggression.

2016年12月20日 星期二

Keynote, Page如何從裡面抓圖?

常常投影片打完,要用到裡面的圖或影片時,不知道怎麼取出來.
圖會用土法煉鋼,"command+shift+4"截圖到桌面,影片就...

其實這些資料在Sierra的Mac OS中都是可以直接用的:

1. 在Finder中複製一個原檔(點雙指後選"Duplicate", or "command+C", "command+V")
2. 將"xxx copy.key"改名為"xxx copy.zip" (會跳出視窗要你確認)
3. 點兩下"xxx copy.zip",解開後看到一個"xxx copy"的資料夾
4. 那一堆圖、影片等,就在Data下面

省下一堆時間!

參考

2016年12月13日 星期二

MT7688 Firmware


Build from source

Document

 

Environment

  • 用MBP跑VirtualBox (ubuntu 14.04),跑了三小時還沒跑完...找台電腦灌native Linux較實在!
  • Host: 14.04.3 LTS

Source

  • LinkIt Smart 7688 firmware v0.9.4
  • OpenWrt Linux distribution (Chaos Calmer 15.05.1)
firmware$ git clone git://git.openwrt.org/15.05/openwrt.gitbin/ramips/openwrt-ramips-mt7688-LinkIt7688-squashfs-sysupgrade.bin

bootloader$ git clone https://github.com/MediaTek-Labs/linkit-smart-uboot.git

kernel packagebin/ramips/packages/base/

Buttons (MPU, WiFi buttons) 的使用

F/w upgrade — USB
  1. 按住WiFi button
  2. 按一下MPU button後放開
  3. WiFi燈熄掉後 (or 按住至少 5sec)再放開WiFi button
Reset MPU
按一下MPU button

切換到AP mode
按住WiFi button 至少5 sec後再放開
http://192.168.100.1/

Cross-compile C/C++

  • Openwrt-SDK-LInkit
    • package  (source code)
      • helloworld
        • Makefile
        • src
          • Makefile
          • helloworld.c
    • build_dir (executable binary)
      • target-mipsel_24kec+dsp_uClibc-0.9.33.2
        • helloworld
          • helloworld
    • bin  (install package)
      • ramips
        • package
          • base
            • helloworld_1.0.0-1_ramips_24kec.ipk


在 Openwrt-SDK-LInkit 目錄下
> make V=99

執行executable binary
產生的
executable binary在 build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/helloworld 下

確認產生的executable binary格式
> cd build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/helloworld
> file helloworld


executable binary upload到Linkit Smart中> scp helloworld root@mylinkit.local:/root

登入Linkit Smartssh root@mylinkit.local> .helloworld

安裝package> cd bin/ramips/package/base> scp helloworld_1.0.0-1_ramips_24kec.ipk  root@mylinkit.local:/root

登入Linkit Smartssh root@mylinkit.local> opkg install



2016年12月4日 星期日

Mac Xcode


Xcode 8.0

$ ruby -v
ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16]

$ pod --version
1.1.1

$ sudo gem which cocoapods
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.1/lib/cocoapods.rb


sudo gem install -n /usr/local/bin cocoapods


Melange -- Bad Land



利吉惡地, 利吉月世界