Skip to content

Instantly share code, notes, and snippets.

Avatar
🌞
Where are the waves?!

Jeff Wainwright yowainwright

🌞
Where are the waves?!
View GitHub Profile
@yowainwright
yowainwright / cloudSettings
Last active Jul 9, 2019
Visual Studio Code Settings Sync Gist
View cloudSettings
{"lastUpload":"2019-06-20T18:32:46.864Z","extensionVersion":"v3.2.9"}
@yowainwright
yowainwright / git-cmds-i-forget.md
Last active Apr 4, 2018
Git commands I forget 🤷🏽‍♂️
View git-cmds-i-forget.md

Git commands I forget

Listed below are git commands that I forget.

Reset a single file to a specific branch

git checkout <branch> <file>
# for example
git checkout origin/master package.json
@yowainwright
yowainwright / bold-list-headers.md
Last active Dec 12, 2017
Bold list headers with `.md`
View bold-list-headers.md

Bold List Headers in Markdown

This is a test for the look of bold list headers in markdown.

The goal of this gist is to examine using <header> tags or <strong> tags.


List header that is bold with the <h4> tag.

  • List Header 1 code

@yowainwright
yowainwright / npm-clutch-cmds.md
Last active Dec 13, 2017
NPM clutch cmds ✇
View npm-clutch-cmds.md

NPM clutch cmds ✇

  • clean cache

    Run an offline verification of existing cache contents

     npm cache verify

    Run cache clear for saving disk space purpose

     npm cache clean --force
@yowainwright
yowainwright / observer.js
Last active Dec 14, 2017
ES5/6 Observer 👀
View observer.js
/*
ES5/6 Observer 👀
---
- Like a promise (sort of) but will work in older browsers
- With Babel, this will transpile to something very similar to want is written
- Note the error
- both callback, err will return empty strings by default
- bool is false by default
*/
const observer = (bool = false, callback = () => '', iterator = 10, maxTime = 300, err = () => '') => {
@yowainwright
yowainwright / darn-characters-i-forget.md
Last active Jun 28, 2018
Darn characters I forget 🤷
View darn-characters-i-forget.md

Darn Characters I Forget 🤷

  • is the Command (cmd)() key

  • is the Control key

  • is the Option (alt) key

  • is the Shift key

  • is the Caps Lock key

  • fn is the Function key


@yowainwright
yowainwright / head.html
Last active Dec 10, 2017
Favicon Head Gist 🖼
View head.html
<!-- android -->
<link rel="icon" type="image/png" sizes="192x192" href="/android-chrome-192x192.png">
<link rel="icon" type="image/png" sizes="512x512" href="/android-chrome-512x512.png">
<!-- apple -->
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<!-- favicon -->
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<!-- manifest -->
<link rel="manifest" href="/manifest.json">
@yowainwright
yowainwright / fav-colors.css
Last active Dec 9, 2017
Fav hex colors 🖍
View fav-colors.css
/* usual suspects 👥 */
--blue: blue; /* yep, it's just the truth */
--redpink: #FB2743; /* I saw it on ASOS. I like what they're doing with blue. */
--floralwhite: #fffcf3 #fff floralwhite hsl(45,100,97)rgb(255,252,243); /* I saw it on Cosma Schema. */
/* off the beaten path, but weird and refreshing 👨‍🎨 */
--lightpurple: #E2D7FE;
--cartoonflesh: #FFAEA2;
--deeputramarine: #152783;
View input-frequency.js
switch (inputFrequency) {
case 1:
date = this.nextBillDateIsWithinOneMonth(nextBillDate) ?
moment(nextBillDate) : moment(nextBillDate).subtract(1, 'month')
break
case > initialFrequency:
newFrequencyDelta = (inputFrequency - initialFrequency)
date = moment(nextBillDate).add(newFrequencyDelta, 'month')
break
default:
@yowainwright
yowainwright / play-button.scss
Last active Dec 9, 2017
SCSS Play Button Mixin
View play-button.scss
@mixin play-button ($fontsize, $circlesize) {
position: relative;
&:after {
content: '';
display: block;
width: $circlesize;
height: $circlesize;
border-radius: 100%;
position: absolute;
left: calc(50% - #{$circlesize / 2});