Skip to content

Instantly share code, notes, and snippets.

Trying Really Hard

Praveen Puglia praveenpuglia

Trying Really Hard
Block or report user

Report or block praveenpuglia

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
praveenpuglia / $.post_Template.js
Created Mar 19, 2013
just the javascript needed to do an ajax request using jquery.
View $.post_Template.js
$(document).ready(function() {
$.post("ajaxCustomerIdName.jsp", {
url : "Something"
}, function(data) {
View CSS Variables -

Thanks for replying to me! :)

I really didn't know about the recommendation process back then. It's pretty recent that I came to know about it. I am not sure if any of the suggestion helps at the moment since it's now a recommendation.

I am also sure that the working group must have thought about exhaustive scenarios so I may not even be making a point.

I know $ or @ couldn't be used since they were already getting used in preprocessors and @ specifically, I feel, wouldn't go with the existing syntax of CSS.

I met Chris Lilley few days ago and I came to know that $ could be used but it would create multiple problems.

praveenpuglia / localStorageTest.html
Created Aug 24, 2013
A small demo on localstorage...
View localStorageTest.html
<!DOCTYPE html>
<title>Local Storage</title>
<form action="">
<textarea name="comment" id="comment" cols="30" rows="10"></textarea>
Draft last saved at : --- <div id="updateTime"></div>
<input type="submit">
praveenpuglia / storageEvent.html
Created Aug 24, 2013
localStorage storage event example
View storageEvent.html
<!DOCTYPE html>
<title>Local Storage</title>
<form action="">
<input name="comment" id="comment"></input>
<input type="submit">
View hcf.js
function hcf(n1, n2){
var hcf = (n1 > n2) ? findHcf(n2, n1) : findHcf(n1, n2);
console.log("HCF of ", n1, " & ", n2, " is ", hcf);
function findHcf(b, a) {
console.log("Divisor : ", b," Dividend: ", a);
var q, r;
q = Math.floor(a/b);
r = a - b*q;
praveenpuglia / debug.component.ts
Created Mar 23, 2018
Simple Component that dumps prettified data in any template.
View debug.component.ts
import { Component, Input } from '@angular/core';
selector: 'dump',
template: `
<pre><code>{{data | json}}</code></pre>
styles: [
:host {
praveenpuglia / webpack.config.js
Last active Apr 11, 2018
Simplest webpack 4 configuration to work with vuejs & scss
View webpack.config.js
// Require things!
const path = require('path');
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
// The configuration starts here!
module.exports = {
// The entry point for webpack to start generating a dependency graph.
entry: { index: './src/index.js' },
praveenpuglia / access-state.ts
Last active Apr 25, 2018
Access state inside an ngrx effect
View access-state.ts
// In the Effect's constructor, inject store.
constructor(private store: Store<AppState>)
fetchUserProfile$: Observable<Action> = this.actions$.pipe(
mergeMap(([action, appState]) => {
return this.http
praveenpuglia / no-dispatch.ts
Last active Apr 25, 2018
Do not dispatch an action from an ngrx effect
View no-dispatch.ts
@Effect({ dispatch: false })
logout$: Observable<Action> = this.actions$.pipe(
tap(action => {
delete window.localStorage.user;
praveenpuglia / cancel-request.ts
Created Apr 25, 2018
Cancel in flight / ongoing network request - ngrx effects
View cancel-request.ts
getTabData$: Observable<Action> = this.actions$.pipe(
switchMap(action => {
const tabType = action.payload;
return this.http
map((response: any) => {
return new FetchTabDataSuccess(;
You can’t perform that action at this time.