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 / 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 / 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 / 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/')
];
@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 / 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