Skip to content

Instantly share code, notes, and snippets.

View NickFoden's full-sized avatar
🐯
I'm here live, i'm not a cat.

Nick Foden NickFoden

🐯
I'm here live, i'm not a cat.
View GitHub Profile
@NickFoden
NickFoden / fomatter.js
Created December 3, 2019 21:47
JavaScript Currency Formatter for Us Currency
const formatter = new Intl.NumberFormat("en-US", {
style: "currency",
currency: "USD",
minimumFractionDigits: 2
});
//formatter.format(100000)
@NickFoden
NickFoden / fauna-nf.md
Last active July 16, 2019 17:09
A Create React App script to add folders and methods for FaunaDB

https://www.npmjs.com/package/fauna-nf

fauna-nf

This package is a script that can be used with CRA - Create React App

To use you run the regular CRA command and append --scripts-version fauna-nf

This will set you up with a standard Create React App which includes a fauna folder and a file with some basic methods to get you started working with faunadb.

import * as React from "react";
import socialMeetup from "../assets/social-meetup.svg";
import socialTwitter from "../assets/social-twitter.svg";
interface SocialInterface {
meetup: SocialObject;
twitter: SocialObject;
}
interface SocialObject {
import React, { Component } from "react";
import client from "../../sanity/api";
import "./avantGarde.scss";
const query = `*[_type == "photos" && categories[]-> title match "Avant*"] {
_id,
album,
"imageUrl": mainImage.asset->url,
title
}[0...50]
@NickFoden
NickFoden / notes.txt
Created February 19, 2019 04:06
Reading Navi Docs Feb 18 2019
https://frontarm.com/navi/en/guides/getting-started/
"including any data you’ve declared on you routes."
*your
@NickFoden
NickFoden / fbCopy.js
Created January 27, 2019 14:20
Copy Firebase RTDB Node
function fbCopy(oldRef, newRef) {
return Promise((resolve, reject) => {
oldRef.once('value').then(snap => {
return newRef.set(snap.val());
}).then(() => {
console.log('Done!');
resolve();
}).catch(err => {
console.log(err.message);
reject();
@NickFoden
NickFoden / config.yml
Created January 23, 2019 03:38
Circle Ci Setup
version: 2
jobs:
build:
docker:
- image: circleci/node:8
steps:
- checkout
- restore_cache: # special step to restore the dependency cache
key: dependency-cache-{{ checksum "package.json" }}
- run:
@NickFoden
NickFoden / index.html
Last active December 13, 2018 22:41
Ken Wheeler slick
<html>
<head>
<title>My Now Amazing Webpage</title>
<link rel="stylesheet" type="text/css" href="slick/slick.css"/>
<link rel="stylesheet" type="text/css" href="slick/slick-theme.css"/>
<style type="text/css">
.carousel{
height: 200px;
width:90%;
@NickFoden
NickFoden / US States Json for React-Select
Last active September 21, 2018 02:55
US States for React Select options
const options = [
{ value: "AL", label: "AL - Alabama" },
{ value: "AK", label: "AK - Alaska" },
{ value: "AZ", label: "AZ - Arizona" },
{ value: "AR", label: "AR - Arkansas" },
{ value: "CA", label: "CA - California" },
{ value: "CO", label: "CO - Colorado" },
{ value: "CT", label: "CT - Connecticut" },
{ value: "DE", label: "DE - Delaware" },
{ value: "DC", label: "DC - District Of Columbia" },
import React, { Component } from "react";
import firebase from "../config/firebase";
import {
FormGroup,
ControlLabel,
FormControl,
Button,
Form
} from "react-bootstrap";
import "./components-css/login.css";