Skip to content

Instantly share code, notes, and snippets.

Avatar
👨‍🚀

Colby Fayock colbyfayock

👨‍🚀
View GitHub Profile
@colbyfayock
colbyfayock / github-action-chrome-version.yml
Created Apr 20, 2021
GitHub Actions - Installing a specific version of Chrome
View github-action-chrome-version.yml
# 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 / parseHumanTime.js
Created Mar 27, 2021
Parse human readable time in minutes and seconds
View parseHumanTime.js
function parseHumanTime(string) {
const units = {
'm': 'minutes',
'min': 'minutes',
'mins': 'minutes',
'minutes': 'minutes',
's': 'seconds',
'sec': 'seconds',
'secs': 'seconds',
'seconds': 'seconds'
View Colby's Lord of the Rings API Collection.postman_collection.json
{
"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 / github-context.json
Created May 31, 2020
Sample payload for Github Action `github` context
View github-context.json
{
"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
CSS Loading Animation
View loading.css
/**
* 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 / aliases.zsh
Created Apr 29, 2019
Remove local branches that merged into the specified branch
View aliases.zsh
# Example Usage: gpb develop
# Removes any branches that were already merged into develop
gpb() {
BRANCH=$1
BRANCHES_TO_CLEAN=$(git branch --merged=$BRANCH | grep -v $BRANCH)
echo "Branches that have been merged to develop:"
echo $BRANCHES_TO_CLEAN
read -q "REPLY?Remove branches? (y/n)"
echo ""
@colbyfayock
colbyfayock / Feature.md
Created Apr 25, 2019
E84 merge request template
View Feature.md

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 / invalidate-cache.js
Created Jun 10, 2018
Invalidate Cloudfront Cache from aws_s3 output in Grunt
View invalidate-cache.js
// Pulls in the changed files from aws_s3 at run time and pass them
// into cloudfront invalidation
grunt.registerTask('invalidate_cache', 'Invalidate Cloudfront from aws_s3 output', function (subtask) {
var aws_changed = grunt.config.get('aws_s3_changed'),
task = 'cloudfront',
changed_files;
if ( !Array.isArray(aws_changed) ) {
@colbyfayock
colbyfayock / CLI
Created Dec 4, 2013
Links and stuffs to read or eventually get to.
View CLI
http://explainshell.com/
http://www.cyberciti.biz/faq/linux-unix-bsd-xargs-construct-argument-lists-utility/