Skip to content

Instantly share code, notes, and snippets.

View sunilmurali's full-sized avatar
🎯
Focusing

sunilmurali

🎯
Focusing
View GitHub Profile
@sunilmurali
sunilmurali / gist:42e2a03d64ceb4ebe2a746c560fdfcc0
Last active March 31, 2017 22:15
Git commit get JIRA numbers
var a=document.getElementsByClassName('commit-message');var textSet=new Set(); for (i=0;i<a.length;i++) { var res=a[i].innerText.match(/KNDY-\d{4,}/g); if ( res) res.forEach(function(a) { textSet.add(a);}) } console.log([...textSet].join(','));
@sunilmurali
sunilmurali / grid add pager on top
Last active February 3, 2017 00:58
KendoGrid test
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Kendo UI Snippet</title>
<link rel="stylesheet" href="http://kendo.cdn.telerik.com/2017.1.118/styles/kendo.common.min.css"/>
<link rel="stylesheet" href="http://kendo.cdn.telerik.com/2017.1.118/styles/kendo.rtl.min.css"/>
<link rel="stylesheet" href="http://kendo.cdn.telerik.com/2017.1.118/styles/kendo.silver.min.css"/>
<link rel="stylesheet" href="http://kendo.cdn.telerik.com/2017.1.118/styles/kendo.mobile.all.min.css"/>
<script src="http://code.jquery.com/jquery-1.12.4.min.js"></script>
@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 */
}
// 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,
{
"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": [
@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.
#
@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 / 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 / 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 / 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>