요즘 근황 (2014. 11월)

Posted on

며칠전에 Skype 채용 담당자로부터 메일이 왔다. Skype Web App 팀에서 사람을 구하고 있다고. 지금 회사인 Huddle도 마음에 들지만, 양파님의 블로그 글을 읽다보니 웬지 Skype에 가볼까 하는 생각도 생긴다. 근데 웬지 마소는 좀 지는 해 같아서. 이번에 구조 조정도 엄청하던데, 괜히 갔다가 피보는 것 아닐까 싶기도.

최근 Desktop 팀으로 옮겼다. 전에 있던 팀은 로그인 인증 (Authentication)과 Pipe and Filter를 이용한 파이프라인 시스템 관련하여 주로 작업하는 팀이었는데, 별다른 이유는 없고, 그냥 Desktop 개발을 한 번 해보고 싶었다. Windows와 Mac, Cross platform 개발을 하는 팀인데, C#, Mono, Webkit, javascript, CEX 등을 쓴다. 안 하던걸 하니 좀 재밌기도 하고, 새로운 사람들과 일하다 보니, 같은 회사인데도 상당히 다른 느낌이 들고 그래서 좋은 것 같다.

A simple script that cleans and builds visual studio solution with psake

Posted on

psake is a simple build automation tool written in powershell, and works well on Microsoft platform.

This is a really simple example that cleans bin folder, run msbuild to build the solution, and clean up pdb and xml files afterward.


properties {
    $BuildConfiguration = if ($BuildConfiguration -eq $null ) { "debug" } else {     
        $BuildConfiguration }
    $BuildScriptsPath = Resolve-Path .
    $base_dir = Resolve-Path ..
    $packages = "$base_dir\packages"
    $build_dir = "$base_dir\Sushiwa\bin"
    $sln_file = "$base_dir\Sushiwa.sln"
}

task default -depends CleanUp, Compile

task CleanUp {
    @($build_dir) | aWhere-Object { Test-Path $_ } | ForEach-Object {
    Write-Host "Cleaning folder $_..."
    Remove-Item $_ -Recurse -Force -ErrorAction Stop
    }
}

task Compile {
    Write-Host "Compiling $sln_file in $BuildConfiguration mode to $build_dir"
    Exec { msbuild "$sln_file" /t:Clean /t:Build /p:Configuration=$BuildConfiguration 
        /m /nr:false /v:q /nologo /p:OutputDir=$build_dir }

    Get-ChildItem -Path $build_dir -Rec | Where {$_.Extension -match "pdb"} | Remove-Item
    Get-ChildItem -Path $build_dir -Rec | Where {$_.Extension -match "xml"} | Remove-Item
}

London Bus

Posted on

Recently, I’m playing with TFS’s countdown apis. As I am a bus commuter, I use bus arrival check app everyday. There are free and paid apps on iPhone and my Nexus 4. Paid ones are prettier than free ones, but the user interface, I think, can be much more improved. 

So, I started writing an simple mobile site that checks bus arrival time. It’s still primitive stage, but it works and it has features I wish other apps have. For example, when I stand at a bus stop, I want the check the arrivals of the stop, not anywhere else. I don’t want to select a bus stop on the map, touch it, and wait to see the arrivals. I’d like the app to find the bus stop with my location and just show me the arrival times. This mobile site has the feature, “nearby bus stop”.

It wasn’t difficult to Implement it. You get the latitude and longitude from the browser’s geolocation. You send it to countdown. Countdown returns various markers with their latitude and longitude. You check the values and find the closest one. Surprisingly, the location was accurate enough to locate the bus stop right in front of you.

Here is the website. http://www.londonbus.info/

It works best on mobile. I test it on Chrome on my Nexus 4. Hope it helps you too.  

 

Customising Mac’s terminal prompt

Posted on Updated on

You can colourise it, if you want.

Open .bash_profile in your editor (I used sublime)


sublime .bash_profile

Add this line


export PS1="\u@\h \w "

Each option means

\d – Current date
\t – Current time
\h – Host name
\# – Command number
\u – User name
\W – Current working directory (ie: Desktop/)
\w – Current working directory, full path (ie: /Users/Admin/Desktop)

Change Mac’s Computer name

Posted on

  1. Launch ‘System Preferences’
  2. Click the ‘Sharing’ icon
  3. Type in what you want your Mac’s new computer name to be
  4. Close ‘System Preferences’