Showing posts with label google. Show all posts
Showing posts with label google. Show all posts

Jan 2, 2012

使用 TOTP 與 Google Authenticator 實作 Two-Factor authentication

在食衣住行育樂都需要的網路的時候,現代人擁有許多網路帳號,但能記憶的帳號密碼通常只有少數組合,當遇到密碼外洩(e.g.資料庫外洩、病毒側錄密碼),相對的也影響了使用共同帳密的網路服務,對今日資安事件逐漸從惡作劇變往金融犯罪的趨勢,帳號有操作功能,個資,身份(實名化),對盜竊者來說帳號密碼可以產生許多價值。

帳號盜用除了個人影響外,間接牽連的還有親友與網路服務提供者,對網路服務提供者而言,帳號盜用是會提高營運成本與降低使用者信賴度的麻煩事,因此面對使用者規模與服務品質,強化帳號安全逐漸成為不可忽視的事情,Google 於去年底開始提供 2-step verification 做多層次的帳號驗證,別於以往硬體 OTP 的方式,透過 Smartphone 使用軟體(i.e Google Authenticator) 來規模化佈署。

目前得知使用類似軟體驗證機制的服務提供者有


在 Server 端的實作驗證流程不難,未來可能會變成一種常見的帳號驗證方法。

以下參考國外部落格文章與 Google Authenticator Android原始碼 實作 Two-Factor authentication 驗證流程,並釋出伺服器端原始碼


Feb 4, 2009

How to create kmz with picture icon

1. Take pictures and star GPS logger
2. Write geo-information to pictures(To reference posted article:GPS 記錄器、相簿、工具、節點編輯...)
3. Launch Friendly Flicker
4.open a text file and put into below text and save to doc.kml(UTF8 format)
doc.kml

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.1">
<Document>
<name>Recent Uploads with geodata</name>
<open>1</open>

</Document>
</kml>

clip_image002
image
5. click tab “選項”then select all options.
image
6.Select “清單顯示”that faster than icon mode.
image
7. Input search conditions then click “搜尋相片.
image
8.While all of picture information loaded. right click on list and select "選擇全部相片”
image
9.Copy below text then put into firendly flickr.

<style id="normal/photo/{url}"><br />       <labelstyle><br />           <color>00ffffff</color><br />           <scale>1</scale><br />       </labelstyle><br />       <iconstyle><br />           <scale>2</scale><br />           <hotspot x="0.5" y="0.5" xunits="fraction" yunits="fraction"><br />           <icon><br />               <href>{image_st}</href><br />           </icon><br />       </iconstyle><br />   </style>
<style id="highlight/photo/{url}"><br />       <labelstyle><br />           <color>ffffffff</color><br />           <scale>1</scale><br />       </labelstyle><br />       <iconstyle><br />           <scale>2</scale><br />           <hotspot x="0.5" y="0.5" xunits="fraction" yunits="fraction"><br />           <icon><br />               <href>{image_st}</href><br />           </icon><br />       </iconstyle><br />   </style>
<stylemap id="styleMap/photo/{url}">
   <pair>
     <key>normal</key>
     <styleurl>#normal/photo/{url}</styleurl>
   </pair>
   <pair>
     <key>highlight</key>
     <styleurl>#highlight/photo/{url}</styleurl>
   </pair>
 </stylemap>
<placemark>
   <styleurl>#styleMap/photo/{url}</styleurl>
   <name>{title}</name>
   <snippet maxlines="4">
  
   </snippet>
       <description>
       <!--[CDATA[                <a href="{url}"><img src="{image_s}" /></a><br /><br />               <b>Title:</b>{title}<br /><br />               <b>Descript:</b><br />{descript}<br /><br />               <b>Date time:</b>{date_time}<br /><br />               <b>Model:</b>{model}<br /><br />               <b>Tags:</b>{tag1},{tag2},{tag3} ...<br /><br />               <a href="{url}">Open photo page</a><br />               <br /><br />               ]]-->
       </description>
   <point>
       <coordinates>{longitude},{latitude}</coordinates>
   </point>
</placemark>

10.Click tab 進階模版 and 啟動
clip_image006
11.Click “複製到剪貼簿”(the friendly fickr will get picture information form web site and apply the template before put inside.)
※Because the FF do not supprt photo id parameter , so that use url to generate id. after step replace surplus urls.
clip_image008
image
clip_image010
12.Replace the picture id. copy below option to replace dialog. and select Regular Expressions and select option Perl
photo/http://www.flickr.com/photos/(.*?)/(.*?)/
photo/\2

