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
import { Injectable } from 'angular2/core'; | |
import { Storage } from './storage'; | |
import { CurrentUser } from '../interfaces/common'; | |
@Injectable() | |
export class Authentication{ | |
private _storageService : Storage; | |
private _userKey : string = "CURRENT_USER"; | |
constructor(storageService : Storage){ |
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
/** | |
* | |
* @package Validator | |
* @author FelipeBarros<[email protected]> [2015-05-04] | |
* | |
**/ | |
'use strict'; | |
/* REFERENCE: http://stackoverflow.com/a/1187628 */ | |
var array_diff = function(a1, a2) { |
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
angular.module("myApp") | |
.config(function ($provide) { | |
$provide.decorator('$q', function($delegate) { | |
var defer = $delegate.defer; | |
$delegate.defer = function() { | |
var deferred = defer(); | |
deferred.promise.set = function(object, property) { | |
return deferred.promise.then(function(value) { | |
object[property] = value; |
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
#!/usr/bin/env python | |
# post-receive hook for git-based deployments | |
import sys | |
import os | |
from subprocess import call | |
# configuration | |
deploy_to_path = '/path/to/deploy/directory/' | |
deploy_branch = 'master' |
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
#!/bin/bash | |
# Adicione um novo remote; pode chamá-lo de "upstream": | |
git remote add upstream https://github.com/usuario/projeto.git | |
# Obtenha todos os branches deste novo remote, | |
# como o upstream/master por exemplo: | |
git fetch upstream |