Skip to content

Instantly share code, notes, and snippets.


Benjamin Charity benjamincharity

View GitHub Profile
larsxschneider /
Last active Mar 24, 2020
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
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 Feb 23, 2022
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 Jun 21, 2022
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 Jan 28, 2019
Handy list of widths to target in a responsive website
View gist:0d5572a29e4f5688a1c8
adamreisnz / Setup GitHub issue labels script
Last active Nov 17, 2016 — 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 Feb 10, 2016
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 Jun 21, 2022
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 Jun 25, 2022
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
View embed-plunker.html
<iframe style="width: 100%; height: 600px" src="" frameborder="0" allowfullscren="allowfullscren"></iframe>