Skip to content

Instantly share code, notes, and snippets.

@eheikes
eheikes / get-contributors.sh
Last active August 13, 2018 12:54
Get git contributors/authors
#!/bin/sh
# Gets list of contributors in "name <email>" format (with the quotes).
# Pass it the path.
git log --pretty=short --format="\"%aN <%aE>\"," $1 | sort | uniq
@eheikes
eheikes / allmusic.js
Last active August 7, 2018 04:23
Hide allmusic top banner ad
// ==UserScript==
// @name Hide Allmusic ad at top of page
// @version 1.0
// @description Prevents shifting page
// @author Eric Heikes
// @include https://www.allmusic.com/*
// @grant none
// ==/UserScript==
(function() {
@eheikes
eheikes / medium-popup.js
Last active August 7, 2018 04:21
Tampermonkey snippet for Medium.com
// ==UserScript==
// @name Hide medium.com popup
// @version 1.0
// @namespace https://medium.com
// @description Removes the signup request popup
// @author Eric Heikes
// @match https://medium.com/*
// @grant none
// ==/UserScript==
@eheikes
eheikes / settings.json
Last active June 26, 2018 18:22
Visual Studio Code (vscode) user settings
// Place your settings in this file to overwrite the default settings
{
"editor.acceptSuggestionOnEnter": "off",
"editor.find.seedSearchStringFromSelection": false,
"editor.fontSize": 14,
"editor.insertSpaces": false,
"editor.renderWhitespace": "all",
"editor.scrollBeyondLastLine": false,
"editor.tabSize": 2,
"editor.wordWrap": "on",
@eheikes
eheikes / pitchfork-preview.js
Last active May 27, 2018 16:50
Opens a Pitchfork album review in Amazon for music previewing
(function(){
var artist = document.querySelector('.artist-links').textContent;
var album = document.querySelector('.single-album-tombstone__review-title').textContent;
var searchString = artist + ' ' + album;
var encoded = encodeURIComponent(searchString.replace(/\bep\b/gi, '')).replace(/ /g, '+');
var url = 'http://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Ddigital-music&field-keywords=' + encoded;
window.open(url, 'mp3search');
})();
@eheikes
eheikes / netflix-instant.js
Last active May 12, 2018 16:58
Randomly choose an item from your Netflix Instant queue. Run it on the My List page (after loading the whole page).
(function(){
var hd = document.querySelector('.main-header');
var movies = [].slice.call(document.querySelectorAll('.slider-item'));
var len = movies.length;
var i = Math.floor(Math.random() * len) + 1;
var movie = movies[i-1];
movies.forEach(function(movie) { movie.style.border = 'none'; });
movie.style.border = '2px solid red';
console.log(movie.querySelector('[aria-label]').getAttribute('aria-label'));
window.scrollBy(0, movie.getBoundingClientRect().top - hd.offsetHeight - 10);
@eheikes
eheikes / gh-projects.md
Last active April 11, 2018 16:34
Evaluation of GitHub projects

Using GitHub Projects

Pros

  • has automation option that works better than Waffle's buggy hooks
  • can track issues across organization repos without a "placeholder" or "main" repo
  • can just create a "card" (not a full-fledged GH issue)
  • has different templates (automated and manual)
  • don't need GH labels for statuses (in progress, needs review, etc); project columns track that
@eheikes
eheikes / gh-projects.md
Created April 11, 2018 16:28
Evaluation of GitHub projects

Using GitHub Projects

Pros

  • has automation option that works better than Waffle's buggy hooks
  • can track issues across organization repos without a "placeholder" or "main" repo
  • can just create a "card" (not a full-fledged GH issue)
  • has different templates (automated and manual)
  • don't need GH labels for statuses (in progress, needs review, etc); project columns track that
@eheikes
eheikes / test.ssml
Created December 28, 2017 04:18
example SSML file
<speak>
<prosody pitch="x-low">
It is safe to assert that no other country has such a distinctive form of landscape gardening as Japan. In English, French, Italian, and Dutch gardens, however original in their way, there are certain things they seem all to possess in common: terraces, which originally belonged to Italian gardens, were soon introduced into France; clipped trees, which were a distinctive feature of Dutch gardens, were copied by the English; the fashion of decorating gardens with flights of stone steps, balustrades, fountains, and statues at one time spread from Italy throughout Europe; and possibly the over-decoration of gardens led to a change in taste in England and a return to a more natural style. The gardens of China and Japan have remained unique; the Eastern style of gardening has never spread to any[2] other country, nor is it ever likely to; for, just as no Western artist will ever paint in the same manner as an Oriental artist because his whole artistic sense is different, so no Weste
@eheikes
eheikes / gutenberg.js
Created October 4, 2017 03:09
Add Gutenberg print CSS
// ==UserScript==
// @name Gutenberg
// @namespace https://github.com/BafS/Gutenberg
// @version 1.0
// @description Adds print CSS
// @author Eric Heikes
// @include *
// @exclude http*://localhost
// @grant none
// ==/UserScript==