Skip to content

Instantly share code, notes, and snippets.

View herbowicz's full-sized avatar
🏠
Working from home

Greg Herbowicz herbowicz

🏠
Working from home
View GitHub Profile
@herbowicz
herbowicz / Loading.js
Last active November 3, 2019 10:17
Three dots animated . .. ... in loop
import React from "react";
import styled from "styled-components";
import ThreeDots from "../components/ThreeDots";
const Loading = styled.p`
color: #666;
display: table-cell;
vertical-align: middle;
`;

Keybase proof

I hereby claim:

  • I am herbowicz on github.
  • I am herbowicz (https://keybase.io/herbowicz) on keybase.
  • I have a public key whose fingerprint is 903D B494 4011 C05C FC99 98AA 2556 C437 30C4 3BDC

To claim this, I am signing this object:

@herbowicz
herbowicz / .env
Created July 7, 2019 07:02
social logins client ids and secret key
FACEBOOK_CLIENT_ID=
FACEBOOK_CLIENT_SECRET=
FACEBOOK_CALLBACK_URL=
GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=
GITHUB_CALLBACK_URL=
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
@herbowicz
herbowicz / gist:cccfdcdce3bb9e77bf1c551fd405ed17
Created June 15, 2019 09:19
new-project starter (index.html, css/style.css, js/script.js)
mkdir new-project && cd new-project && touch index.html && mkdir css && cd css && touch style.css && cd .. && mkdir js && cd js && touch script.js && cd .. && code .
@herbowicz
herbowicz / index.html
Created May 14, 2019 10:03
Particles simplest demo
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
/* ---- reset ---- */ body{ margin:0; font:normal 75% Arial, Helvetica, sans-serif; } canvas{ display: block; vertical-align: bottom; } /* ---- particles.js container ---- */ #particles-js{ position:absolute; width: 100%; height: 100%; background-color: #666; background-image: url(""); background-repeat: repeat; background-size: cover; background-position: 50% 50%; } /* ---- stats.js ---- */ .count-particles{ background: #000022; position: absolute; top: 48px; left: 0; width: 80px; color: #13E8E9; font-size: .8em; text-align: left; text-indent: 4px; line-height: 14px; padding-bottom: 2px; font-family: Helvetica, Arial, sans-serif; font-weight: bold; } .js-count-particles{ font-size: 1.1em; } #stats, .count-particles{ -webkit-user-select: none; margin-top
[
{
"date": "1/1/2018",
"high": 36,
"avg": 34,
"low": 32
},
{
"date": "1/2/2018",
"high": 44,
@herbowicz
herbowicz / index.html
Created April 18, 2019 16:20
Map Data Across the Globe - D3.js - FCC
<h1><a href="https://www.freecodecamp.org/challenges/map-data-across-the-globe" target="_blank">Map Data Across the Globe</a></h1>
<h3>FreeCodeCamp</h3>
<h5>Zoom in/out | Hover over the data point for additional data</h5>
<h5><a href="https://youtu.be/dJbpo8R47D0" target="_blank">Watch this tutorial</a></h5>
<div id="map"></div>
<div id="tooltip">
Name: <span id="name" class="info"></span><br>
Nametype: <span id="nametype" class="info"></span><br>
@herbowicz
herbowicz / assertJoi.js
Last active July 23, 2018 05:09
Joi validation example
const schema = Joi.number().min(18).max(130);
const age = 20;
Joi.assert(age, schema);
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Holiday</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" media="screen" href="main.css" />
</head>
<body>
@herbowicz
herbowicz / time.js
Created March 30, 2018 04:56
time utility function
function time() {
const now = new Date(),
h = now.getHours(),
m = now.getMinutes(),
s = now.getSeconds()
return `${h === 0 ? 12 : h > 12 ? h - 12 : h}:${(m <= 9 && '0') + m}:${(s <= 9 && '0') + s} ${h >= 12 ? 'PM' : 'AM'}`
}
time()