Skip to content

Instantly share code, notes, and snippets.

View rajeshsegu's full-sized avatar

Rajesh Segu rajeshsegu

  • Uber
  • Dublin, California
View GitHub Profile
_.mixin({
/*
* Walk trough every <key, value> in a given object or array
* Usage:
* var obj = {a: 1, b: 2, c: {d: 3, e: 4}}
* _.walk(obj, function(value, key, obj){
* console.log(value);
* });
* //Output: 1, 2, 3, 4
Angular Upgrade 1.3
===================
This week we upgraded Angular 1.2.x to 1.3.x and here are our findings that might help one and all revolving around AngularJS based app development.
> **Note:** https://github.com/angular/angular.js/blob/master/CHANGELOG.md
Breaking Changes
-------------
@rajeshsegu
rajeshsegu / handlebars-helper.js
Last active December 3, 2020 05:42
Handlebars-Helper
//Handlebars Template helper
(function(Handlebars){
Handlebars.Templates = {
//script type of handle bar template
TYPE: "text/x-handlebars-template",
//Handlebar identifier attribute
NAME: "data-template-name",
@rajeshsegu
rajeshsegu / BrowserDetectProtocol.js
Created September 13, 2012 19:26
Detect Browser Custom Protocols
<html>
<head>
<title>Detect Custome Protocol</title>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.1.min.js"></script>
</head>
<body>
<input id="protocol" value="" placeholder="custom protocol"/>
<button id="launch">Launch</button>
<!-- Mozilla Only -->
<iframe id="hiddenIframe" src="about:blank" style="display:none"></iframe>
@rajeshsegu
rajeshsegu / BrowserDetectProtocol.js
Created September 13, 2012 19:26
Detect Browser Custom Protocols
<html>
<head>
<title>Detect Custome Protocol</title>
<script type="text/javascript" src="/public/unittest/jasmine/jquery.js"></script>
</head>
<body>
<input id="protocol" value="" placeholder="custom protocol"/>
<button id="launch">Launch</button>
<!-- Mozilla Only -->
<iframe id="hiddenIframe" src="about:blank"></iframe>
@rajeshsegu
rajeshsegu / BorwserPlatform.js
Created August 18, 2012 20:49
jQuery plugin to detect platform
/*jQuery plugin to detect browser platform */
//Idea is extend this to support various browser related environment variables.
(function($) {
var BrowserEnvironment = {
//init browser environment
init: function () {
//Find platform