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
// Karma configuration | |
// http://karma-runner.github.io/0.12/config/configuration-file.html | |
// Generated on 2015-06-05 using | |
// generator-karma 0.9.0 | |
module.exports = function(config) { | |
'use strict'; | |
config.set({ | |
// enable / disable watching file and executing tests whenever any file changes |
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
#!/bin/bash | |
sudo kextunload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport | |
sudo kextload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport |
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
<div> | |
<h1>{{product.name}}</h1> | |
<p>{{product.price}}</p> | |
<img ng-src="{{product.picture}}"> | |
<p>{{product.description}}</p> | |
<div> | |
<button ng-if="variant === 'v0'" class="red-button" ng-click="addToCart()">Add to cart</button> | |
<button ng-if="variant === 'v1'" class="green-button" ng-click="addToCart()">Add to cart</button> | |
</div> | |
</div> |
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
<div> | |
<ul class="list"> | |
<li ng-repeat="product in products"> | |
<a ng-href="#/product/{{product.id}}">{{product.name}} - {{product.price}}</a> | |
</li> | |
</ul> | |
</div> |
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
'use strict'; | |
angular.module('myStoreApp') | |
.controller('ProductController', ['$scope', '$routeParams','$http', '$window', function($scope, $routeParams, $http, $window){ | |
$scope.variant = $window.variant; | |
$http.get('api.mystore.com/products/'+$routeParams.id) | |
.success(function(product){ | |
$scope.product = product; |
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
'use strict'; | |
angular.module('myStoreApp') | |
.controller('ListController', ['$scope', '$http', function($scope, $http){ | |
$http.get('api.mystore.com/products/') | |
.success(function(products){ | |
$socpe.products = products; | |
}); | |
}]); |
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
'use strict'; | |
angular.module('myStoreApp', [ | |
'ngRoute' | |
]) | |
.config(function($routeProvider){ | |
$routeProvider | |
.when('/', { | |
templateUrl: 'list.html', | |
controller: 'ListController' |
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
<html ng-app="myStoreApp"> | |
<head> | |
<title>My products store</title> | |
<script src="//www.google-analytics.com/cx/api.js?experiment=EXPERIMENT_ID"></script> | |
<script> | |
var variant = cxApi.chooseVariation(); | |
if(cxApi.getChosenVariation() !== cxApi.NO_CHOSEN_VARIATION){ | |
window.variant = 'v'+variant; | |
} | |
</script> |
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
/* User data sample */ | |
var user = { | |
uid: 5678, | |
email: '[email protected]' | |
}; | |
/* Tag separator: *| */ | |
/* g modiffier is mandatory */ | |
var pattern = /\*\|([a-zA-Z0-9_]+)\|\*/g; | |
var url = 'http://www.acme.com/tnt/buy/?user=*|UID|*&email=*|EMAIL|*&size=*|SIZE|*'; |