Skip to content

Instantly share code, notes, and snippets.

View lucianomlima's full-sized avatar
👨‍💻

Luciano Lima lucianomlima

👨‍💻
View GitHub Profile
@lucianomlima
lucianomlima / elevations.ts
Created November 20, 2019 06:12 — forked from mmazzarolo/elevations.ts
React-Native cross platform elevation definitions
/**
* React-Native cross-platform elevations.
* Based on https://ethercreative.github.io/react-native-shadow-generator/
*
* Usage:
* 1. Import "elevations" from this file
* import { elevations } from "config/elevations";
* 2. Use it. Assuming you need an elevation of 2 (based on the Android
* elevation standard), doing the following will cast the same shadow
* on both platforms:
@lucianomlima
lucianomlima / Podfile
Created September 24, 2019 18:04 — forked from sjchmiela/Podfile
platform :ios, '10.0'
require_relative '../node_modules/react-native-unimodules/cocoapods.rb'
# don't just copy and paste this, notice that the target names should align with what is already in your Podfile
target 'YourAppNameHere' do
pod 'React', :path => '../node_modules/react-native', :subspecs => [
'Core',
'CxxBridge',
'DevSupport',
@lucianomlima
lucianomlima / index.js
Created September 25, 2018 22:29 — forked from AlexBrasileiro/index.js
ShareYourFeedback
// inspiration: https://dribbble.com/shots/4370657-Share-Your-Feedback
import React, { Component, Fragment } from "react";
import { Animated, StyleSheet, Text, View, TouchableOpacity, Dimensions, Platform, Easing, TextInput, KeyboardAvoidingView, Image } from "react-native";
import FontAwesome5 from 'react-native-vector-icons/FontAwesome5';
const { width: windowWidth } = Dimensions.get('window');
const Icon = (props) => <FontAwesome5 {...props} />
@lucianomlima
lucianomlima / executeShellInGradle
Created March 7, 2018 06:50 — forked from rishabhmhjn/executeShellInGradle
Executing shell commands and getting output in gradle
def getVersionName = { ->
def hashStdOut = new ByteArrayOutputStream()
exec {
commandLine "git", "rev-parse", "--short", "HEAD"
standardOutput = hashStdOut
}
def buildNumberStdOut = new ByteArrayOutputStream()
exec {
commandLine 'echo', "$BUILD_NUMBER"
@lucianomlima
lucianomlima / Cakes.js
Last active April 7, 2018 22:20 — forked from tosipaulo/react.js
React Cakes example component
import React from 'react';
import { Link } from 'react-router-dom';
import api from './Api';
class Cakes extends React.Component {
constructor(props){
super(props);
this.state = {
@lucianomlima
lucianomlima / php_version
Last active March 21, 2017 22:37 — forked from alex-arriaga/sphp
PHP Switcher Script; configure following this great post: https://getgrav.org/blog/mac-os-x-apache-setup-multiple-php-versions
#!/bin/bash
if [ $# -ne 1 ]; then
echo "Usage: php_version [phpversion]"
exit 1
fi
currentversion="`php -r \"echo str_replace('.', '', substr(phpversion(), 0, 3));\"`"
newversion="$1"
/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0