Skip to content

Instantly share code, notes, and snippets.


Benjamin Charity benjamincharity

View GitHub Profile
larsxschneider /
Last active March 24, 2020 19:14
Bookmarklet - Close all files in PR


Make a new bookmark in your browser. Set the name to Close all PR files (or something else you like) and set the URL to:

javascript:void((function(d){d.querySelectorAll('div:not(.Details--on) > div.file-header > div.file-actions > button').forEach(function(x){});})(document));


sdkks / iterm_nvim.AppleScript
Last active May 21, 2022 15:46
Open File with iTerm2 + nvim on OSX using Automator
View iterm_nvim.AppleScript
on run {input, parameters}
-- If run without input, open random file at $HOME
set filename to POSIX path of input
on error
set filename to "nvim-" & (do shell script "date +%F") & "__" & (random number from 1000 to 9999) & ".txt"
end try
-- Set your editor here
set myEditor to "/usr/local/bin/nvim"
-- Open the file and auto exit after done
macbookandrew / findStyles.js
Last active December 4, 2022 13:02
List unique CSS properties for all DOM elements
View findStyles.js
* List unique CSS properties for all DOM elements
* Initially created to list unique font stacks on a page
* @see {@link Inspired by this StackOverflow answer}
* @see {@link URL for this file}
* @author AndrewRMinion Design (
* @version 1.1
ericclemmons /
Last active January 13, 2023 19:01
HTML5 <details> in GitHub

Using <details> in GitHub

Suppose you're opening an issue and there's a lot noisey logs that may be useful.

Rather than wrecking readability, wrap it in a <details> tag!

 Summary Goes Here
wesbos / gist:0d5572a29e4f5688a1c8
Last active January 28, 2019 17:32
Handy list of widths to target in a responsive website
View gist:0d5572a29e4f5688a1c8
adamreisnz / Setup GitHub issue labels script
Last active November 17, 2016 14:38 — forked from hyubs/setup github issues
A terminal script to setup GitHub issue labels for a project.
View Setup GitHub issue labels script
Setup GitHub issue labels script
benjamincharity / phoneInput.directive.js
Last active February 10, 2016 13:09
Keep a phone number within an input formatted while keeping the model clean with only numbers
View phoneInput.directive.js
export function PhoneInputDirective(
$filter, $browser, $timeout
) {
const directive = {
restrict: 'A',
scope: {
phoneInput: '=',
MoOx / index.js
Last active January 25, 2023 13:10
Export/import github labels
View index.js
// go on you labels pages
// eg
// paste this script in your console
// copy the output and now you can import it using !
var labels = [];
.forEach(function(element) {
name: element.textContent.trim(),
cletusw / .eslintrc
Last active January 9, 2023 21:35
ESLint Reset - A starter .eslintrc file that resets all rules to off and includes a description of what each rule does. From here, enable the rules that you care about by changing the 0 to a 1 or 2. 1 means warning (will not affect exit code) and 2 means error (will affect exit code).
View .eslintrc
"ecmaFeatures": {
"binaryLiterals": false, // enable binary literals
"blockBindings": false, // enable let and const (aka block bindings)
"defaultParams": false, // enable default function parameters
"forOf": false, // enable for-of loops
"generators": false, // enable generators
"objectLiteralComputedProperties": false, // enable computed object literal property names
ericdouglas / embed-plunker.html
Created December 6, 2014 13:31
Embed Plunker
View embed-plunker.html
<iframe style="width: 100%; height: 600px" src="" frameborder="0" allowfullscren="allowfullscren"></iframe>