Skip to content

Instantly share code, notes, and snippets.

View josenaves's full-sized avatar

José Naves Moura Neto josenaves

View GitHub Profile
@josenaves
josenaves / AddImageView
Created March 15, 2018 19:07
Example on how to create a image background with another layer on top
import React, { Component } from 'react';
import { Text, View, StyleSheet, Image, ImageBackground, Platform } from 'react-native';
const backgroundImage = require('../assets/background.png')
const iconCamera = require('../assets/camera_alt_white_48x48.png')
const styles = StyleSheet.create({
addImage: {
flexDirection: 'column',
justifyContent: 'center',
@josenaves
josenaves / build.gradle_app
Created November 9, 2017 13:45
Mapbox v6 - Android - Example project
# THIS IS example/android/app/build.gradle
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
@douglasdrumond
douglasdrumond / sobre trabalhar PJ
Last active March 11, 2016 12:38
Sobre trabalhar PJ (texto compartilhado na comunidade AndroidBrasilDev, não é de minha autoria)
Como você eu tive que pesquisar e entender o que significa trabalhar como PJ
para decidir sobre uma oportunidade.
Bom antes de entender o que significa trabalhar como PJ você deve entender
o que significa trabalhar como CLT e porque as empresas preferem evitar isso.
No CLT vc tem o seu salário bruto digamos que seja R$ 3000. Mas o que você
recebe de verdade é R$ 2603,83
O que acontece é que você tem que pagar do seu salário 11% de INSS R$ 330 mais
@cesarferreira
cesarferreira / RxJava.md
Last active February 2, 2022 07:28
Party tricks with RxJava, RxAndroid & Retrolambda

View Click

Instead of the verbose setOnClickListener:

RxView.clicks(submitButton).subscribe(o -> log("submit button clicked!"));

Filter even numbers

Observable
    .just(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
@andystanton
andystanton / ghost2jekyll.py
Last active July 30, 2017 16:15
Ghost2Jekyll: Converts ghost 0.4.2 sqlite db posts to jekyll 2.3.0 markdown posts.
#!/usr/bin/env python3
# This script is provided to show how I migrated from Ghost 0.4.2
# to Jekyll 2.3.0 and is used at your own risk. Back up your blog
# before trying it out.
def getPostTemplate():
with open('post-template.md', 'r') as f:
posttemplate = f.read()
f.closed
@staltz
staltz / introrx.md
Last active November 17, 2024 01:08
The introduction to Reactive Programming you've been missing
@lelandbatey
lelandbatey / whiteboardCleaner.md
Last active November 11, 2024 22:46
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

@rxaviers
rxaviers / gist:7360908
Last active November 17, 2024 19:33
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@garethrees
garethrees / plot.p
Last active January 14, 2024 23:21
Graphing apache benchmark results with gnuplot
# Output to a jpeg file
set terminal jpeg size 1280,720
# Set the aspect ratio of the graph
set size 1, 1
# The file to write to
set output "timeseries.jpg"
# The graph title
@aanton
aanton / 10gen-extract-videos.js
Created June 19, 2013 08:43
Get all videos URLs of a week in a course from education.10gen.com using web scrapping, javascript, jquery and browser console
/*
Instructions:
1. Log in with your account and go to the desired course
2. Open the courseware tab
3. Configure the week variable
4. Copy this code and paste it in the browser console
*/