This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Write a program that prints out the numbers 1 to 100 (inclusive). | |
| * If the number is divisible by 3, print Crackle instead of the number. | |
| * If it's divisible by 5, print Pop. If it's divisible by both 3 and 5, | |
| * print CracklePop | |
| * | |
| * Jaime Moran | |
| */ | |
| var cracklePop = function(i){ | |
| var r = ''; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /**********************************************/ | |
| /* | |
| /* IR_Dark_Monokai | |
| /* Designed and developed by Andres Pagella (@mapagella) | |
| /* http://www.andrespagella.com/customising-chrome-devtools | |
| /* | |
| /* Based on Ben Truyman's IR_Black | |
| /* which is... | |
| /* Based on Todd Werth's IR_Black: | |
| /* http://blog.toddwerth.com/entries/2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var v = d3.select('#viz') | |
| .append("svg") | |
| .attr("width", 1170) | |
| .attr("height", 700 ); | |
| var getPointAtAngle = function(center, radius, theta){ | |
| console.log(r); | |
| theta = 90 + theta; | |
| return { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var app = angular.module('app', []); | |
| app.controller('ctrl', function($scope){ | |
| $scope.ss = [ | |
| {name:'test1'}, | |
| {name:'test2'}, | |
| {name:'test3'}, | |
| {name:'test4'}, | |
| {name:'test5'} | |
| ]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var app = angular.module('app', []); | |
| app.controller('ctrl', function($scope){ | |
| $scope.images = [ {name: 'test1'}, {name: 'test2'}, | |
| {name: 'test3'}, {name: 'test4'}]; | |
| }); | |
| app.directive('gallery',function() { | |
| return { | |
| restrict : 'C', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| angular.module('utils', []) | |
| .factory('utils', function(){ | |
| return{ | |
| compareStr: function(stra, strb){ | |
| stra = ("" + stra).toLowerCase(); | |
| strb = ("" + strb).toLowerCase(); | |
| return stra.indexOf(strb) !== -1; | |
| } | |
| }; | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var app = angular.module('app', ['ngResource']); | |
| app.config(function($locationProvider, $routeProvider) { | |
| // $locationProvider.html5Mode(true); | |
| $routeProvider | |
| .when('/', { templateUrl: 'partials/index', controller: 'ctrl' }) | |
| .when('/about', { templateUrl: 'partials/about', controller: 'ctrl' }) | |
| .otherwise({redirectTo:'/'}); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var app = angular.module('app', []); | |
| app.config(function($locationProvider, $routeProvider) { | |
| $locationProvider.html5Mode(true); | |
| $routeProvider | |
| .when('/', { | |
| templateUrl: '/partials/template1.html', // <- relative to base | |
| controller: 'ctrl1' | |
| }) | |
| .when('/tags/:tagId', { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| app.config( function( $httpProvider ) { | |
| var interceptor = function( $q ) { | |
| return function( promise ) { | |
| var success = function(res) { | |
| if(res.data && res.data[0]){ | |
| if(typeof res.data[0] === 'string'){ | |
| var data = res.data, | |
| ret = []; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module.exports = function(grunt) { | |
| grunt.initConfig({ | |
| concat: { | |
| js: { | |
| src: 'src/js/*.js', | |
| dest: 'dest/js/concat.js' | |
| }, | |
| css: { | |
| src: 'src/css/*.css', |
NewerOlder