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('app', ['ngResource']) | |
.config(function($stateProvider){ | |
$stateProvider | |
.state('resolveExample',{ | |
url : '/employees', | |
views: {'content': {templateUrl : 'expose/listExamples/example',controller: 'exampleList'}}, | |
//Aqui é onde toda a mágica acontece! este é o nosso Resolve | |
//Nele será resolvida a promise e preparada para ser injetada como dependencia no controller exampleList | |
resolve : {promiseResolved : function(){ |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Document</title> | |
</head> | |
<body> | |
<ul> | |
<li ng-repeat='item in itens'> | |
<a href="{{item.url}}" ng-if='logged' data-ng-bind='item.nome'></a> |
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
/** | |
* Module | |
* | |
* Description | |
*/ | |
angular.module('app', []) | |
.controller('nameCtrl', function($scope){ | |
$scope.logged = true; |
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
obj.series = _.map(replacement.series,function(origem){ | |
return _.extend(origem,{color: networkColors[origem.name.toLowerCase()]}); | |
}) | |
// obj.series = (function(){ | |
// var returnArray = []; | |
// var colors = ['#a92aa8','#5eabcf','#47539b','#c88010','#dd431b','#f23d79','#a92aa8']; | |
// angular.forEach(replacement.series,function(origin,kOrigin){ | |
// var temporalObject = {name:origin.name,color: '', data : []}; | |
// angular.forEach(origin.data,function(dataItem){ |
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
gulp.task('dist',function(){ | |
fs.readFile('./app/index.html', {encoding: 'utf-8'} ,function (err, data){ | |
//pega todos as dependencias vindas do bower | |
var patternBower = /(bower.+js)/g | |
, appPath = 'app/' | |
, bowerDependencys = data.match(patternBower); | |
for(var i = bowerDependencys.length -1 ; i ; i--){ | |
var srcPath = appPath + bowerDependencys[i] | |
, destPath = appPath + 'js/vendor/' | |
, archiveName = bowerDependencys[i].split('/').reverse()[0]; |
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
// Include gulp | |
var gulp = require('gulp'); | |
// Include Our Plugins | |
var jshint = require('gulp-jshint'); | |
var concat = require('gulp-concat'); | |
var uglify = require('gulp-uglify'); | |
var rename = require('gulp-rename'); | |
var clean = require('gulp-clean'); | |
var sourcemaps = require('gulp-sourcemaps'); |
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('standard.directives',[]) | |
.directive('selectExemplo',function($timeout){ | |
return{ | |
scope:{ | |
fields : '=', | |
nameMasterField: '@' | |
}, | |
template : '<div class="input-field s12 m8 col">' + | |
'<select id="selectExemplo" data-ng-model="selected" data-ng-options="campo.id as campo.name for campo in fields"></select>' + | |
'<label>{{nameMasterField}}</label>'+ |
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
def fatorial(numero): | |
multiplicador = numero - 1 | |
resultado = numero | |
while multiplicador >0: | |
resultado = resultado * multiplicador | |
multiplicador = multiplicador -1 | |
return resultado |
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 | |
# https://edmondburnett.com/post/python-push-to-deploy | |
import sys | |
import os | |
from subprocess import call | |
# configuration | |
deploy_to_path = '/path/to/deploy/directory/' |
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
<?php | |
if (!defined('_PS_VERSION_')) | |
{ | |
exit; | |
} | |
class MeuModulo extends CarrierModule { | |
const PREFIX = "pinkbit_correios"; |
OlderNewer