Skip to content

Instantly share code, notes, and snippets.

View fabiancarlos's full-sized avatar
🚀
Go!

Fabian Carlos fabiancarlos

🚀
Go!
View GitHub Profile
defmodule MailService.SendAdapters.SendGrid do
@mailer_url "https://api.sendgrid.com/v3/mail/send"
@doc """
Send a mail to a list of persons (recipients)
* from from address
* recipients array of email addresses
* subject subject text
<%= text_field_tag :title, obj.title, data: { id: id, remote: true, url: url_for(nutri_workout_path(obj.id, workout_program: { title: obj.title })), method: :post } %>
<% content_for :js do %>
<script>
$('[data-id="<%= obj.id %>"]').bind('ajax:success', function() {
$(document).ajaxSuccess(function(event, request, settings) {
console.log("success", request.responseJSON.data)
});
});
</script>
FIREBASE_IO=https://fitlabtest-5045c.firebaseio.com/
FIREBASE_PROJECT=fitlabtest-5045c
FIREBASE_PRIVATE_KEY_ID=29c02ee86c313f34604bcd9ac5e2429374458420
FIREBASE_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\nMIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQDjFk0AcapmTNka\npD4FKulVgxf0/txgCxFkIvKOQVYAyjVOQZxsPk2yuKnCbI9HYL9n9iI0BnRjO5J+\nSIauNCQ0CQ+mpj7cJ00F5CYqg3NkwgXlMZ9F3nqSF6zJQz8SumISnJiy4Fm3gFVB\nHIub72ISY4IVerlevSeeDe0qh7Doj+qHD+lploh2EETTyXM3QrwR6ahbWQouhCJi\n/TDjlm37gdWgwgRfTkfazIgGbqEJUqE+VGEq7F5wWEvYsbMBJ3Q6CncoRBKh+2zX\nHY9zg5sF9Pa4VQFPRu1njEndjVsB9XIfuGIX0cc6+7iAQUrHG91CEb8fEI5PTBWW\n+KX1kMtNAgMBAAECggEAAVO9CXagl051qlkxX5hbmrtUZYMjyI/n/xzRLBGnrgOA\ngj+R6XQHwjagD1nREIq5M6NVmdY70eSkO4ay+sulNoSjCcdI8MJuCc3Gh1MTVpBn\ntmou0xq0vqvSv65b7QEX16IApnL3M0JVvTasfjHM8eyQ8w0vjiUu2RadvzThzMof\ntAO2Gk2QLQBLG4bf2DguAnnJtaleqXtzcmMwLyKvbKmN2IaduDMMonAkVtQZ/FKB\nFFUMiF0dqyg+NgercSQow+NTs6sUOnpDKxx//DFV9gu6ahDp3iR7Cl3cCN/WRzZA\n7SWm+xKGksW734dxk9Mh1OhklK3acXbi8r4AYrbDxQKBgQD4CBBIVp4nJWOQIJ60\nNXLnqARyCWluZdFM8SBNqhBEOpq/b
@fabiancarlos
fabiancarlos / simple_test.md
Last active April 23, 2020 00:28
NetConv simple test

Faça um aplicativo em React Native, com as seguintes funções, não precisa de Back-end.

  • Listar produtos, com nome, preço e imagem.
  • Adicionar produtos em um carrinho.
  • Listar nesse carrinho os produtos que foram adicionados podendo atualiza-los.
  • Faça testes para tudo

Como estamos considerando testes, então não esqueça de usar, os frameworks como Jest, Detox, Enzyme ou alguma lib que ache útil. Qualquer dúvida, só perguntar, adicione o número +5565996676764(whats) para contato direto.

@fabiancarlos
fabiancarlos / mautic
Last active February 27, 2020 15:03
Mautic, NGINX, PHP FPM 7.033, MariaDB
NGINX
PHP-FPM 7.0.33
server {
listen 80;
root /var/www/html/mautic;
index index.php index.html index.htm index.nginx-debian.html;
server_name mautic.your_domain.com;
@fabiancarlos
fabiancarlos / rails http status codes
Created April 10, 2019 23:21 — forked from mlanett/rails http status codes
HTTP status code symbols for Rails
HTTP status code symbols for Rails
Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings.
Status Code Symbol
1xx Informational
100 :continue
101 :switching_protocols
102 :processing
@fabiancarlos
fabiancarlos / gist:8c9b216c57e14696c10e4f52ff08a492
Created January 2, 2019 22:11 — forked from rolo/gist:1481128
Install Postgres 9.1, PostGIS and create PostGIS template on Ubuntu 11.10 Oneiric Ocelot
#!/bin/bash
#
# Install Postgres 9.1, PostGIS and create PostGIS template on a clean Ubuntu 11.10 Oneiric Ocelot box
# http://wildfish.com
# add the ubuntu gis ppa
sudo apt-get -y install python-software-properties
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
sudo apt-get update
@fabiancarlos
fabiancarlos / fc-product-total-sales.php
Created July 13, 2018 23:11
Woocommerce plugin: Total Vendido do Produto
<?php
/**
* Plugin name: Total Vendido do Produto
* Plugin uri: https://github.com/fabiancarlos
* Description: Agrupar a totalidade das vendas e mostrar abaixo do preço
* Version: 1.0
* Author: Fabian
* Author uri: http://github.com/fabiancarlos
* License: GPLv2 or later
@fabiancarlos
fabiancarlos / api.js
Last active April 20, 2017 20:58
Api REST
import * as CurrentUser from './current_user';
class Api {
static get(route) {
return this.xhr(route, null, 'GET');
}
static put(route, params) {
return this.xhr(route, params, 'PUT')
@fabiancarlos
fabiancarlos / webview.js
Created March 14, 2017 21:54
REact native webview.js
_openModal(){
console.log("OPEN WEB VIEW");
this.setState({modalVisible: !this.state.modalVisible});
}
.... render ...
<Modal
animationType={"slide"}