Skip to content

Instantly share code, notes, and snippets.

@tharzeez
tharzeez / html_interpolation.js
Created Sep 23, 2020
Simple html interpolation for react native
View html_interpolation.js
/**
* Html interpolation for react native.
* Since lodash template wasnt supported in some devices.
* /{{.*?}}/ regex for Lazy quantifiers (non greedy stop at first occurence)
*/
let interpolationValues = {name: 'Tharzeez', workspace: 'my workspace'}
let interpolatedString = "Hello {{ name }}, welcome back to your {{ workspace }}".replace(/{{.*?}}/g, (char) => {
/**
View graph.txt
# Graph theory
Visualisation
https://www.cs.usfca.edu/~galles/visualization/DFS.html
View normalization
https://www.guru99.com/database-normalization.html
1NF
no comma separated values
must atomic
2NF
no partial dependency
@tharzeez
tharzeez / how-to-use-web3-with-react-native.md
Created Apr 25, 2018 — forked from dougbacelar/how-to-use-web3-with-react-native.md
This file describes how to set up the Ethereum JS API web3.js with the boilerplate Create React Native App
View how-to-use-web3-with-react-native.md

How to set up web3.js with CRNA

This is a simple guide to get you started with using the Ethereum Javascript API (web3.js) with the Create React Native App project. This is not an in-depth guide.

  1. Make sure you have Node version 6 or later installed, if not, get it on the Node website

    node --version

  2. Install Create React Native App

View gist:306292925f28abd8e75b2223d62b2ca3
ganache-cli
geth attach http://localhost:8545/
View NSDateFormatter cheat sheet
a: AM/PM
A: 0~86399999 (Millisecond of Day)
c/cc: 1~7 (Day of Week)
ccc: Sun/Mon/Tue/Wed/Thu/Fri/Sat
cccc: Sunday/Monday/Tuesday/Wednesday/Thursday/Friday/Saturday
d: 1~31 (0 padded Day of Month)
D: 1~366 (0 padded Day of Year)
You can’t perform that action at this time.