Skip to content

Instantly share code, notes, and snippets.

View paulayo93's full-sized avatar
🌜
I code, ship and test enterprise solutions

Paul Oloyede paulayo93

🌜
I code, ship and test enterprise solutions
View GitHub Profile
import React, { useEffect } from 'react';
import { ActivityIndicator, Dimensions, Image, StyleSheet, View } from 'react-native';
import { PanGestureHandler } from 'react-native-gesture-handler';
import Animated, {
Extrapolate,
Extrapolation,
interpolate,
runOnJS,
useAnimatedGestureHandler,
useAnimatedStyle,
HTML
- Semantic HTML
- Event delegation
- Accessibility / ARIA
CSS
- Specificity
- Pseudo-elements
- Pseudo-selectors
- Combinators
@haydenbleasel
haydenbleasel / react-native-phone-input.js
Created January 25, 2020 12:32
React Native phone input with country code selector
import React, { useState } from 'react';
import CountryPicker from 'react-native-country-picker-modal';
import PNF, { PhoneNumberUtil } from 'google-libphonenumber';
const [countryCode, setCountryCode] = useState('AU');
const [phoneNumber, setPhoneNumber] = useState('');
const phoneUtil = PhoneNumberUtil.getInstance();
function setCode ({ cca2 }) {
setCountryCode(cca2);
// MainActivity.java
@Override
protected ReactActivityDelegate createReactActivityDelegate() {
return new ReactActivityDelegate(this, getMainComponentName()) {
@Override
protected ReactRootView createRootView() {
return new RNGestureHandlerEnabledRootView(MainActivity.this);
}
@shesek
shesek / address-to-scripthash.md
Last active January 5, 2024 00:55
Bitcoin address to electrum scripthash with nodejs
$ npm install bitcoinjs-lib
$ node -p 'b=require("bitcoinjs-lib");s=b.address.toOutputScript("2MwEUm842QN4YoetosKc1YbeFpHDjsZ6scS", b.networks.regtest);Buffer.from(b.crypto.sha256(s).reverse()).toString("hex")'

Note the b.networks.regtest, change if the address is on a different network.

@Mike-Gough
Mike-Gough / README.md
Last active February 20, 2024 07:10
Setup new React Native project with Typescript and Storyboard

React Native App Creation Recipe

This is a step-by-step guide to create React Native app.

You will get an application which has;

  • TypeScript
  • Linting
  • Formatting
  • Testing
@pritishvaidya
pritishvaidya / RNRollup.config.js
Created January 22, 2019 10:52
Sample Rollup Config for react-native
/* eslint-disable flowtype/require-valid-file-annotation, no-console, import/extensions */
import nodeResolve from 'rollup-plugin-node-resolve';
import replace from 'rollup-plugin-replace';
import commonjs from 'rollup-plugin-commonjs';
import babel from 'rollup-plugin-babel';
import json from 'rollup-plugin-json';
import { terser } from 'rollup-plugin-terser';
import sourceMaps from 'rollup-plugin-sourcemaps';
import pkg from './package.json';
@bradtraversy
bradtraversy / django_deploy.md
Last active April 4, 2024 11:28
Django Deployment - Digital Ocean

Django Deployment to Ubuntu 18.04

In this guide I will go through all the steps to create a VPS, secure it and deploy a Django application. This is a summarized document from this digital ocean doc

Any commands with "$" at the beginning run on your local machine and any "#" run when logged into the server

Create A Digital Ocean Droplet

Use this link and get $10 free. Just select the $5 plan unless this a production app.

@hufeng
hufeng / rollup.config.js
Created September 10, 2018 09:25 — forked from EmielM/rollup.config.js
react-native rollup bundle attempt
import fs from 'fs';
import path from 'path';
import babel from 'rollup-plugin-babel';
import commonjs from 'rollup-plugin-commonjs';
import nodeResolve from 'rollup-plugin-node-resolve';
import typescript from 'rollup-plugin-typescript';
import replace from 'rollup-plugin-replace';
function findVersion(file, extensions) {
for (let e of extensions) {
.grid {
@include gridLayout(
(7, 2), //item 1
(5, 1), //item 2
(5, 1), //item 3
(12, 1) //item 4
);
}