- Eva Icons: MIT
- Clarity Icons (MIT License)
- Feather Icons (MIT License)
- BallIcons (Commercial, not FOSS)
- Glyphish
- IconBros: Nice icons for commercial use
- DevIcons: Icons for programming languages and tools (Java, Atom etc)
- FontAwesome: SVGs and iconfont
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Video { | |
constructor(video){ | |
this.video = video; | |
} | |
setStream(stream){ | |
console.log('setting stream', stream) | |
this.video.srcObject = stream; | |
this.video.play(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const debouncedChunkedQueue = <T>( | |
fn: (items: T[]) => Promise<void> | void, | |
delay = 1000 | |
) => { | |
let items: T[] = [] | |
let started = false | |
const push = (item: T) => { | |
items.push(item) | |
if (!started) start() | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import faker from 'faker'; | |
import _ from 'lodash'; | |
import React, { useCallback, useEffect, useMemo, useState } from 'react'; | |
import { Col, Row } from 'react-bootstrap'; | |
import { AutoSizer, IndexRange, InfiniteLoader, List, ListRowProps } from 'react-virtualized'; | |
import wait from 'waait'; | |
import { SuperProps } from './super-props'; | |
export interface SuperListProps { | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { StyleSheet, Text, View, PermissionsAndroid, ProgressBarAndroid } from 'react-native'; | |
import RNFS from 'react-native-fs' | |
import forge from 'node-forge' | |
import {Buffer} from 'buffer' | |
import zlib from 'react-zlib-js' | |
const key = forge.random.getBytesSync(16); | |
const iv = forge.random.getBytesSync(16); | |
const limit_big = 1024*512; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { | |
useContext, | |
createContext, | |
createElement, | |
useEffect, | |
useRef, | |
useCallback, | |
useState, | |
} from 'react'; | |
import isEqual from 'react-fast-compare'; |
Developing an app to accompany our website, worried that we would lose people in the transition if they couldn't remember their password, we were looking to make our app do Password AutoFill, a feature in iOS.
A talk from WWDC introducing the feature: https://developer.apple.com/videos/play/wwdc2017/206/
It works well, but there were a few bumps in the road making it work for React Native on Expo, so here are some notes to help out.
Apple's docs are here: https://developer.apple.com/documentation/security/password_autofill and they say something like this:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import parseCsv from 'zipbooks/utils/parse-csv' | |
import { module, test } from 'qunit' | |
module('Unit | Utility | parse-csv', function(_hooks) { | |
test('parses csv successfully', function(assert) { | |
let result = parseCsv('name,age\nadam,31\ntim,32\n"St, clair",26') | |
assert.equal(JSON.stringify(result), '[["name","age"],["adam","31"],["tim","32"],["St, clair","26"]]') | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let elliptic = require('elliptic'); | |
let sha3 = require('js-sha3'); | |
let ec = new elliptic.ec('secp256k1'); | |
// let keyPair = ec.genKeyPair(); | |
let keyPair = ec.keyFromPrivate("97ddae0f3a25b92268175400149d65d6887b9cefaf28ea2c078e05cdc15a3c0a"); | |
let privKey = keyPair.getPrivate("hex"); | |
let pubKey = keyPair.getPublic(); | |
console.log(`Private key: ${privKey}`); | |
console.log("Public key :", pubKey.encode("hex").substr(2)); |
NewerOlder