Skip to content

Instantly share code, notes, and snippets.

View apnerve's full-sized avatar
🏠
Working from home

Praveen apnerve

🏠
Working from home
View GitHub Profile
@apnerve
apnerve / gaana.js
Created July 13, 2014 21:06
download songs from gaana.com
var tracks = [];$('.album_songlist .playcol').map(function(index, track) {tracks[index] = $(track).data('value')});var getURL = function(track_id) {$.post('http://gaana.com//streamprovider/get_stream_data_v1.php', {track_id:track_id}, function(data){console.log($.parseJSON(data).stream_path)})};tracks.map(getURL);
@apnerve
apnerve / frontend-architect-responsibilites.md
Last active August 29, 2015 14:16
Frontend-architect responsibilities
  • understanding the cascade, inheritance, semantics, and being able to choose the best style of CSS organization for the project (not necessarily their favorite)
  • organizing and building UI modules, working closely with UX or more visually-focused designers/CSS developers
  • consistency of modules, look and feel, UI interactions
  • creating file and folder structure and naming conventions, for HTML and CSS, most likely JS as well, and helping define back-end naming conventions for consistency
  • understanding the technological and business implications of a task, technical debt, and “perfect is the enemy of done”
@apnerve
apnerve / Important JS Concepts
Created March 25, 2015 07:56
A collection of important JS concepts to help folks brush up their JS knowledge or prepare for interviews
* Scope
* Closure
* Hoisting
* IIFEs and their uses
* Event loop
@apnerve
apnerve / bookmarklet-UL.js
Created April 21, 2015 09:57
Remove subscription popup in Urban Ladder
javascript:!function(){$('.reveal-modal, .reveal-modal-bg,#subscription_popup').remove()}();
@apnerve
apnerve / credit-cart.js
Created September 12, 2015 17:03
Where am I spending my money?
var fs = require('fs');
var sc = require('sc-card-transaction-parser');
var _ = require('lodash');
var file = fs.readFileSync('transactions.txt');
var transactions = sc.parseLog(file);
var expenses = function(data, type) {
var grouped = _.groupBy(data, type);
return _.keys(grouped).map(function(a) {
return {
@apnerve
apnerve / array-to-object
Created October 20, 2011 19:23
array to object conversion (and vice-versa) in PHP (>=5.2)
<?php
// Our required array
$a = array(
'name' => 'praveen',
'friends' => array(
'name' => 'uday',
'company' => 'kuliza',
'friends' => array(
'name' => 'vaibhav',
@apnerve
apnerve / about me.js
Created October 21, 2011 16:48
About me in JSON format
var apnerve = {
fullName: "Praveen Kumar",
title: "Web Developer",
currentLocation: "Bangalore, IN",
employment: {
company: "Kuliza",
position: "Web Developer"
@apnerve
apnerve / funlocker - funny-like unlocker
Created December 11, 2011 16:55
A bookmark-let to remove the 'share' overlay
javascript:(function(){document.getElementById('play_block').style.display='none';})();
@apnerve
apnerve / WikiPedia back.js
Created January 18, 2012 09:13
A bookmarklet to enable reading WikiPedia on Jan 18th
javascript:(function(){$('body%20>%20div').show();$('#mw-sopaOverlay').hide()})();
@apnerve
apnerve / dabblet.css
Created September 25, 2012 04:51
Inheritance : Frontend Workshop
/* Inheritance : Frontend Workshop */
p {
color: #69c;
font-size: 36px;
border: 1px solid #fb0;
padding: 10px;
}
em {