With the lastest version of Require, a new config object was introduced, the shim
.
http://requirejs.org/docs/api.html#config-shim
That allows Amplify to now be used within AMD projects.
Have Fun!
var mod = {}; | |
mod.AuthCtrl = [ | |
'$scope', 'requests401', '$http', 'Ping', '$location', function($scope, requests401, $http, Ping, $location) { | |
var fadespeed = 300; | |
$scope.user = { | |
"username": "test", | |
"password": "test" | |
}; |
/** | |
* @license Angular Auth | |
* (c) 2012 Witold Szczerba | |
* License: MIT | |
*/ | |
angular.module('angular-auth', []) | |
/** | |
* Holds all the requests which failed due to 401 response, | |
* so they can be re-requested in the future, once login is completed. |
mod = angular.module('vendorPortal.services', ['ngResource']); | |
mod.factory('UserData', ($resource,$location) -> | |
resource = $resource('http://' + $location.host() + '/Services/userinfo') | |
return () -> | |
resource.get() | |
) | |
.factory('UserDataStore', ($resource, $location, UserData, $q, $rootScope) -> | |
mystore = new Lawnchair('userdata', () -> {}) | |
GetUserDataFromXhr = () -> | |
xhrDeferred = $q.defer() |
mod = angular.module('myApp.services', ['ngResource']); | |
mod.factory('UserData', ($resource,$location) -> | |
return $resource('http://' + $location.host() + '/Services/userinfo') | |
) | |
.factory('UserDataStore', ($resource, $location, UserData, $q, $rootScope) -> | |
GetUserDataFromXhr = () -> | |
deferred = $q.defer() | |
UserData.get((userdata) -> | |
deferred.resolve userdata.userInfo |
With the lastest version of Require, a new config object was introduced, the shim
.
http://requirejs.org/docs/api.html#config-shim
That allows Amplify to now be used within AMD projects.
Have Fun!
container.Register<IndexedCompanyRepository>(c => new IndexedCompanyRepository(new RiakCompanyRepository(container.Resolve<IRiakClient>()), | |
container.Resolve<IElasticClient>())).ReusedWithin(ReuseScope.Request); | |
container.Register<ICompanyRepository>(c => container.Resolve<IndexedCompanyRepository>()); | |
container.Register<IFindCompanies>(c => container.Resolve<IndexedCompanyRepository>()); |
public class IndexedRepo | |
{ | |
private IClient _client; | |
private static bool _indexCreated; | |
private static readonly object _locker = new object(); | |
public IndexedRepo(IClient client) | |
{ | |
this._client = client; | |
lock(_locker) |
public ObjRepository : IObjRepository | |
{ | |
public Obj Add(Obj newObj) | |
{ | |
Audited<Obj> newAuditedObj = new AuditPersist.Audited<Obj>(Obj newObj); | |
Audited<Obj> persistedAuditedObj = CI.Add<Audited<Obj>>("objbucket", newAuditedObj); | |
return newAuditedObj.CurrentState(); | |
} | |
private Audited<Obj> GetAudited(Guid objId) |
"devDependencies": { | |
"bower": "~0.6.4", | |
"underscore" : "~1.4.4", | |
"grunt" : "0.4.0rc4", | |
"grunt-cli" : "~0.1.5", | |
"grunt-contrib-clean" : "~0.4.0a", | |
"grunt-contrib-coffee" : "git+https://github.com/gruntjs/grunt-contrib-coffee.git#01f90adb16e315ee88c0befa5bb401bbfd4cbc6e", | |
"grunt-contrib-concat" : "~0.1.1", | |
"grunt-contrib-connect" : "0.1.0", | |
"grunt-contrib-copy" : "git+https://github.com/gruntjs/grunt-contrib-copy.git#2bd6f0e99e6be6f4bc48f50e5cb32ff8aa3f8ffc", |
#!/usr/bin/env bash | |
# List terraform resources in the current directory and ask their arn to import them into terraform state | |
RESOURCES_LIST=$(awk -F\" '/^resource "/ {print $2"."$4}' *.tf) | |
for resource in ${RESOURCES_LIST} | |
do | |
read -p "Enter ARN for resource ${resource} (type none to not import it): " arn | |
if [[ ${arn} != "none" ]] |