Skip to content

Instantly share code, notes, and snippets.

View bennkingy's full-sized avatar
👑
Developer

Benn King bennkingy

👑
Developer
View GitHub Profile
@bennkingy
bennkingy / index.html
Created January 26, 2022 14:57 — forked from timothycarambat/index.html
Login with ETH and show account NFTs using the OpenSea API
<head>
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
</head>
<body class="h-full">
<div class="
flex
w-full
mt-40
mb-10
@bennkingy
bennkingy / Map.js
Created December 10, 2021 16:03 — forked from tomsoderlund/Map.js
Using fitBounds in ReactMapGL to center points on map
import React, { useState } from 'react'
import ReactMapGL, { Marker, WebMercatorViewport } from 'react-map-gl'
const applyToArray = (func, array) => func.apply(Math, array)
const getBoundsForPoints = (points) => {
// Calculate corner values of bounds
const pointsLong = points.map(point => point.coordinates._long)
const pointsLat = points.map(point => point.coordinates._lat)
const cornersLongLat = [
@bennkingy
bennkingy / gulpfile.js
Created July 13, 2019 18:12 — forked from micmania1/gulpfile.js
Basic react gulpfile with browserfy and babel
var gulp = require('gulp');
var source = require('vinyl-source-stream');
var buffer = require('vinyl-buffer');
var watch = require('gulp-watch');
var gutil = require('gulp-util');
var browserify = require('browserify');
var babel = require('gulp-babel');
gulp.task('transform', function() {
return gulp.src('./app/src/**/*.jsx')