Skip to content

Instantly share code, notes, and snippets.

@tharzeez
tharzeez / NSDateFormatter cheat sheet
Created November 3, 2017 06:31 — forked from romaonthego/NSDateFormatter cheat sheet
Date Formats for NSDateFormatter
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)
@tharzeez
tharzeez / gist:306292925f28abd8e75b2223d62b2ca3
Created March 19, 2018 14:50
Steps for Setting up ganache-cli
ganache-cli
geth attach http://localhost:8545/
@tharzeez
tharzeez / how-to-use-web3-with-react-native.md
Created April 25, 2018 15:00
This file describes how to set up the Ethereum JS API web3.js with the boilerplate Create React Native App

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

https://www.guru99.com/database-normalization.html
1NF
no comma separated values
must atomic
2NF
no partial dependency
@tharzeez
tharzeez / graph.txt
Created February 19, 2020 06:58
Graph theory
# Graph theory
Visualisation
https://www.cs.usfca.edu/~galles/visualization/DFS.html
@tharzeez
tharzeez / html_interpolation.js
Created September 23, 2020 16:19
Simple html interpolation for react native
/**
* 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) => {
/**
HOCs and Custom hooks
https://dev.to/gethackteam/from-higher-order-components-hoc-to-react-hooks-2bm9