Skip to content

Instantly share code, notes, and snippets.

@alashstein
alashstein / index.js
Created September 25, 2018 20:52 — 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} />
// class
class ClassCar {
drive () {
console.log('Vroom!');
}
}
const car1 = new ClassCar();
console.log(car1.drive());

React Native Folder Structure

Motivations

  • Sharing what has worked for me in different React Native projects
  • Reusing screens in different parts of your app
  • Easy to work separately in a feature
  • Add an extra level (nested folder) only when necessary
  • Don't overuse index.js for everything
@alashstein
alashstein / introrx.md
Created April 29, 2019 04:33 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@alashstein
alashstein / m4a-to-mpr.md
Created April 24, 2020 08:07 — forked from pftg/m4a-to-mpr.md
Compress m4a with audio notes
ffmpeg -i tmp/audio-notes.m4a -acodec libmp3lame -aq 9 tmp/audio-notes.mp3
for file in *.m4a ; do ffmpeg -i $file -acodec libmp3lame -aq 9 ${file%.m4a}.mp3 ; done
@alashstein
alashstein / update-golang.md
Created July 12, 2021 05:03 — forked from nikhita/update-golang.md
How to update the Go version

How to update the Go version

System: Debian/Ubuntu/Fedora. Might work for others as well.

1. Uninstall the exisiting version

As mentioned here, to update a go version you will first need to uninstall the original version.

To uninstall, delete the /usr/local/go directory by: