Skip to content

Instantly share code, notes, and snippets.

View cmcculloh-kr's full-sized avatar

Christopher McCulloh cmcculloh-kr

View GitHub Profile
@cmcculloh-kr
cmcculloh-kr / branch-jira-bookmarklet.js
Last active November 1, 2023 14:07
Bookmarklet for creating Github branch names from JIRA tickets.
javascript: (function() {
const generateBranchName = () => {
const title = document.querySelector("title").innerText;
const issueCodeMatch = title.match(/\[(.*)\]/);
if (!issueCodeMatch) return;
let issueDescription = title.replace(/\[.*]\s/, "");
const parts = issueDescription.split(" - ");
issueDescription = parts.slice(0, parts.length - 1).join(" - ");
issueDescription = issueDescription.replace(/[^a-zA-Z0-9\s-]/g, '');
extends: ['eslint-config-airbnb'],
rules: {
'comma-dangle': [2, 'never'],
'id-length': [2, {
'min': 2,
'properties': 'never',
'exceptions': ['$', '_', 'e', 'i', 'j', 'a', 'b', 'n']
}],
'indent': [2, 'tab', {
'SwitchCase': 1
@cmcculloh-kr
cmcculloh-kr / staticDataTree.js
Created June 23, 2017 12:05
static data consuming tree
var findChildData = function findChildData (targetParent, rootData) {
if (_.isEmpty(targetParent)) {
return rootData;
}
if (rootData === undefined) {
return false;
}
for (var i = 0; i < rootData.length; i++) {
@cmcculloh-kr
cmcculloh-kr / branch-name-from-gus.js
Created November 21, 2018 20:36
Create a new git branch name from a GUS ticket
javascript: (function() {
let repoName;
let repoAuthor = document.querySelectorAll('#brandBand_1 .slds-form.slds-form_stacked.slds-grid.slds-page-header__detail-row .slds-page-header__detail-block.forceHighlightsDesktopListRecordItem:nth-of-type(6) a.textUnderline')[0].textContent;
let issueNumber;
if (document.querySelector('#brandBand_1 .slds-form.slds-form_stacked.slds-grid.slds-page-header__detail-row .slds-page-header__detail-block.forceHighlightsDesktopListRecordItem .uiOutputText') !== null) {
issueNumber = document.querySelector('#brandBand_1 .slds-form.slds-form_stacked.slds-grid.slds-page-header__detail-row .slds-page-header__detail-block.forceHighlightsDesktopListRecordItem .uiOutputText').textContent;
} else {
console.error('can not find issue number');
{
"binary_file_patterns":
[
"*.jpg",
"*.jpeg",
"*.png",
"*.gif",
"*.ttf",
"*.tga",
"*.dds",

Auto-fill OneView Timesheets

Forked from Michael Bruno

Install

  1. Download a plugin called Tamper Monkey.
  2. Navigate to http://oneview.kroger.com/
  3. Click the Tampermonkey extension icon in your browser, and select "create new script"
  4. Paste the script into the function body.