Skip to content

Instantly share code, notes, and snippets.

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 /
Created Jul 27, 2020 — forked from PurpleBooth/
A template to make good

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.


albertoammar /
Created Jul 8, 2020
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$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo yum install python37
albertoammar / CollapsingNav.js
Created Apr 28, 2020 — forked from andigu/CollapsingNav.js
A Collapsing Navbar with Tabs in React Native
View CollapsingNav.js
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},

Route Login

Used to collect a Token for a registered User. rent_townhouse_price

URL : /api/login/{id}

Method : POST

Auth required : NO

albertoammar / metro.config.js
Last active Feb 19, 2020 — forked from 6pm/metro.config.js
Configure metro.config.js to use symbolic link in react native
View metro.config.js
const path = require('path');
// react-native >= 0.57
const extraNodeModules = {
'qb-core': path.resolve(__dirname + '/../qb-core/'),
const watchFolders = [
path.resolve(__dirname + '/../qb-core/')
albertoammar /
Created Feb 9, 2020
Mysql/Mariadb docker backup and restore.
# Backup
docker run mariadb /usr/bin/mysqldump -h localhost -u root --password=root DATABASE > backup.sql
albertoammar / Update remote repo
Created Jan 9, 2020 — forked from mandiwise/Update remote repo
Transfer repo from Bitbucket to Github
View Update remote repo
// Reference:
// See also:
$ cd $HOME/Code/repo-directory
$ git remote rename origin bitbucket
$ git remote add origin
$ git push origin master
$ git remote rm bitbucket
albertoammar / post-receive
Created Oct 11, 2018 — forked from lemiorhan/post-receive
Post-receive hook to deploy the code being pushed to production branch to a specific folder
View post-receive
while read oldrev newrev refname
branch=$(git rev-parse --symbolic --abbrev-ref $refname)
if [ -n "$branch" ] && [ "$target_branch" == "$branch" ]; then