Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View idosela's full-sized avatar

Ido Sela idosela

  • Google
  • New York, NY
View GitHub Profile
@idosela
idosela / http-response-interceptor.js
Last active February 25, 2024 12:51
Sample code for ng-conf 2014
angular.module('myMdl', []).config(['$httpProvider', function($httpProvider) {
$httpProvider.responseInterceptors.push([
'$q', '$templateCache', 'activeProfile',
function($q, $templateCache, activeProfile) {
// Keep track which HTML templates have already been modified.
var modifiedTemplates = {};
// Tests if there are any keep/omit attributes.
var HAS_FLAGS_EXP = /data-(keep|omit)/;
@idosela
idosela / svg2png.sh
Created May 15, 2012 18:23
Convert svg to png file and optimize using pngcrush.
#!/bin/sh
#
# Require:
# sudo apt-get install librsvg2-bin
# sudo apt-get install pngcrush
#
# Usage:
# sh svg2png.sh input.svg output.png
rsvg-convert -o "$2" "$1"
@idosela
idosela / angular-bc.js
Created April 13, 2012 20:22 — forked from vojtajina/angular-bc.js
Angular: BC module for scope/controller separation
/**
* @license AngularJS
* (c) 2010-2012 AngularJS http://angularjs.org
* License: MIT
*/
/**
* Backward compatibility module for AngularJS
* @author Vojta Jina <vojta.jina@gmail.com>
*