This file contains 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
http { | |
proxy_cache_path /tmp/nginx/cache | |
levels=1:2 | |
keys_zone=main:10m | |
max_size=1g inactive=1d; | |
proxy_temp_path /tmp/nginx/tmp; | |
server { | |
listen 80; | |
server_name app.example.com; |
This file contains 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
(function(angular) { | |
var app = angular.module('MyStore'); | |
// Inject in the CartService | |
app.controller('CartController', function($scope) { | |
// Set the items on the scope to the items in the CartService | |
$scope.items; |
This file contains 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
/** | |
* flattenNested - Reduces an array of arbitrarily nested arrays of integers into a flat array of integers. | |
* @param value {Array} - The array to flatten. | |
* @param iterator {Array} - An array used for initializing or for iteration during recursion. | |
* @returns {Array} - The flattened array, yay! | |
*/ | |
function flattenNested(value, iterator = []) { | |
// Add exit case straight away to help prevent stack overflow | |
if (!value) return iterator; |
OlderNewer