Skip to content

Instantly share code, notes, and snippets.

View axemclion's full-sized avatar

Parashuram N axemclion

View GitHub Profile
@axemclion
axemclion / article.md
Last active January 4, 2016 12:19
Article for HTML5rocks.com

Automating Web Rendering Performance Measurement

Ensuring that your web pages are delivered to the user as quickly as possible, results in a great user experience. However, users spend more time interacting with the page than waiting for it to download. This makes the smoothness and responsiveness of the site even more critical. Janky page scrolls, disjointed animations or delayed visual cues in a page are just as bad as a site that takes time to load.

Most modern web browsers have tools that can help determine the various performance bottlenecks during typical user interactions. Excellent tutorials have also been written about performance workflows. Despite this, rapid development and deploy cycles make it hard to implement regular performance audits. Tools like [PageSpeed Insights](http://updates.html5rocks.com/201

@axemclion
axemclion / gist:6357083
Created August 27, 2013 18:18
Calling NPM test from inside a node module
npm = require('npm')
npm.load({
argv: {
remain: [],
cooked: ['test'],
original: ['test']
}
}, function() {
npm.commands.test([], function() {});
});
@axemclion
axemclion / Gruntfile.js
Created March 4, 2013 05:22
A grunt task to publish npm packages from CI environments like travis
grunt.registerMultiTask('publish', 'Publish the latest version of this plugin', function() {
var done = this.async(),
me = this,
npm = require('npm');
npm.load({}, function(err) {
npm.registry.adduser(me.data.username, me.data.password, me.data.email, function(err) {
if (err) {
console.log(err);
done(false);
} else {
@axemclion
axemclion / index.android.js
Created October 28, 2015 15:25
Using HockeyApp SDK with ReactNative Android
'use strict';
var React = require('react-native');
var {
AppRegistry,
StyleSheet,
Text,
View,
NativeModules,
TouchableHighlight,
/* global module:false */
module.exports = function(grunt){
grunt.initConfig({
pkg: '<json:package.json>',
meta: {
banner: '/*! <%= pkg.name %> */'
},
server: {
base: '.',
port: 9999
@axemclion
axemclion / jquery-indexeddb-test.html
Created September 17, 2012 04:08
IndexedDB Put - Test cases to check how put function works
<html>
<head>
<title>Sample title</title>
</head>
<body>
<h3><a href = "javascript:schema()">Create Schema - Run this first</a></h3>
<h3><a href = "javascript:list()">List data in DB</a></h3>
<h1>Test cases</h1>
<ul>
<li>
@axemclion
axemclion / filtereffects.js
Created July 14, 2012 06:38
Aviary - Filter Effects
var secret = "7e58cceaf";
var params = {
api_key: "c92a196a2",
app_version: "1.0",
backgroundcolor: "",
calltype: "render",
cellheight: 300,
cellwidth: 300,
cols: 1,
@axemclion
axemclion / QueuedUnit.js
Created April 30, 2012 19:06
Wrapper code to queue and run Qunits tests one after another.
/**
* Ideally unit tests should be independent, but there are some cases where you really want those tests to be executed one after the other
* Here is some code that does exactly that - a wrapper on top of QUnit.
*
* Usage
* Instead of asyncTest, call queuedAsyncTest (same params)
* Instead of module(), call queuedModule
* After a test is over and the next test has to run, call nextTest()
*/
(function(window, console, undefined){
@axemclion
axemclion / index.js
Created September 7, 2015 02:23
Perfjankie - Scrolling custom element
var perfjankie = require('perfjankie');
var browserperf = require('perfjankie/node_modules/browser-perf');
perfjankie({
'url': 'http://localhost:8080',
'browsers': [{
'browserName': 'chrome'
}],
'selenium': 'http://localhost:9515',
'couch': {
'server': 'http://localhost:5984',