Skip to content

Instantly share code, notes, and snippets.

View codycraven's full-sized avatar

Cody Craven codycraven

View GitHub Profile
@codycraven
codycraven / jira-epic-recursive-children-overlay.js
Created September 16, 2020 18:50
Bookmarklet to display an overlay showing all children of an epic with their status
// This is a Jira tool for use as a bookmarklet that will recursively
// display child stories for an Epic.
//
// To use this bookmarklet, modify the `rankField` ID to match your Jira
// install. Then create a new bookmark in your browser, enter `javascript:`
// then paste this script after javascript: (line breaks will be removed).
//
// Now when you are viewing a Jira epic's page, click the bookmarklet you
// created and you should see an overlay showing all children (up to 50)
// and their sub-tasks (if any).
@codycraven
codycraven / jira-status.js
Created October 7, 2019 20:36
Bookmarklet to grab summary information for a Jira ticket
// This is a Jira issue status grabber to grab link, summary, and custom fields
// for use as a bookmarklet
//
// Right now, these custom fields only support user references.
//
// To use this bookmarklet, modify the `customFields` setting for your Jira
// install. Then create a new bookmark in your browser, enter `javascript:`
// then paste this script after javascript: (line breaks will be removed).
//
// Now when you are on a Jira issue page, click the bookmarklet you created
@codycraven
codycraven / jira-copy-story-summary.js
Created August 2, 2019 19:19
TamperMonkey Jira Copy Story Summary
// ==UserScript==
// @name Jira copy story summary
// @namespace https://cravencode.com/
// @version 0.1
// @description Copies summary, issue link, and people associated with story to clipboard
// @match https://*.atlassian.net/browse/*
// @copyright 2019, Cody Craven
// ==/UserScript==
(function(d) {
@codycraven
codycraven / jira-child-issue-status.js
Last active August 20, 2021 18:06
TamperMonkey Jira Portfolio Cloud Child Issue Augmentation
// ==UserScript==
// @name Jira child issue status
// @namespace https://cravencode.com/
// @version 0.1
// @description Adds child status to JIRA parent issues
// @match https://*.atlassian.net/browse/*
// @copyright 2018, Cody Craven
// ==/UserScript==
(function() {
@codycraven
codycraven / find-overflow-x.js
Last active March 15, 2018 18:36
Find overflow x element in page
// via https://css-tricks.com/findingfixing-unintended-body-overflow/
var docWidth = document.documentElement.offsetWidth;
[].forEach.call(
document.querySelectorAll('*'),
function(el) {
if (el.offsetWidth > docWidth) {
console.log(el);
}
#!/bin/bash
# This upgrade assumes you are working from a Drone 0.7 instance configured
# like: https://gist.github.com/codycraven/c28ba26a720121c5eee845822511c4f0
# Get sudo
sudo echo
# Pull in Drone images we'll be using.
docker pull drone/drone:0.8.2
<?php
function validCheckDigit($number) {
// Reverse digits.
$digits = str_split(strrev($number));
$sumDigits = [];
foreach ($digits as $key => $value) {
// Double every other digit, starting with the check digit.
if ($key % 2 !== 0) {
// Sum tens and ones place when greater than 9.
#!/bin/bash
# Before running this make sure Caddy and Docker are installed:
# https://gist.github.com/codycraven/bba48dcdcd87a9df4e2bb87834b5a65d
# https://gist.github.com/codycraven/24752be91b676b1c193771a652f4b60d
# Get sudo
sudo echo
# Manual configuration
#!/bin/bash
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
apt-cache policy docker-ce
sleep 5
sudo apt-get install -y docker-ce
#!/bin/bash
curl -s https://getcaddy.com | bash
which caddy
sleep 5
sudo mkdir /etc/caddy
sudo chown -R root:www-data /etc/caddy
sudo touch /etc/caddy/Caddyfile