Skip to content

Instantly share code, notes, and snippets.

View dabbott's full-sized avatar

Devin Abbott dabbott

View GitHub Profile
@dabbott
dabbott / api.ts
Last active September 8, 2021 04:09
Getting data from the OpenPalette contract on mainnet
import { ethers } from "ethers";
import { abi, contractAddress } from "../utils/contract";
/**
* Fetch all token ids for an address.
*
* Tokens must be fetched one-at-a-time, due to how ERC721 contracts currently work.
* We return all tokens that were fetched successfully, and ignore fetching errors.
*/
export async function fetchAllTokenIds(
module.exports = require('react-navigation-bundle')
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-native")):"function"==typeof define&&define.amd?define(["React","ReactNative"],t):"object"==typeof exports?exports["react-navigation-bundle"]=t(require("react"),require("react-native")):e["react-navigation-bundle"]=t(e.React,e.ReactNative)}(window,(function(e,t){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=
const { AsyncStorage } = require('react-native')
module.exports = AsyncStorage
@dabbott
dabbott / ChartView.kt
Last active July 8, 2020 16:46
Native Chart Example
package com.priceexplorer
import android.content.Context
import android.graphics.*
import android.util.DisplayMetrics
import android.view.View
class ChartView(context: Context?) : View(context) {
var strokeWidth = 1f
var minimumValue = 0
@dabbott
dabbott / Balance.tsx
Last active July 7, 2020 19:57
PriceExplorer CurrencyRow
import React from 'react';
import {View, Text, StyleSheet} from 'react-native';
type Props = {
value: number;
};
export default function Balance({value}: Props) {
return (
<View style={styles.container}>
@dabbott
dabbott / README.md
Last active June 22, 2020 22:23
Writing style for .express sites
@dabbott
dabbott / memfs.ts
Last active April 18, 2020 03:23
Lona: memfs + unionfs proof of concept
import { FSWrapper } from '@lona/compiler/lib/helpers/fs'
import { Volume, createFsFromVolume } from 'memfs'
import { Union } from 'unionfs'
import fs from 'fs'
import path from 'path'
import { Volume as VolumeType } from 'memfs/lib/volume'
// Create a filesystem wrapper.
// Reading files: First try to read from the in-memory FS, falling back to the disk if a file is missing.
// Writing files: All files are written to the in-memory FS. We can write all files to disk later.

Flat Tokens

This is an example workspace for testing flat token generation.

Pages

Colors

TextStyles

import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
export default function App() {
return (
<View style={styles.container}>
<Text>Let's change this line to see if it works!</Text>
</View>
);
}