Somewhere I Belong

All about geek's life


  • 首頁

  • 開源專案

  • 關於

  • 歸檔

  • 標籤

Uber Now - Pebble watchapp (已下架)

發表於 8月 24 2014   |  

2015/08/13 Update: 今天一早收到 Uber 法務寄給 Pebble 的信,大致上是說本 APP 侵害商標所以就被下架囉~是說好像 Pebble 前陣子推出一款綜合的交通 Watch App 呢!Anyway, Goodbye Pebble.

隨著 Uber API 的開放,相信各種應用會隨著雨後春筍般地冒出!?

身為 Uber 愛好 & 使用者的我怎麼能不做點什麼呢…

閱讀全文 »

Pebble Watch App - Taipei Bus 台北公車時刻

發表於 8月 18 2014   |  

繼上一篇台北公車 API,擁有了公車時刻資訊後我就可以專心開發 Pebble Watch 的程式了!一開始感覺開發手錶 APP 好像挺難的,看到有個 Opensource 專案 pebble-my-data 主要是可以讀取 server 上的 .json 資料 然後顯示在手錶上!

閱讀全文 »

台北公車 API (僅供開發測試用)

發表於 8月 12 2014   |  

這幾天在開發 Pebble Watch 的公車時刻表 APP,就順手做了一個簡單的 Parser。主要是直接抓取 pda.5284.com.tw 的內容。

注意:請勿直接抓取網頁當作 APP 後端使用,市政府有合法申請介接管道

安裝

  • NPM 位置 https://www.npmjs.org/package/taipei-bus
  • Github https://github.com/imZack/taipei-bus
npm install taipei-bus

使用

var bus = require("taipei-bus");

bus("642", function(error, data) {
if (error != null) { /* if error */
console.log(error);
console.log(data);
return;
}
console.log(data);
});

希望可以幫助到想要開發公車相關 APP ,在前期可以先利用這個簡單的 Library 用來評估的開發者們。

Google 將 SSL 列入排名計算

發表於 8月 11 2014   |  

前幾天看到 Google 在 Webmaster Central Blog 發布 HTTPS as a ranking signal,主要是說…

We’ve seen positive results, so we’re starting to use HTTPS as a ranking signal. For now it’s only a very lightweight signal — affecting fewer than 1% of global queries, and carrying less weight than other signals such as high-quality content — while we give webmasters time to switch to HTTPS. But over time, we may decide to strengthen it, because we’d like to encourage all website owners to switch from HTTP to HTTPS to keep everyone safe on the web.

隨後,知名 CDN 廠商 CloudFlare,也發布了一則消息…Google now factoring HTTPS support into search ranking

In the meantime, if you want a quick way to boost your Google ranking, upgrading to any paid CloudFlare account will enable HTTPS by default. Even before we make it free, it’s already the fastest, easiest way to get HTTPS support on any site.

只要升級任一方案,就有 SSL 可以用囉!有點心動…有人有使用心得嗎?

IRC 與開發者直接互動

發表於 8月 5 2014   |  

前幾天用 IONIC 寫了兩個 APP 北藝大校車 跟另一個還沒釋出…

看著文件發現有個小錯誤,理所當然的就發了一個 PR (Pull Request)

結果過了三四天好像都沒看到動靜 A_A ,就忍不住厚臉皮地跑上去 IONIC 的 IRC 頻道戳戳看有沒有人理我 XD

00:30 < YuLun> any one could merge pull request about ionic-site?
00:31 < maxlynch_> YuLun: link?
00:31 < YuLun> maxlynch_: https://github.com/driftyco/ionic-site/pull/204
00:32 < maxlynch_> YuLun: hah, done :)
00:33 < YuLun> maxlynch_: cool, you guys are aweome thanks!

哈,結果馬上就被 merge 了。要融入國外開放原始碼專案似乎得必須習慣使用 IRC 了?

Parse.com REST API 搭配 Restangular

發表於 8月 4 2014   |  

這幾天想搞一個簡單的應用,想說體驗一下 BaaS 的服務…看看是不是真的這麼方便易用?耳聞 Parse.com API 做得不錯,又被 Facebook 收購。想必應該品質有保證?讓我們繼續看下去…

閱讀全文 »

刪除 Twitter 所有 Tweets (Python)

發表於 7月 26 2014   |  

之前就一直很想整理那個亂亂的 Twitter 帳號,苦無方法一次可以把全部以往訊息刪除的工具!
因為以前都亂連動一些有的沒的社群網路,整個舊有點髒髒,上網搜尋到幾個輔助網站也沒啥鳥用!剛好看到這位 Dave Jeffery 寫的小巧 Python Script 來達成任務

事前準備

  1. Twitter App 你可以到這邊申請
  2. Python 2.5+
  3. Tweepy sudo pip install tweepy
  4. Oauthlib sudo pip oauthlib
  5. 上面那段 Script git clone https://gist.github.com/113241.git

動手開幹

接下來把 Script 中的 CONSUMER_KEY 與 CONSUMER_SECRET 換成你剛剛申請 Twitter APP 的。然後執行 python delete_all_tweets.py

他就會出現提示Authenticate at XXX(你的帳號) and then enter you verification code here > 後面會接 oauth 的網址,點下去按授權會拿到一組 verify code,貼上來按 Enter

接著他會確認你是否真的要刪除,輸入 yes (大小寫沒差)。之後就會跳出

Deleted: XXX
Deleted: XXX
Deleted: XXX
Deleted: XXX
Deleted: XXX

等待他執行完畢後,你的帳號就乾乾淨淨囉!

華碩 N16 無線網路連不上 (IGMP、中華MOD)

發表於 7月 23 2014   |  

