Skip to content

Instantly share code, notes, and snippets.

View mallory-jpg's full-sized avatar

Mallory.Tech mallory-jpg

View GitHub Profile
import './styles/App.css';
import twitterLogo from './assets/twitter-logo.svg';
import { ethers } from "ethers";
import React, { useEffect, useState } from "react";
import myEpicNft from './utils/MyEpicNFT.json';
const TWITTER_HANDLE = '_buildspace';
const TWITTER_LINK = `https://twitter.com/${TWITTER_HANDLE}`;
const OPENSEA_LINK = '';
const TOTAL_MINT_COUNT = 50;
@fauna-brecht
fauna-brecht / rate-limiting-fauna.js
Last active November 28, 2022 12:13
Rate limiting FaunaDb
import { rateLimiting } from '../../fauna-queries/helpers/errors'
import faunadb from 'faunadb'
/*
* Ideally we limit the amount of calls that come to Login.
*/
const q = faunadb.query
const {
If,
Epoch,
Match,
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
<title>GeoAR.js demo</title>
<script src="https://cdn.jsdelivr.net/gh/aframevr/aframe@1c2407b26c61958baa93967b5412487cd94b290b/dist/aframe-master.min.js"></script>
<script src="https://unpkg.com/aframe-look-at-component@0.8.0/dist/aframe-look-at-component.min.js"></script>
<script src='https://raw.githack.com/jeromeetienne/AR.js/2.1.4/aframe/build/aframe-ar.js'></script>
<script>
const loadPlaces = function(coords) {
// fetch data from user coords using external APIs, or simply add places data statically
// please look at GeoAR.js repository on examples/click-places/places.js for full code
}
window.onload = () => {
const scene = document.querySelector('a-scene');
// first get current user location
return navigator.geolocation.getCurrentPosition(function (position) {
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
<title>GeoAR.js demo</title>
<!-- import aframe and AR.js -->
<script src='https://aframe.io/releases/0.9.2/aframe.min.js'></script>
<script src='https://raw.githack.com/jeromeetienne/AR.js/master/aframe/build/aframe-ar.min.js'></script>
@thiagomgo
thiagomgo / lambda-curl.py
Created November 1, 2016 19:13
A simple lambda function written in python to execute a curl command
def lambda_handler(event, context):
import subprocess
result = subprocess.call("curl -I http://foo.bar", shell=True)
return result