Author Archives: inerte

Custom Protractor Flake shard parser

PR #45 on Protractor Flake added the ability to specify custom parsers. On my project we’re sharding (running multiple instances of) Protractor and using the following parser to re-run only the failing spec files. You’ll want to replace the /test/functional/specs/ and the browser name (chrome) below with your actual values. 1 2 3 4 5 […]

Remove ._ files from Mac OS X

Run this command on the terminal to remove every ._ file created by Mac OS X on the current path and its descendants: find . -name ‘._*’ -deletefind . -name ‘._*’ -delete

Hide “username” has entered the room, or left the room on Adium

I just spent 10 minutes perusing every Adium menu and options to find where I could disable the message “entered the room” and “left the room” on Adium. Turns out, it’s easy: Right click on the IRC channel name tab and the option “Show Join/Leave messages” will appear.

Replace tabs by space on git history

So, I prefer spaces, and when I press tab, it should instead write 4 spaces. I forgot to set this option on Sublime Text and did some commits with tabs. The following git command will rewrite the repo history and replace tabs by 4 spaces. git filter-branch –tree-filter ‘git diff-tree –name-only –diff-filter=AM -r –no-commit-id $GIT_COMMIT […]

Download file using WinJS.xhr

Snippet to download a file using WinJS.xhr and save it. The file variable below is a StorageFile, result of pickSaveFileAsync. Note the usage of responseType: “blob” as an option to xhr, and how it is copied to the file stream with msDetachStream. 1 2 3 4 5 6 7 8 9 10 11 12 13 […]

PCH file built from a different branch ((clang-425.0.24)) than the compiler ((clang-425.0.27))

Atualizei o XCode da versão 4.6.0 para 4.6.01 e de repente meus projetos não construíam mais, dando o erro: PCH file built from a different branch ((clang-425.0.24)) than the compiler ((clang-425.0.27)) A solução foi simplesmente limpar o projeto. Vá ao menu “Product” e selecione “Clean”.

Powershell script to snap an app in Windows 8

You can not, from inside a Windows 8 application, snap it. That doesn’t mean there is no other way 🙂 At work, we have to test our app in a snapped state, so we need a way to programmatically make it happen. We discovered that there are two keyboard shortcuts for this action. Windows Key […]

Get current session id on Ruby Selenium WebDriver

1 @browser.instance_variable_get(’@bridge’).instance_variable_get(’@session_id’)@browser.instance_variable_get(‘@bridge’).instance_variable_get(‘@session_id’)

SWOTOR Nvidia crash

All of sudden, the game Star Wars: The Old Republic is crashing my Nvidia drivers. I have a GeForce GTX 460. Oddly, I played the game for months without any issues, but since the last update, it crashes multiple times.

Javascript function to find background task by name on Windows 8

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 FindTask: function (taskName) { var background = Windows.ApplicationModel.Background; var iter = background.BackgroundTaskRegistration.allTasks.first(); var hascur = iter.hasCurrent;   while (hascur) { var cur = iter.current.value;   if ( === taskName) { return cur; }   hascur = iter.moveNext(); } […]