今天早上因為颱風的關係跳電兩次,家裡面的 RT-N16 忽然失億了…於是我就被我媽叫起床修理,因為他們起床發現沒有網路快要抓狂了。囧rz…

把 AP 重開後確認他的確是失億了,原本的設定都消失了。大概是 Nand flash 不正常斷電損毀後他自動復原吧?(瞎猜),總之我就把 Hinet 小卡片帳號密碼打上,常用設定設好後…發現 WIFI 怎麼看的到吃不到,一直連不上!

由於我家網路架構比較特殊,為了要有 Gbps LAN 以及 MOD 正常使用並且不干擾其他裝置

線路圖如下:


牆壁網路孔 <---> SWITCH <---> MOD, 小米盒子, Apple TV (都是 DHCP)
|
|
|
ASUS N16 <--WAN and LAN 各接一條--> 中華電信小烏龜
|
|
PC (DHCP), NAS (PPPoE 自己撥號取得固定 IP)
  1. 其中小烏龜停用 DHCP 功能,統一由 N16 配發。
  2. 小烏龜設定 PORT ISOLATION 功能,將與 N16 LAN/WAN 兩孔隔開
  3. N16 內部網路設定(LAN) - IPTV 中的 啟動群播路由、Enable efficient multicast fowarding 一定要一定要一定要打開,今天我就是忘記打開所以 WIFI 一直連不上。這個要是不開 MOD 的廣播封包會把你的網路炸爛…

    想不到遇到有人接法跟我一樣,然後遇到一樣問題

筆記一下,免得下次 N16 罷工我又忘了怎麼設定…

MySQL 匯出成 *.CSV

發表於 7月 14 2014   |  

要把 MySQL 倒出來…以前只會傻傻用 phpmyadmin 來做這檔事…(也好久以前了啦!

稍微記錄一下這次的內容方便未來使用

SELECT *
FROM tag_value_tbl
WHERE `acquire_time` > '2014-03-01 00:00:00'
INTO OUTFILE '/tmp/meterdata.csv'
FIELDS TERMINATED BY '\t'
ENCLOSED BY '"'
LINES TERMINATED BY '\n'

基本上就是設定 INTO OUTFILE FIELDS TERMINATED BY ENCLOSED BY LINES TERMINATED BY 這些變數,前面當然就是你要 select 那些東西塞進去檔案。

ionic 之第一次安裝就失誤 Unable to add plugins

發表於 7月 4 2014   |  

今天忽然看到有人分享 ionic 相關訊息,一時手癢想說來玩一下,沒想到就碰壁了…

先聲明以下環境是 Windows 8.1 64-bit,我按照官方網站上面的指示

$ npm install -g cordova ionic

結果不知道為什麼,我直接在開始選單執行 Node.js command prompt系 統會說權限不足(Try Administrator),我自己開 cmd 就可以,也許這是種下之後安裝錯誤的種?

第二步要開新專案,有 blank, tabs, sidemenu 三種可以選,想說來個 tags 好了…

$ ionic start myApp tabs

結果…

H:\Dropbox\project\mobileapp>ionic start newapp tabs
Running start task...
Creating Ionic app in folder H:\Dropbox\project\mobileapp\newapp based on
tabs project

DOWNLOADING: https://github.com/driftyco/ionic-app-base/archive/master.zip

DOWNLOADING: https://github.com/driftyco/ionic-starter-tabs/archive/master.zip
Initializing cordova project.
Fetching plugin "org.apache.cordova.device" via plugin registry
Fetching plugin "org.apache.cordova.console" via plugin registry
Fetching plugin "https://github.com/driftyco/ionic-plugins-keyboard" via git clo
ne
Error: Command failed: fatal: could not create work tree dir 'C:\Users\YOURUSERNAME\AppD
ata\Local\Temp\plugman\git\1404399211161'.: No such file or directory


at ChildProcess.exithandler (child_process.js:647:15)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:753:16)
at Process.ChildProcess._handle.onexit (child_process.js:820:5)
ERROR: Unable to add plugins. Perhaps your version of Cordova is too old. Try up
dating (npm install -g cordova), removing this project folder, and trying again.

Exiting.

errr….我不是剛剛才裝了 Cordova 嗎?怎麼可能過期阿!於是上網找尋一下,發現有人情況跟我一樣,他的解法是:

以下為關鍵片段,沒有這個目錄或檔案…通常是在不存在的資料夾下產生檔案2k7
情況會出錯,所以他老兄就手動幫他建立了 C:\Users\YOURUSERNAME\AppData\Local\Temp\plugman\git\

'C:\Users\YOURUSERNAME\AppD
ata\Local\Temp\plugman\git\1404399211161'.: No such file or directory

然後再執行一次…

H:\Dropbox\project\mobileapp>ionic start newapp tabs
Running start task...
Creating Ionic app in folder H:\Dropbox\project\mobileapp\newapp based on
tabs project

DOWNLOADING: https://github.com/driftyco/ionic-app-base/archive/master.zip

DOWNLOADING: https://github.com/driftyco/ionic-starter-tabs/archive/master.zip
Initializing cordova project.
Fetching plugin "org.apache.cordova.device" via plugin registry
Fetching plugin "org.apache.cordova.console" via plugin registry
Fetching plugin "https://github.com/driftyco/ionic-plugins-keyboard" via git clo
ne

H:\Dropbox\project\mobileapp>

結案,結果 APP 還沒開始寫…(暈

source: Unable to add plugins. Perhaps your version of Cordova is too old

1…4567
YuLun Shih

YuLun Shih

66 文章
6 分類
122 標籤
RSS
Creative Commons
© 2016 YuLun Shih
由 Hexo 強力驅動
主題 - NexT.Mist