Skip to content

Instantly share code, notes, and snippets.

View praveenpuglia's full-sized avatar
👨‍💻
...human in progress

Praveen Puglia praveenpuglia

👨‍💻
...human in progress
View GitHub Profile
@praveenpuglia
praveenpuglia / Package Control.sublime-settings
Created June 22, 2015 17:47
Installed Packages for sublime text
{
"in_process_packages":
[
],
"installed_packages":
[
"BracketHighlighter",
"Emmet",
"GitHub Markdown Snippets",
"Handlebars",
@praveenpuglia
praveenpuglia / .csscomb.json
Last active August 29, 2015 14:20
CSSComb Config for Sublime Text 3
{
"config": {
"remove-empty-rulesets": true,
"always-semicolon": true,
"color-case": "lower",
"block-indent": " ",
"color-shorthand": true,
"element-case": "lower",
"eof-newline": false,
"leading-zero": true,
<!doctype html>
<html>
<head>
<title>Rich Text Editor - FROM MDN!</title>
<script type="text/javascript">
var oDoc, sDefTxt;
function initDoc() {
oDoc = document.getElementById("textBox");
sDefTxt = oDoc.innerHTML;
//sample tree structure
var tree = [
{
id : "A",
list : [
{
id : "A.A",
list : [
{
id : "A.A.A",
@praveenpuglia
praveenpuglia / getAllObjectMethods
Created April 18, 2014 09:22
Returns an array of methods contained within an object.
console.log(function(a){
return Object.getOwnPropertyNames(a).filter(function(b){
return"function"==typeof a[b]}
)}(YOUR_MODULE)
);
sc config themes start= auto
net start themes
exit
@praveenpuglia
praveenpuglia / storageEvent.html
Created August 24, 2013 19:31
localStorage storage event example
<!DOCTYPE html>
<html>
<head>
<title>Local Storage</title>
</head>
<body>
<form action="">
<input name="comment" id="comment"></input>
<input type="submit">
</form>
@praveenpuglia
praveenpuglia / localStorageTest.html
Created August 24, 2013 19:14
A small demo on localstorage...
<!DOCTYPE html>
<html>
<head>
<title>Local Storage</title>
</head>
<body>
<form action="">
<textarea name="comment" id="comment" cols="30" rows="10"></textarea>
Draft last saved at : --- <div id="updateTime"></div>
<input type="submit">
@praveenpuglia
praveenpuglia / $.post_Template.js
Created March 19, 2013 17:30
just the javascript needed to do an ajax request using jquery.
$(document).ready(function() {
$("#loadAjax").on("click",function(){
$(".ajax-content").html("Loading...");
$.post("ajaxCustomerIdName.jsp", {
url : "Something"
}, function(data) {
console.log(data);
$(".ajax-content").html(data);
});
@praveenpuglia
praveenpuglia / log4j.properties
Last active December 15, 2015 02:39
Properties file for log4j. Put this file under <b>src</b> folder..
#Please refer to this tutorial for better understanding of log4j.
# http://veerasundar.com/blog/2009/07/log4j-tutorial-adding-log4j-logging-to-your-project/
#define the console appender
log4j.appender.consoleAppender = org.apache.log4j.ConsoleAppender
# now define the layout for the appender
log4j.appender.consoleAppender.layout = org.apache.log4j.PatternLayout
log4j.appender.consoleAppender.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n