Skip to content

Instantly share code, notes, and snippets.

View dgrebb's full-sized avatar

Dan Grebb dgrebb

View GitHub Profile
@dgrebb
dgrebb / index.js
Created June 26, 2017 15:05
BrowserStack Automate Test Local Example
/**
# bash
# Mac-specific
cd /Applications
./BrowserStackLocal --key [your browserstack key] --local-identifier PatternLab
*/
var webdriver = require('selenium-webdriver'),
By = webdriver.By;
# SYNTAX:
var pattern = new RegExp(pattern, attributes); # attributes: g (global); i (case-sensitive); m (multiline matches)
var pattern = /pattern/attributes; # same as above
# BRACKETS:
[...]: Any one character between the brackets.
[^...]: Any one character not between the brackets.
@dgrebb
dgrebb / _README.md
Last active September 21, 2017 15:04
webpack version plugin

Define a webpack plugin that pulls version information from package.json.

@dgrebb
dgrebb / .gitaliases
Created September 6, 2018 19:45
Aliases for use with Git.
#
# Aliases
# (sorted alphabetically)
#
alias g='git'
alias ga='git add'
alias gaa='git add --all'
alias gapa='git add --patch'
@dgrebb
dgrebb / docker-destroy-all.sh
Created April 27, 2019 22:26 — forked from JeffBelback/docker-destroy-all.sh
Destroy all Docker Containers and Images
#!/bin/bash
# Stop all containers
docker stop $(docker ps -a -q)
# Delete all containers
docker rm $(docker ps -a -q)
# Delete all images
docker rmi $(docker images -q)
@dgrebb
dgrebb / gist:8ac1bbf2d086d110f0cd8e81b0252adc
Created February 3, 2020 16:30
export list of git contributors
git log --no-merges --since='01-01-2019' --pretty=format:%h,%ad,%an,%ae,%s > history.csv
@dgrebb
dgrebb / +page.svelte
Created June 18, 2023 22:12
Parse markdown via `SvelteMarkdown` passing a custom `Link` component as renderer to add `target="_blank"` and `"rel=nofollow noopener noreferrer"` to external links in markdown
<script>
import SvelteMarkdown from 'svelte-markdown'
import Link from "../components/markdown/Link.svelte";
export let data;
const { title } = data;
</script>
<SvelteMarkdown
@dgrebb
dgrebb / theme.css
Last active October 15, 2023 17:12
CSS Theme Generator Maths
:root {
--base-color: #444484;
--highlight-base-color: #FA6E23;
--base-color-h: var(--base-color); /* Extract hue from the base color */
--base-color-l: var(--base-color); /* Extract lightness from the base color */
--base-color-s: var(--base-color); /* Extract saturation from the base color */
/* Adjust the step for lighter and darker shades */
--lightness-step: 15;
@dgrebb
dgrebb / styles.css
Last active September 11, 2023 20:16
Tabliss GitHub Calendar / Weather Customization
.GitHub {
width: 100%;
display: flex;
justify-content: center;
margin-bottom: -69px;
}
.sr-only {
display: none;
}
@dgrebb
dgrebb / .cprc
Created August 31, 2023 19:42
A Configuration for vscode-commit-prompt that more closely aligns with Commitizen-Tools vs. npm commitizen.
{
"config": {
"commit-prompt": {
"questions": [
{
"name": "type",
"placeHolder": "Select the type of change you are committing (type)",
"type": "oneOf",
"scopes": [
{