Skip to content

Instantly share code, notes, and snippets.

View colbyfayock's full-sized avatar
👨‍🚀

Colby Fayock colbyfayock

👨‍🚀
View GitHub Profile
@colbyfayock
colbyfayock / github-context.json
Created May 31, 2020 18:05
Sample payload for Github Action `github` context
{
"token": "[token]",
"job": "notifySlack",
"ref": "refs/pull/4/merge",
"sha": "[shad]",
"repository": "colbyfayock/demo-github-actions",
"repository_owner": "colbyfayock",
"repositoryUrl": "git://github.com/colbyfayock/demo-github-actions.git",
"run_id": 120667610,
"run_number": "2",
@colbyfayock
colbyfayock / loading.css
Created May 2, 2020 19:43
CSS Loading Animation
/**
* Loading Animation Snippet
*/
.loading {
color: transparent;
background: linear-gradient(100deg, #eceff1 30%, #f6f7f8 50%, #eceff1 70%);
background-size: 400%;
animation: loading 1.2s ease-in-out infinite;
}
@colbyfayock
colbyfayock / Filter Data
Created August 11, 2021 02:04
GitHub Copilot Suggestion Examples
/* Input */
const recipes = [
{
name: 'Fried Chicken',
categories: ['chicken', 'meat']
},
{
name: 'Spinach Pasta',
categories: ['pasta', 'vegan']
@colbyfayock
colbyfayock / github-action-chrome-version.yml
Created April 20, 2021 14:39
GitHub Actions - Installing a specific version of Chrome
# Follow instructions under "Old Builds" here: https://www.chromium.org/getting-involved/download-chromium
# Add the version number in the variable below and run the step before needed
# "-1" may not show in the actual version number
steps:
- run: |
VERSION_STRING="88.0.4324.96-1"
wget "https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_${VERSION_STRING}_amd64.deb"
sudo dpkg -i "google-chrome-stable_${VERSION_STRING}_amd64.deb"
@colbyfayock
colbyfayock / Feature.md
Created April 25, 2019 12:47
E84 merge request template

Overview

What is the feature?

(Describe what the feature is)

What is the solution?

(Describe at a high level how the feature was implemented)

What areas of the site does impact?

(Describe what parts of the site are impacted andifcode touched other areas)

@colbyfayock
colbyfayock / gist:f0778baf2684d49fdaace5ee37e70138
Created September 25, 2022 20:52
Upload Blob to Cloudinary in Node
const response = await fetch("https://pbs.twimg.com/profile_images/1457798886710738944/HWg9ES8r_400x400.jpg")
const contentType = response.headers.get("Content-Type");
const blob = await response.blob();
const arrayBuffer = await blob.arrayBuffer();
const buffer = Buffer.from(arrayBuffer);
const dataUri = `data:${contentType};base64,${buffer.toString('base64')}`;
const upload = await cloudinary.uploader.upload(dataUri);
@colbyfayock
colbyfayock / parseHumanTime.js
Created March 27, 2021 18:07
Parse human readable time in minutes and seconds
function parseHumanTime(string) {
const units = {
'm': 'minutes',
'min': 'minutes',
'mins': 'minutes',
'minutes': 'minutes',
's': 'seconds',
'sec': 'seconds',
'secs': 'seconds',
'seconds': 'seconds'
{
"info": {
"_postman_id": "e0ee1a9f-a83b-4bd0-97f1-3dd00c6cbafe",
"name": "Colby's Lord of the Rings API Collection",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "Movie",
"item": [
@colbyfayock
colbyfayock / CLI
Created December 4, 2013 19:32
Links and stuffs to read or eventually get to.
http://explainshell.com/
http://www.cyberciti.biz/faq/linux-unix-bsd-xargs-construct-argument-lists-utility/