clip_image012
clip_image014
14.compress to zip file and rename the extension to *.kmz
clip_image016
15.After that you can place in internet such as google page to share anyone.
16.This site can validator your kmz.
clip_image018
Demo … Google Map
clip_image020
Save the kmz link to My Map that will show pictures by postition when you move .
image
Double click *.kmz … Google Earth
image

Google Notebook Gadget Resizer

The default height of notebook gadget is 200px , it’s too short that need often to scroll down/up , so that write a script to change the height.
image
Install Greasemonkey
https://addons.mozilla.org/en-US/firefox/addon/748
image
User Script:Google Notebook Gadget Resizer
http://userscripts.org/scripts/show/41679
image
Result:
image

Code:

// ==UserScript==
// @name          Google Notebook Gadget Resizer
// @description   To change height of gadgets in iGoogle
// @include       http://www.google.com/ig*
// @include       http://www.google.com.tw/ig*

// @author        parkghost@hotmail.com
// @version       1.0
// ==/UserScript==

// This script are working on Google notebook gadget and some similar gadgets which content type is url and not using dynamic-height feature.
//
// you can fellow below instruction to modify default height of Google notebook gadget or add more gadget to apply new height.
//
// 1.input "about:config" in url box
// 2.search "greasemonkey.scriptvals.userscripts.org/Google Notebook Gadget Resizer.oGadgets"
// 3.The properly is a array of url pattern with height that can modify of you want to.
//
// default:
// ({'http://www.google.com/notebook/ig':"600px", 'url pattern':"400px"})
//
// The url of gadget you could look at page source that place in iframe tag.(ex.http ://87.gmodules.com/ig/ifr?view=home&url=http://itszero.googlepages.com/iGoogleTVSchedule.xml&nocache=0&up_timeRange=0&up_showPrograms=6&up_fontSize=0.75&up_favoriteChannels=&up_defaultChannel=74&lang=en&country=us&.lang=en&.country=us&synd=ig&mid=87&ifpctok=-5100993727886241321&parent=http://www.google.com&extern_js=/extern_js/f/CgJlbhICdXMrMAo4ACwrMBA4ACwrMBI4ACwrMBM4ACwrMBU4ACw/GgLq_VyeDu0.js)
//
// The URL parameter is good to become a URL pattern.
// http://itszero.googlepages.com/iGoogleTVSchedule.xml

var oGadgets = {'http://www.google.com/notebook/ig':'600px','url pattern':'400px'};
var oGadgetsStr = GM_getValue('oGadgets');
if(oGadgetsStr){
 oGadgets = eval(oGadgetsStr);
}else{
GM_setValue('oGadgets',uneval(oGadgets));
}
var oFrames = document.getElementsByTagName('iframe');
for(var i=0 ; i < oFrames.length ; i++){ 
 for(var key in oGadgets){
   var re = new RegExp(key); 
   if(re.test(oFrames[i].src)){
     oFrames[i].style.height = oGadgets[key];
   }
 }
}

Resources:

Greasemonkey Manual:API
http://wiki.greasespot.net/API_reference

Managing Gadget Height
http://code.google.com/apis/gadgets/docs/ui.html#Dyn_Height

Apr 21, 2008

GPS 記錄器、相簿、工具、節點編輯...

GPS應用廣泛,尤其整合了網路資源後能擴展的方向很多,本篇是一則實作測試文,為了偷懶不多作說明與修飾,若你有進一步的興趣請勤奮的點選連結,有很多DEMO可以把玩。

20080412阿里山出遊路線分享(I-gotU GT-100)

[旅程中2個大斷層,跟沒結尾的冏況,所以出現大橫貫與圖片辜兒等精采結局請勿受到驚嚇]
step 1. 安裝i-gotU Desktop
step 2. 將 *.mdb(Link) 放至 C:\Documents and Settings\******\Application Data\MobileAction\GPSTracer 取代 Tracer.mdb
step 3. 選取兩筆track→合併
---------- (分隔線)繼續下列步驟或匯出*.gpx(Link)使用其它軟體後製(edit、gpscoding、gpstagging…)---------
step 4. 於下方的"相簿"右鍵→新增圖片
step 5. 選取圖片右鍵→儲存GPS
step 6. 點選上片track 會重新載入Google Map(Ps. i-gotU Desktop圖片太多(大)可能會當)
step 7. 匯出html,gpx,kml…
clip_image002
(相關討論請參考:[Mobile01分享]i-gotU(GT-100)旅程紀錄i-gotU操作手冊)

Geocode aware

