Skip to content

Instantly share code, notes, and snippets.

View mateusreis's full-sized avatar

Mateus Reis mateusreis

View GitHub Profile
@mateusreis
mateusreis / android_instructions.md
Created December 19, 2016 22:09 — forked from patrickhammond/android_instructions.md
Easily setup an Android development environment on a Mac

Here is a high level overview for what you need to do to get most of an Android environment setup and maintained.

Prerequisites (for Homebrew at a minimum, lots of other tools need these too):

  • XCode is installed (via the App Store)
  • XCode command line tools are installed (xcode-select --install will prompt up a dialog)
  • Java

Install Homebrew:

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"

apply plugin: "com.android.application"
import com.android.build.OutputFile
/**
* The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets
* and bundleReleaseJsAndAssets).
* These basically call `react-native bundle` with the correct arguments during the Android build
* cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
* bundle directly from the development server. Below you can see all the possible configurations
import React, { Component } from 'react';
import { Image } from 'react-native';
import { connect } from 'react-redux';
import { Container, Content, Button, View, H3, Header, Title, Icon, Text } from 'native-base';
import { openDrawer } from '../../actions/drawer';
import myTheme from '../../themes/base-theme';
import styles from './styles';
@mateusreis
mateusreis / Fetch-API-cheat-sheet.md
Created November 30, 2016 03:16 — forked from jsdf/Fetch-API-cheat-sheet.md
Fetch API cheat sheet

fetch api cheat sheet

get JSON

fetch('/things/10', {
  credentials: 'same-origin',
  headers: {
    'accept': 'application/json'
  }
@mateusreis
mateusreis / git.mylog
Last active July 29, 2016 17:24
Git alias for my log and branch all
git config --global alias.bra '!git branch --all'
git config --global alias.mylog '!git log --author="$(git config user.name)" --pretty=format:"%h - %an, %ar : %s" --author="$(git config user.name)" --pretty=format:"%h - %an, %ar : %s"
@mateusreis
mateusreis / .gitconfig
Last active August 29, 2015 14:13 — forked from codexico/.gitconfig
# ~/.gitconfig
# https://gist.github.com/codexico/2a34c0d599f3af93b46f
[alias]
# Retorna todos os alias desta lista
alias = !git config --list | grep 'alias\\.' | sed 's/alias\\.\\([^=]*\\)=\\(.*\\)/\\1\\\t\\2/' | sort;
# Retorna o caminho do repositório
url = remote -v;
@mateusreis
mateusreis / fnfix.py
Last active August 29, 2015 14:06 — forked from MicahElliott/fnfix.py
#! /usr/bin/env python
"""Fix ugly file names to be UNIX shell-friendly.
PROBLEM
=======
You have files named with funky characters lying around in your
filesystem. Ugly files like "My Document #3 - (2005)[1].txt" are
common when you're sharing directories with Windows users, but you
@mateusreis
mateusreis / html1.sh
Last active December 24, 2015 12:38
Shell script that clones small framework.
#!/bin/bash
# em /usr/local/bin/
CURRENT=`pwd`
DIR=`basename $CURRENT`
echo " "
echo "html1 [branch] Clona um branch específico sem criar um repositório."
echo " "
echo " Ver lista de branchs em https://github.com/mateusreis/small.git"
@mateusreis
mateusreis / html1.sublime-snippet
Created July 31, 2013 12:12
snippet para o Sublime2
<snippet>
<content><![CDATA[
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
/*********************************************************************
* css
*********************************************************************/
#!/bin/bash
# Updated: Wed Apr 10 21:04:12 2013 by webmaster@askapache
# @ http://uploads.askapache.com/2013/04/gnu-mirror-index-creator.txt
# Copyright (C) 2013 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#