Skip to content

Instantly share code, notes, and snippets.

View prasann's full-sized avatar
💬
Living by the code

Prasanna V Nagarajan prasann

💬
Living by the code
View GitHub Profile
@prasann
prasann / run-jasmine-2.0.js
Created April 4, 2014 11:38
A Jasmine 2.0 spec runner and prints output in the console. The code is almost the same as it comes along with phantomjs example. Only that the console reporter is been modified to adapt to Jasmine 2.0 style
var system = require('system'),isDebugMode = false;
/**
* Wait until the test condition is true or a timeout occurs. Useful for waiting
* on a server response or for a ui change (fadeIn, etc.) to occur.
*
* @param testFx javascript condition that evaluates to a boolean,
* it can be passed in as a string (e.g.: "1 == 1" or "$('#bar').is(':visible')" or
* as a callback function.
* @param onReady what to do when testFx condition is fulfilled,
@prasann
prasann / SntpClient.java
Created February 14, 2014 15:47
SntpClient for Android
/*
* Copyright (C) 2008 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software