Somewhere I Belong

All about geek's life


  • 首頁

  • 開源專案

  • 關於

  • 歸檔

  • 標籤

移除/停用 Ionic Splash Screen

發表於 9月 9 2015   |  

這幾天再開發 TNUA BUS APP iOS 版的時候,發現預設有惱人的 Splash Screen…

什麼是 Splash Screen ?就是一開啟 APP 他會跳出來顯示 LOGO 之類的那個玩意,然後過幾秒(或是等待背景程式預備狀態)後自動消失。

因為我把 TNUA BUS APP 定調為一個簡單速查的工具,這個過十分沒有必要。Google 了一下發現答案還滿多種的 = =+

於是找到了一個官方有提到的設定參數

Customizing the Splash Screen

直接在 Ionic 專案根目錄中的 config.xml 加入下方程式碼:

<preference name="AutoHideSplashScreen" value="true" />

打完收工。

UPDATE 2015/09/13: 原來上面的方式無法關閉(上次不知道為什麼鬼打牆ㄡ…)
要進 Xcode Project Setting 裡面修改把 Launch Screen File 清空,如下圖:

xcode remove splash screen

啟用 zram 在 Raspberry Pi 上

發表於 9月 8 2015   |  

有鑑於 Raspberry Pi 2 記憶體只有 1G,一個不小心可能程式就被 Kernel 發出 OOM 事件幹掉…

這邊就想到 2013 WWDC OS X 狂推猛推的神奇黑科技 (事實上卻是早在 Linux 好一陣子的 zram 技術來用,嘖嘖!)

zram 有利於嵌入式裝置、小筆電和其它相似的低端硬體裝置。這些裝置通常使用固態儲存,它們由於其原生性質而壽命有限,因而避免以其提供交換空間可防止其迅速磨損。此外,使用zRAM還可顯著降低Linux系統用於交換的I/O

  • zRAM,先前稱為compcache
  • Debian ZRam
  • zram: Compressed RAM based block devices
閱讀全文 »

Security of Things: 駭客年會 NANO Wargame 心得

發表於 9月 6 2015   |  

以往一直沒機會參加的駭客年會 (Hitcon),今年終於參與了!
本篇主要講一下這次有趣的 Wargame - Arduino Nano…

閱讀全文 »

AD-ZaiJian: 廣告再見

發表於 9月 5 2015   |  

起因

幾天前看到幾篇瀏覽器 AdBlock 以及其他外掛效能大戰,無意間看到一個有趣的專案:Pi-Hole (RASPBERRY PI AD-BLOCKER)。

原來是透過 dnsmasq 來提供 dns service (tcp/udp 53),並藉由網路上定期維護的幾份黑名單來阻擋域名解析…

Dnsmasq is a Domain Name System (DNS) forwarder and Dynamic Host Configuration Protocol (DHCP) (more information)

這樣就可以把廣告 擋在你的電腦之前;而不是先讀取完廣告,才將其隱藏或刪除網頁上的元素!

閱讀全文 »

自造:PTT 新文章、關鍵字 手機通知服務

發表於 8月 31 2015   |  

故事是這樣的…

常常在 PTT 上看到一些特價訊息或是好康活動文章,由於不是整天沒事幹守在板上所以每次看到訊息的時候可能都已經超過活動時間…Q_Q

於是誕生了…

閱讀全文 »

編譯小米 WIFI (mt7601) 給樹莓派使用

發表於 4月 28 2015   |  

安裝 Driver

繼上一篇自編 Kernel 後,其實我最主要的目的是希望把小米 WiFi 的 Driver 裝上…

下載我先前修改過(加入MIFI 的 usb device id)

λ ~/git clone https://github.com/imZack/mt7601.git

閱讀全文 »

Raspberry Pi 樹莓派編譯新核心

發表於 4月 27 2015   |  

前陣子在家門口踢到一個…

Raspberry Pi 二代目 Model B,然後就 過著開開心心的生活 開始想把一堆東西裝上去然後不知道要幹嘛!?書房的 Hub 滿了,所以我就要拿出之前買的 小米隨身WiFi 拿出來插上…

就會發現,什麼事都沒有發生。因為…Driver 沒有進 Kernel 根據非官方 Github 上的 Repo 顯示:

This repository is based on the original driver released by MediaTek which was rejected from Linux kernel because of the poor code quality.

嗯!所以展開自編之路…

閱讀全文 »

架設 NFS Server 共享檔案 (Debian/Ubuntu)

發表於 12月 22 2014   |  

Server

sudo apt-get install nfs-kernel-server

設定檔簡單設定一下

# /etc/exports: the access control list for filesystems which may be exported
# to NFS clients. See exports(5).
#
# Example for NFSv2 and NFSv3:
# /srv/homes hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check)
#
# Example for NFSv4:
# /srv/nfs4 gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
# /srv/nfs4/homes gss/krb5i(rw,sync,no_subtree_check)

/home/zack/Dropbox/project 192.168.1.69(rw,sync,no_subtree_check)

Client

安裝 nfs-common
apt-get install nfs-common

檢查 host 有開放那些掛載點
showmount -e 192.168.1.222

把 222 的 project 掛到本機來
mount -t nfs 192.168.1.222:/home/zack/project /home/zack/project

以上基本就搞定囉!

Mosquitto 如何訂閱 bridge 連線狀態?

發表於 12月 19 2014   |  

一般來說如果要得知 mqtt client 是不是離線了,可以透過 will message 來設定。但是 mosquitto 的貼心功能 bridge 要怎麼實現這個功能呢?

本來看使用說明 /$SYS 這部分沒找到,原來藏在 mosquitto.conf 的說明文檔中…

notifications [ true | false ]

If set to true, publish notification messages to the local and remote brokers giving information about the state of the bridge connection. Retained messages are published to the topic $SYS/broker/connection/<clientid>/state unless otherwise set with notification_topics. If the message is 1 then the connection is active, or 0 if the connection has failed. Defaults to true.

notification_topic topic

Choose the topic on which notifications will be published for this bridge. If not set the messages will be sent on the topic $SYS/broker/connection/<clientid>/state.

很明顯可以看出只要訂閱 $SYS/broker/connection/<clientid>/state 即可,上線會傳 0 反之就是 1

如此一來就不用自己做 keepalive 功能啦!

詳細說明:http://mosquitto.org/man/mosquitto-conf-5.html
$SYS/broker 詳細說明:http://mosquitto.org/man/mosquitto-8.html

Docker 運行在 ARMv7 (MOXA UC8100)

發表於 12月 19 2014   |  

暨上週參加完 Container Summit 後,這天下班前忽然手癢把之前還沒搞定的 Docker on ARMv7 (Debian 7.7 Wheezy) 再玩一遍…

閱讀全文 »
123…7
YuLun Shih

YuLun Shih

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