Skip to content

Instantly share code, notes, and snippets.

Avatar

Parashuram N axemclion

View GitHub Profile
@axemclion
axemclion / GMSimulator.js
Created Oct 22, 2009
Greasemonkey Emulator
View GMSimulator.js
/*
Copyright (c) 2007, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
@axemclion
axemclion / WavePhishedPage.html
Created Feb 10, 2010
Google Wave Phishing Demo
View WavePhishedPage.html
<html><head>
<style type="text/css"><!--
body,td,div,p,a,font,span {font-family: arial,sans-serif;}
body {margin-top:2}.c {width:4; height: 4}
html body { bgcolor: "#ffffff"; padding: 0; margin: 0; }
A:link {color:#0000cc; }
A:visited { color:#551a8b; }
A:active { color:#ff0000; }
@axemclion
axemclion / index.js
Created Sep 7, 2015
Perfjankie - Scrolling custom element
View index.js
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',
@axemclion
axemclion / QueuedUnit.js
Created Apr 30, 2012
Wrapper code to queue and run Qunits tests one after another.
View QueuedUnit.js
/**
* 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 / filtereffects.js
Created Jul 14, 2012
Aviary - Filter Effects
View filtereffects.js
var secret = "7e58cceaf";
var params = {
api_key: "c92a196a2",
app_version: "1.0",
backgroundcolor: "",
calltype: "render",
cellheight: 300,
cellwidth: 300,
cols: 1,
@axemclion
axemclion / jquery-indexeddb-test.html
Created Sep 17, 2012
IndexedDB Put - Test cases to check how put function works
View jquery-indexeddb-test.html
<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>
View A sample Grunt Task file using Grunt-SauceLabs-QUnit
/* global module:false */
module.exports = function(grunt){
grunt.initConfig({
pkg: '<json:package.json>',
meta: {
banner: '/*! <%= pkg.name %> */'
},
server: {
base: '.',
port: 9999
@axemclion
axemclion / index.android.js
Created Oct 28, 2015
Using HockeyApp SDK with ReactNative Android
View index.android.js
'use strict';
var React = require('react-native');
var {
AppRegistry,
StyleSheet,
Text,
View,
NativeModules,
TouchableHighlight,
@axemclion
axemclion / Gruntfile.js
Created Mar 4, 2013
A grunt task to publish npm packages from CI environments like travis
View Gruntfile.js
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 / gist:6357083
Created Aug 27, 2013
Calling NPM test from inside a node module
View gist:6357083
npm = require('npm')
npm.load({
argv: {
remain: [],
cooked: ['test'],
original: ['test']
}
}, function() {
npm.commands.test([], function() {});
});