Skip to content

Instantly share code, notes, and snippets.

View bobdobbalina's full-sized avatar

Mike Grunwald bobdobbalina

View GitHub Profile
@bobdobbalina
bobdobbalina / update_gitignore.sh
Last active February 12, 2021 19:02
Remove files from updated .gitignore
git ls-files -ci --exclude-standard -z | xargs -0 git rm --cached
### Alias in .zshrc or .bashrc because too hard to remember
# alias ungit="git ls-files -ci --exclude-standard -z | xargs -0 git rm --cached"
@bobdobbalina
bobdobbalina / _base.scss
Last active March 11, 2021 15:23
BitttersKitchenSink
// Bitters 2.0.4
// https://github.com/thoughtbot/bitters
// Copyright 2013-2019 thoughtbot, inc.
// MIT License
@import "variables";
@import "buttons";
@import "forms";
@import "layout";
@bobdobbalina
bobdobbalina / randomHex.js
Created March 22, 2021 21:33
Javascript: Random Hex Value
var randomColor = Math.floor(Math.random() * 16777215).toString(16);
@bobdobbalina
bobdobbalina / randomArrayItem.js
Last active March 23, 2021 18:28
Javascript: Get random item from array
function random_item(items) {
return items[Math.floor(Math.random() * items.length)];
}
const items = [254, 45, 212, 365, 2543];
console.log(random_item(items));
@bobdobbalina
bobdobbalina / codeswing.json
Last active May 10, 2021 11:09
Ian's Ten Minutes
{
"scripts": [],
"styles": []
}
@bobdobbalina
bobdobbalina / codeswing.json
Last active January 14, 2022 20:14
objectHasKeys
{
"scripts": [],
"showConsole": true
}
@bobdobbalina
bobdobbalina / slugify.js
Last active November 7, 2022 19:27
Javascript: slugify string
function slugify(string) {
return string.replace(/\W+/g, "-")
.replace(/[-]+$/, "")
.toLowerCase();
}