Skip to content

Instantly share code, notes, and snippets.

View flexbox's full-sized avatar

David Leuliette flexbox

View GitHub Profile
@flexbox
flexbox / bump-version.js
Last active December 15, 2023 08:51
numb version React Native expo usage in package.json `"release": "node bin/bump-app-version.js && bin/release",`
/* eslint-disable prefer-destructuring */
/* eslint-disable @typescript-eslint/no-var-requires */
const fs = require("fs");
// Read the contents of the app.config.ts file
fs.readFile("app.config.ts", "utf8", (err, data) => {
if (err) {
throw err;
}
id title
nb-icons
NativeBase Icons

NativeBase Icons was designed to make the integration of icons in NativeBase projects easier. It is a unified library that can export icons and fonts for all native and web platforms.

Built With

  • react-native-vector-icons
@flexbox
flexbox / index.js
Created March 16, 2020 16:25
airplane-sorting-algorithm.js
function solution(N, S) {
const occupied = S.split(' ')
let available = 0
console.log("solution -> available", available)
for (let index = 0; index < N; index++) {
if (
occupied[index] === `${index + 1}A` ||
occupied[index] === `${index + 1}B` ||
@flexbox
flexbox / 1-api.js
Last active January 30, 2020 15:57
Async / await cheatsheet
async customerUpdate(fields) {
try {
const { status, data } = await this.$axios…
return { status, data }
} catch (e) {
throw new Error(e)
}
}
{
id: 1,
type: 'locked',
title: 'Inspired',
description_locked: '',
description_achieved: '',
congratulation: '',
illustration: 'inspired'
},
{
<?xml version="1.0" encoding="utf-8" ?>
<!-- SQL XML created by WWW SQL Designer, https://github.com/ondras/wwwsqldesigner/ -->
<!-- Active URL: https://kitt.lewagon.com/db/825 -->
<sql>
<datatypes db="postgresql">
<group label="Numeric" color="rgb(238,238,170)">
<type label="Integer" length="0" sql="INTEGER" re="INT" quote=""/>
<type label="Small Integer" length="0" sql="SMALLINT" quote=""/>
<type label="Big Integer" length="0" sql="BIGINT" quote=""/>
<type label="Decimal" length="1" sql="DECIMAL" re="numeric" quote=""/>
@flexbox
flexbox / test.md
Last active October 25, 2020 13:39

🤸‍♀️ Exercise 1

  • Create a Stack Navigator in src/exercice/02/PublicNavigator.tsx that shows the LoginScreen and the TermsScreen. You can read the official documentation https://reactnavigation.org/docs/stack-navigator/

  • Use LOGIN_SCREEN and TOC_SCREEN as route names to maintain consistency when navigating

  • Update the entry point of your application. Wrap your PublicStack with NavigationContainer using the Stack Navigator from src/final/02/PublicNavigator.tsx.

Hint: If you are lost you can debug the changes on the NavigationContainer with onStateChange={state => console.log('New state is', state)}

.card {
width: 300px;
height: 225px;
position: relative;
overflow: hidden;
border-radius: 20px;
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
display: grid;
grid-template-rows: 1fr 1fr;
transition: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
#!/bin/sh
buildnumber=$(jq '.expo.ios.buildNumber' app.json)
echo ''
echo 'Build number: ' $buildnumber
echo ''
read -p "Continue the build? " -n 1 -r
echo # (optional) move to a new line
if [[ ! $REPLY =~ ^[Yy]$ ]]