Kuan-Ying Chou's Blog---
TechCrunch Disrupt SF Hackathon2015-09-21 #hackathon #HackDisrupt #androidLast weekend I went to San Francisco for TechCrunch Disrupt Hackathon, my first hackathon here in the US. It’s an exhausting event. You have to form a team of no more than 5 people and deliver something in less than 24 hours. All the code has to be written on site. No cheating allowed. Pier 70. Lots of hackers in one place: I met my teammates, Devin and Jesse, while waiting for the event to start. They are only in 10th grade and Devin had already attended 8 hackathons! Jesse and Devin (left to right), with nerdy glasses they got from one of the sponsors: I wanted to create a character drawing app that can let people keep and share their handwriting of Chinese characters. Users can create their characters with fingers or stylus, share them, and “like” other people’s creations. It’s like an Instagram for Chinese characters. Be sure to bring an extension cord with you. It will come in handy! The hacker in front of me looked really serious. He ignored all the sponsors and networking and started coding immediately once he found a seat. I decided to follow his approach. Real hacker at work. Did you see the flame in his eyes? Dinner served at 7 but the waiting line was super long. I got mine at 8. It was good though: My teammates in the middle of the night: One o’clock in the morning: After coding for 12 hours. I started to feel sick and wonder why I’m here in the first place. I decided at the time that hackathons are really not a thing for me. I saw people putting their chairs on the table and thought that might be a good idea. Instant standing desk, save your butt and keep you awake: The sunrise of the next day: In the end Jesse made an iOS app with Swift 2, Devin made a Restful API with Ruby, and I made an Android app. However, we were too tired to integrate all of our works. Here are some screenshots of my app. Write a character: Various pressure levels: Browse all your characters: You can find my code here. 11 AM. After all the hacking, it’s show time! Big cameras: Big screens: It’s my turn! I felt great wearing that cool microphone and my demo would be awesome, right? Nope, it was terrible. I quickly ran out of time without writing a single character on stage and Jesse didn’t get the chance to demo his stuff(really sorry about that). But I kind of love it. It’s really an honor to be among these real hackers who know their trade and actually deliver. And for the first time in my life, I felt so close to being recognized. No one cared about where you come from or which company or school you go to. As long as you can make something, you get one shot, and the possibility is thrilling. I’ll do better next time. Last Updated: 2015.9.27 C++ Variable-Length Arrays2015-08-01 #c++ #vlaAnother letter I wrote to my C++ classmates at UCSCx.
C++11 Enums2015-06-27 #c++Below is a letter I wrote to my C++ classmates at UCSCx.
Vagrant 快速上手2014-08-14 #vagrantVagrant 是一個虛擬機的自動化工具,可用來生成、管理VirtualBox 機器[1]。只要幾個指令,就可以在電腦上產生一台可使用的虛擬機,比起直接操作VirtualBox 簡便許多。需要在工作上使用Linux(系統管理、Android 建置等)或想學習Linux 的夥伴可以試試看。 使用方法: 1. 到這裡下載、安裝: http://www.vagrantup.com/downloads.html 2. 打開命令列(Windows 上可用git bash 或cmd),移到想要的工作資料夾,執行下面的指令:
幾分鐘後,一台64 位元的Ubuntu 14.04 虛擬機就下載、安裝好並開好機了。 3. Vagrant 預設不啟動虛擬機的螢幕,可以用ssh 連進去看看:
執行後就會看到虛擬機的prompt: guest 內的/vagrant 資料夾會自動和host 的工作資料夾同步。例如在guest 內執行:
host 馬上就可以看的到。 進階的功能可參考官網的文件。 [1] Vagrant 也可用來管理其他虛擬工具,如VMware 或Docker。 完美的部落格解決方案(二):Jekyll + Github Pages2013-11-19 #github-pages #jekyll #liquidGithub Pages 是Github 提供的網站託管服務,用來建立專案、個人或組織的網頁。當然,我們也可以利用它製作比Calepin 更有個人特色的部落格。 Github Pages 的用法相當簡單,只要在Github 上建立一個叫 由於Github Pages 只支援靜態網頁,無法動態地執行伺服器端的程式碼,因此必須預先把網站產生好。為了自動產生網頁,我們可以用Calepin 所使用的網頁產生器Pelican(以Python 實作,名字和做鋼筆的百利金Pelikan 差一字),並將產生出來的網頁推到Github 上。不過,我們也可以使用Github Pages 內建的網頁產生器Jekyll(讀音如「傑可」)。 Jekyll 是一套以Ruby 實作的網頁產生器,由Github 的執行長 Tom Preston-Werner 等人開發。我們不必上傳完整的網站,而是將部落格的文章(一樣可為Markdown 格式)、模版,和CSS 樣式推到Github,Github 便會自動用Jekyll 產生出網頁。 使用Github Pages 和Jekyll 的發文流程類似Calepin。兩者的文章皆可以用Markdown 格式儲存(Jekyll 另支援Textile)。發文前,Github Pages 的文章要放在專案根目錄的 和Calepin 一樣,文章的開頭也需要放入一些描述文章的資訊,稱為「front-matter」,格式是YAML,用三個減號(dash)包圍。因此一篇文章長得像這樣:
Jekyll 支援一套叫做Liquid 的模版語言,其語法並不難。例如,若要印出所有文章的標題和連結,我們可以寫個簡單的迴圈:
而若要在多個頁面中放進同樣的模版,如一致的頁首和頁尾,我們可以將這些模版放在部落格根目錄下的
網路上已有許多關於Jekyll 和Github Pages 的介紹和教學,可參考下面的連結。 |