Skip to content

Instantly share code, notes, and snippets.

View sunilmurali's full-sized avatar
🎯
Focusing

sunilmurali

🎯
Focusing
View GitHub Profile
@sunilmurali
sunilmurali / 0_reuse_code.js
Last active August 29, 2015 14:08
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@sunilmurali
sunilmurali / gist:44a968ff1ce910980272
Last active July 8, 2022 08:27
Apex Queueable Interface Skeleton with Callouts
/**
* @description Extend a queueable job to complete the merge request from the page
*
*
*/
public class QueueJob implements Queueable, Database.AllowsCallouts {
public class QueueJobException extends Exception {}
public QueueJob ( ) {
@sunilmurali
sunilmurali / GenerateExcel
Last active August 29, 2015 14:15
Aspose Create Excel Worksheet
//sign(), download(), processCommand() part of AsposeService.cls
public static String generateJunkDataXML (Integer rows, Integer columns) {
//String xmlString = '<ImportStringArrayOption><DestinationWorksheet>Sheet1</DestinationWorksheet><FirstRow>1</FirstRow><FirstColumn>1</FirstColumn><IsInsert>true</IsInsert><IsVertical>true</IsVertical><Data>';
String xmlString = '<ImportBatchDataOption><DestinationWorksheet>Sheet1</DestinationWorksheet><ArrayOfCellValue>' ;
for ( Integer row =1;row< rows; row++) {
//xmlString += '<ImportStringArrayOption><DestinationWorksheet>Sheet1</DestinationWorksheet><FirstRow>1</FirstRow><FirstColumn>'+row+'</FirstColumn><IsInsert>false</IsInsert><IsVertical>true</IsVertical><Data>' ;
for ( Integer column=1;column<columns; column++) {
//xmlString += '<string>something</string>' ;
xmlString += '<CellValue> <rowIndex>'+row+'</rowIndex> <columnIndex>'+column+'</columnIndex>
@sunilmurali
sunilmurali / DragDropList Plugin For Kendo
Last active August 29, 2015 14:17
DragDropListJS.js
/**********************************************************************************
* @description Kendo UI plugin for Drag Drop list
* @author Sunil Murali
* @extends Kendo UI
* @usage $(selector).kendoDragDropList({
* options
* });
*********************************************************************************/
(function($) {
@sunilmurali
sunilmurali / Salesforce File upload - SOAP API
Last active October 1, 2017 14:55
Salesforce File upload - SOAP API
File upload from Visual force page = 10 MB limit
File uplaod via SOAP API = 25MB Limit
SOAP API File Upload:
1. jquery/kendo
2. connection.js
3. FileReader [ readAsBinaryString ]
@sunilmurali
sunilmurali / RouteFactory
Last active January 14, 2016 00:31
Load all the routes defined in the route folder;
================ WIP =============
/**
* Express router needs to be defined and each file module.exports should return the router
*/
var fs = require ('fs' ) ;
var _ = require ('lodash');
var routes = {};
/*
@sunilmurali
sunilmurali / deploy.sh
Created January 20, 2016 23:27 — forked from caarlos0/deploy.sh
Continous deploy with Jenkins and Heroku. This is the post-build script.
#!/bin/bash
#
# login in the jenkins server with:
#
# heroku login
# heroku keys:add
#
# Doing so, jenkins will have permission to deploy to
# the heroku remote.
#
{
"nodes": [
{ "id": "com1" , "sequence":0, "fixed": true, "x":100,"y":100 },
{ "id": "com2" , "sequence":1, "fixed": true, "x":100,"y":100 },
{ "id": "com3" , "sequence":1, "fixed": true, "x":100,"y":100 },
{ "id": "com4" , "sequence":2, "fixed": true, "x":100,"y":100 },
{ "id": "com5" , "sequence":2, "fixed": true, "x":100,"y":100 },
{ "id": "com6" , "sequence":2, "fixed": true, "x":100,"y":100 }
],
"links": [
// Word cloud layout by Jason Davies, http://www.jasondavies.com/word-cloud/
// Algorithm due to Jonathan Feinberg, http://static.mrfeinberg.com/bv_ch03.pdf
(function(exports) {
function cloud() {
var size = [256, 256],
text = cloudText,
font = cloudFont,
fontSize = cloudFontSize,
fontStyle = cloudFontNormal,
fontWeight = cloudFontNormal,
@sunilmurali
sunilmurali / Test.vfp
Last active July 28, 2016 00:45
Overlaps in Kendo Gantt
<apex:page >
<style>
.k-task {
background: rgba(247,198,52,1)
}
.k-task-overlap {
z-index:2;
background: rgba(247,198,52,1);
/* IE6-9 */
}