Skip to content

Instantly share code, notes, and snippets.

Gabriel Feitosa gabrielfeitosa

Block or report user

Report or block gabrielfeitosa

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@gabrielfeitosa
gabrielfeitosa / app.js
Last active Oct 11, 2016
Padronização dos componentes com AngularJS
View app.js
(function () {
angular.module('app', [])
.directive('botao', function () {
return {
restrict: 'E',
replace: true,
scope: {
label: '@',
tipo: '@',
@gabrielfeitosa
gabrielfeitosa / travis.yml
Created Jun 18, 2016
Integração Contínua
View travis.yml
language: java
jdk:
- oraclejdk8
deploy:
provider: heroku
api-key:
secure: $HEROKU_API_KEY
app: ci-spring-boot
@gabrielfeitosa
gabrielfeitosa / app.js
Last active May 19, 2016
Diretiva para controlar o acesso a elementos html
View app.js
(function(){
angular.module('acesso',[])
.directive('permissaoAcesso', function(){
return {
restrict: 'A',
link: function ($scope, element, attrs) {
if (attrs.permissaoAcesso === 'block') {
element.attr('disabled', 'disabled');
element.append('<span class="block fa fa-lock"></span>');
@gabrielfeitosa
gabrielfeitosa / index.html
Last active Jan 20, 2016
Formulário base para o post sobre validação
View index.html
<!DOCTYPE html>
<html ng-app="app">
<head>
<meta charset="utf-8" />
<title>Blog do Gabriel Feitosa</title>
</head>
<body>
<h1>AngularJS: Validação de Formulário</h1>
<div ng-controller="CaixaController as vm">
<form name="form" novalidate ng-submit="vm.sacar()">
@gabrielfeitosa
gabrielfeitosa / controller.js
Last active Dec 29, 2015
Pedidos com socket.io
View controller.js
(function() {
'use strict';
angular.module('app')
.controller('LojaController', function($scope) {
var socket = io();
var vm = this;
vm.pedido = {};
vm.pedidos = [];
@gabrielfeitosa
gabrielfeitosa / chatfactory.js
Last active Nov 11, 2015
Chat Periodic Refresh
View chatfactory.js
(function() {
angular.module("app")
.factory("ChatFactory", function($http, $timeout) {
var promise;
var URL = "http://gf-chat.herokuapp.com/rest/mensagens/";
var mensagens = [];
var aberto = false;
var contador = 5;
return {
@gabrielfeitosa
gabrielfeitosa / bower.json
Last active Sep 25, 2015
Arquivo exemplo do bower.json
View bower.json
{
"name": "bower-exemplo",
"version": "0.0.0",
"homepage": "https://github.com/gabrielfeitosa/blog_exemplos",
"authors": [
"Gabriel Feitosa <gabfeitosa@gmail.com>"
],
"description": "",
"main": "",
"moduleType": [],
@gabrielfeitosa
gabrielfeitosa / app.js
Last active Sep 18, 2015
AngularJS: Filtros
View app.js
(function() {
'use strict';
angular.module('app-filters', []);
angular.module('app-filters').filter('cpf', function() {
return function(input) {
var str = input + '';
if(str.length <= 11){
str = str.replace(/\D/g, '');
str = str.replace(/(\d{3})(\d)/, "$1.$2");
View animal.detalhe.controller.js
(function() {
'use strict';
angular.module('feira-app')
.controller('AnimalDetalheController', AnimalDetalheController);
AnimalDetalheController.$inject = ['$scope', '$routeParams', 'AnimalFactory'];
function AnimalDetalheController($scope, $routeParams, AnimalFactory) {
$scope.titulo = 'Detalhe do Animal';
@gabrielfeitosa
gabrielfeitosa / service_fofoqueiro.html
Last active Aug 29, 2015
AngularJS: Criando Service
View service_fofoqueiro.html
<!DOCTYPE html>
<html ng-app="app">
<head>
<meta charset="utf-8" />
<title>Blog do Gabriel Feitosa</title>
<style type="text/css">
button {
background-color: red;
color: white;
font-weight: bold;
You can’t perform that action at this time.