Skip to content

Instantly share code, notes, and snippets.

View swampie's full-sized avatar

Matteo Fiandesio swampie

View GitHub Profile

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@swampie
swampie / BBSocialLoginAvailableConnections
Created April 7, 2014 09:06
Gist for Social Login tutorial
$scope.connected = [];
$scope.availables = accounts.getClient(auth).query({},function(d){
d.$then(function(i){
var available = availableSso;
var connected = i.data;
var names = [];
$(connected).each(function(i,n){
names.push(n.from)
})
$scope.connected = names;
@swampie
swampie / gist:7038546
Created October 18, 2013 08:46
angular upload with jquery-form
$scope.errors = {}
if(!$scope.image){
console.log('error');
$scope.errors["image"] = "L'immagine non puó essere vuota";
}
if(!$scope.assetname || $scope.assetname == ''){
$scope.errors["name"] = "L'immagine non puó essere vuota";
}
if(isEmpty($scope.errors)){
if(navigator.appName.indexOf("Internet Explorer")!=-1){