Skip to content

Instantly share code, notes, and snippets.

View eightyfive's full-sized avatar

0x55 eightyfive

View GitHub Profile
@eightyfive
eightyfive / README.md
Last active September 29, 2021 08:42
rnna app starter
$ npx yown @rnna/app-starter
@eightyfive
eightyfive / README.md
Last active January 24, 2022 10:49
rnna app structure
$ npx yown @rnna/app

$ npm install rnna react-native-flipper @react-native-async-storage/async-storage

$ npm install --save-dev redux-flipper rn-async-storage-flipper


# Optional
$ npx yown @rnna/app-starter
@eightyfive
eightyfive / README.md
Last active January 14, 2021 15:27
Android react-native-splash-screen setup

Steps

  1. $ yarn add react-native-splash-screen
  2. $ cd ios/ && pod install && cd ..
  3. $ npx yown @eightyfive/react-native-splash-screen
  4. Rename yourapp folder to your project name
  5. Rename package com.yourapp in Java files
  6. Create android/app/src/main/res/drawable-hdpi/logo.png file (1024x1024, transparent background)

Warning

@eightyfive
eightyfive / spacing.js
Last active November 23, 2020 20:55
Simple react-native spacing strategy: `mb[3]`, `px[0]`, ...
import { StyleSheet } from 'react-native';
export const sizes = [0, 4, 8, 16, 32, 64, 128];
// https://stackoverflow.com/a/56219676/925307
const make = (key, sizes) => sizes.map((size) => ({ [key]: size }));
export const m = make('margin', sizes);
export const mt = make('marginTop', sizes);
export const mr = make('marginRight', sizes);
@eightyfive
eightyfive / .env.patch
Last active November 22, 2020 22:43
Laravel 8 app boilerplate
@@ -7,9 +7,9 @@
LOG_CHANNEL=stack
LOG_LEVEL=debug
-DB_CONNECTION=mysql
+DB_CONNECTION=pgsql
DB_HOST=127.0.0.1
-DB_PORT=3306
+DB_PORT=5432
DB_DATABASE=laravel
@eightyfive
eightyfive / app\View\Components\Bulma.php
Created November 22, 2020 21:21
Bulma Laravel Blade components
<?php
namespace App\View\Components;
use Illuminate\View\Component;
use Illuminate\View\ComponentAttributeBag;
use Illuminate\Support\HtmlString;
abstract class Bulma extends Component
{
@eightyfive
eightyfive / resources\sass\_bulma.scss
Last active January 4, 2022 23:18
Laravel App SASS (Bulma)
// Utilities
@import "../../node_modules/bulma/sass/utilities/functions";
@import "../../node_modules/bulma/sass/utilities/derived-variables";
@import "../../node_modules/bulma/sass/utilities/mixins";
@import "../../node_modules/bulma/sass/utilities/controls";
// Base
@import "../../node_modules/bulma/sass/base/minireset";
@import "../../node_modules/bulma/sass/base/generic";
@eightyfive
eightyfive / app\dial.scss
Last active January 25, 2021 16:01
Flexbox `dial` positioning system
// dial.css
[class^="col-"],
[class*=" col-"] {
display: flex;
flex-direction: column;
}
[class^="row-"],
[class*=" row-"] {
display: flex;
import { Platform } from 'react-native';
import Env from '../env';
export default {
url: `${Env.APP_URL}/${Env.API_PREFIX}`,
options: {
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
@eightyfive
eightyfive / activity-indicator.js
Last active December 15, 2020 14:25
A collection of React Native atoms (atomic design)
import React from 'react';
import { ActivityIndicator as RNActivityIndicator } from 'react-native';
export default function ActivityIndicator({
color = 'white',
large = false,
...rest
}) {
const size = large ? 'large' : 'small';