GPicSync
Automatically geocode pictures from your camera and a GPS track log.
Picasa:
Picasa is a software application for organizing and editing digital photos, Google began offering Picasa for free download.
Google Earth
Google Earth lets you fly anywhere on Earth to view satellite imagery, maps, terrain, 3D buildings and even explore galaxies in the Sky. You can explore rich geographical content, save your toured places and share with others.
Friendly.Flickr:
一個整合Flickr上下傳的編輯工具

Geotagging Albums

clip_image003

(Demo)

clip_image005clip_image007
clip_image009clip_image011
clip_image013

(DEMO)

clip_image015clip_image017
clip_image018

(DEMO)

上傳圖片前先注意有無允許自動匯入GPS資訊(否則就要手動調整囉)
You→Your Account→Privacy & Permissions→Import EXIF location data
clip_image020clip_image022
clip_image024
除了在photostream 頁面下方的KML(僅單頁)
Subscribe to parkghost's photostream – Latest | geoFeed | KML
也有第三方做的 http://kmlphotos.metaltoad.com/
clip_image026
點選clip_image027就會啟動Google Earth,紅點即是Flickr的圖片位址
clip_image029
clip_image030

(DEMO)

整體來說還有很大的進步空間…
clip_image032

整合Flickr與 Urmap與Google Map/Earth

(來源請參考:UrKML / UrGPX照片軌跡整合線上地圖的小工具)
匯出KMZ
clip_image034
Flickr with Google Earth
clip_image036
KML with Google Map(DEMO)
clip_image038
Flickr with Google Map(DEMO)
1: 5mi
clip_image040
1:2000ft
clip_image042
Flickr with Urmap(DEMO)
1:6.4km
clip_image044
1:200m
clip_image046

Editor

JOSM
File→Open→*.gpx
clip_image048
使用Google Map圖資
(Ps.基本上空照圖是要收費的,所以大部份OpenSource是沒有空照圖的)
clip_image050clip_image052
clip_image054clip_image056
左手邊垃圾桶按鈕→刪點
clip_image058
(隨便玩玩~呵) 繞圈圈
clip_image060clip_image062
Desktop Componet

swinglabs > swingx-ws > JXMapViewer

image

一些詞條 (Wikipedia)

GPS tracking
A GPS tracking unit is a device that uses the Global Positioning System to determine the precise location of a vehicle, person, or other asset to which it is attached and to record the position of the asset at regular intervals. The recorded location data can be stored within the tracking unit, or it may be transmitted to a central location data base, or internet-connected computer, using a cellular (GPRS), radio, or satellite modem embedded in the unit. This allows the asset's location to be displayed against a map backdrop either in real-time or when analysing the track later, using customized software. Such systems are not new; amateur radio operators have been operating their free GPS based nationwide realtime Automatic Position Reporting System since 1982.

Data loggers
A GPS logger simply logs the position of the device at regular intervals in its internal memory. Modern GPS loggers have either a memory card slot, or internal flash memory and a USB port. Some act as a USB flash drive. This allows downloading of the data for further analysis in a computer.

GPX
GPX, or GPS eXchange Format is an XML schema designed for transferring GPS data between software applications. It can be used to describe waypoints, tracks, and routes. The format is open and can be used without the need to pay licence fees.
Geotagging:
Geotagging, sometimes referred to as Geocoding, is the process of adding geographical identification metadata to various media such as websites, RSS feeds, or images and is a form of geospatial metadata. This data usually consists of latitude and longitude coordinates, though it can also include altitude, bearing, and place names.
Geocode:
Geocoding is the process of assigning geographic identifiers (e.g., codes or geographic coordinates expressed as latitude-longitude) to map features and other data records
Waypoint
Waypoints are sets of coordinates that identify a point in physical space. For the purposes of terrestrial navigation, these coordinates usually include longitude and latitude, and sometimes altitude (particularly for air navigation).

Track、Route
An ordered collection of points may be expressed as a track or a route. Conceptually, tracks are a record of where a person has been, routes are suggestions about where they might go in the future. So, for instance, there might be timestamps for each point in a track (because someone is recording where and when they were there), but timestamps for each point in a route are unlikely to be provided, because the author is suggesting it, and nobody might ever have travelled it.
KML
Keyhole Markup Language (KML) is an XML-based language schema for expressing geographic annotation and visualization on existing or future Web-based, two-dimensional maps and three-dimensional Earth browsers. KML was developed for use with Google Earth, which was originally named Keyhole Earth Viewer. It was created by Keyhole, Inc, which was acquired by Google in 2004. The name "Keyhole" is an homage to the KH reconnaissance satellites, the original eye-in-the-sky military reconnaissance system first launched in 1976.

KMZ
KML files are very often distributed as KMZ files, which are zipped KML files with a .kmz extension