Skip to content

Instantly share code, notes, and snippets.

@AsaAyers
AsaAyers / inline-tools.js
Last active December 5, 2018 20:58
js console tools
/* eslint-disable func-names, no-plusplus, babel/semi, arrow-parens, no-ternary, no-undefined */
/* eslint semi: ["error", "never"] */
/* global inlineTools:true, copy */
inlineTools = (function () {
const replacer = (c) => `-${c.toLowerCase()}`
const toCSSProperty = (property) => property.replace(/[A-Z]/g, replacer)
.replace(/^webkit/, '-webkit')
@AsaAyers
AsaAyers / CleanBranches.sh
Last active June 2, 2021 15:03
Script for cleaning up merged branches
#!/bin/bash
# This script was written with the following assumptions:
# * you have two remotes: `upstream` and `origin`.
# * you only ever push to `origin`
# For most projects this would be master, but dev is our main branch
DEFAULT_BRANCH="dev"
  • e675f89...a7822d3 master -> master (forced update)
  1. Create a local branch where master belongs.

    git checkout -b fixmaster e675f89

a. If someone pushed to master between the last time you pulled and now you'll need to go to github to get the full hash. Go to https://github.com/<owner>/<repo>/commit/e675f89 and it'll have the full hash on the page.

`git fetch origin <full hash of e675f89>`

git checkout -b fixmaster e675f89