Skip to content

Instantly share code, notes, and snippets.

View albertoammar's full-sized avatar
❤️
Because I was born in this world

Alberto Ammar albertoammar

❤️
Because I was born in this world
  • Banco dos Imóveis
  • São Paulo, Brasil
View GitHub Profile
@albertoammar
albertoammar / post-receive
Created October 11, 2018 22:50 — forked from lemiorhan/post-receive
Post-receive hook to deploy the code being pushed to production branch to a specific folder
#!/bin/bash
target_branch="production"
working_tree="PATH_TO_DEPLOY"
while read oldrev newrev refname
do
branch=$(git rev-parse --symbolic --abbrev-ref $refname)
if [ -n "$branch" ] && [ "$target_branch" == "$branch" ]; then
@albertoammar
albertoammar / Update remote repo
Created January 9, 2020 17:14 — forked from mandiwise/Update remote repo
Transfer repo from Bitbucket to Github
// Reference: http://www.blackdogfoundry.com/blog/moving-repository-from-bitbucket-to-github/
// See also: http://www.paulund.co.uk/change-url-of-git-repository
$ cd $HOME/Code/repo-directory
$ git remote rename origin bitbucket
$ git remote add origin https://github.com/mandiwise/awesome-new-repo.git
$ git push origin master
$ git remote rm bitbucket
@albertoammar
albertoammar / mysql-docker.sh
Created February 9, 2020 13:34
Mysql/Mariadb docker backup and restore.
# Backup
docker run mariadb /usr/bin/mysqldump -h localhost -u root --password=root DATABASE > backup.sql
@albertoammar
albertoammar / metro.config.js
Last active February 19, 2020 17:03 — forked from 6pm/metro.config.js
Configure metro.config.js to use symbolic link in react native
const path = require('path');
// react-native >= 0.57
const extraNodeModules = {
'qb-core': path.resolve(__dirname + '/../qb-core/'),
};
const watchFolders = [
path.resolve(__dirname + '/../qb-core/')
];

Route Login

Used to collect a Token for a registered User. rent_townhouse_price

URL : /api/login/{id}

Method : POST

Auth required : NO

@albertoammar
albertoammar / CollapsingNav.js
Created April 28, 2020 19:44 — forked from andigu/CollapsingNav.js
A Collapsing Navbar with Tabs in React Native
import React, {Component} from "react";
import {Animated, Dimensions, Platform, Text, View} from 'react-native';
import {Body, Header, List, ListItem as Item, ScrollableTab, Tab, Tabs, Title} from "native-base";
const NAVBAR_HEIGHT = 56;
const {width: SCREEN_WIDTH} = Dimensions.get("window");
const COLOR = "rgb(45,181,102)";
const TAB_PROPS = {
tabStyle: {width: SCREEN_WIDTH / 2, backgroundColor: COLOR},
activeTabStyle: {width: SCREEN_WIDTH / 2, backgroundColor: COLOR},
@albertoammar
albertoammar / aws-linux-docker.sh
Created July 8, 2020 22:28
Install docker, docker-compose and awscli latest in aws linux
sudo yum update -y
sudo amazon-linux-extras install docker
sudo yum install docker
sudo service docker start
sudo usermod -a -G docker ec2-user
sudo curl -L https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo yum install python37
@albertoammar
albertoammar / README-Template.md
Created July 27, 2020 17:43 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@albertoammar
albertoammar / manual.md
Last active September 9, 2023 13:46
Manual

Commits 📜

De acordo com a documentação do Conventional Commits, commits semânticos são uma convenção simples para ser utilizada nas mensagens de commit. Essa convenção define um conjunto de regras para criar um histórico de commit explícito, o que facilita a criação de ferramentas automatizadas.

Tipo e descrição 🦄

O commit semântico possui os elementos estruturais abaixo (tipos), que informam a intenção do seu commit ao utilizador(a) de seu código.

  • dev - Commits temporários ou que sejam parciais para evolução de um código (As vezes uma tarefa precisa ser inicial por alguem, mas finalizada por outro. As vezes a feat em si é grande demais e precisa ser fragmentada.).