Skip to content

Instantly share code, notes, and snippets.

View nicksahler's full-sized avatar
🏪
Dreaming of bodegas

Nick nicksahler

🏪
Dreaming of bodegas
View GitHub Profile
@nicksahler
nicksahler / bookmarklet.md
Last active May 28, 2021 20:13
Bookmarklet: Toggle-Select Merged PRs in Github Notifications Page

This code simply checks or unchecks (clicks) the checkbox next to merged PRs at https://github.com/notifications. It's frustrating that Github doesn't let you filter on these by default.

Original Source:

[...document.querySelectorAll('.notifications-list-item')].forEach( item => {
  if(item.querySelector('.octicon-git-merge, .octicon-git-pull-request-closed')) {
    item.querySelector('input[type=checkbox]').click()
  }
git() { if [[ $@ == "gud" ]]; then curl https://gist.githubusercontent.com/nicksahler/8cb401e6ce030a00f2764e8122a7823b/raw/aba6ab58a36799bf1f75e046e663eed0a76c03f0/gistfile1.txt -s ; else command git "$@"; fi; }
// Sums duration of videos on youtube playlist pages
var total = 0;
var mult = [1, 60, 3600, 86400];
Array.prototype.map.call(document.getElementsByClassName('timestamp'),
function(a) {
var time = a.textContent.split(':').reverse()
for ( var i in time ) total += Number(time[i]) * mult[i];
}
);
### Keybase proof
I hereby claim:
* I am nicksahler on github.
* I am nicksahler (https://keybase.io/nicksahler) on keybase.
* I have a public key whose fingerprint is C34A 64C5 D4AD D5FF D3F3 013D 66D8 3E03 39D3 A010
To claim this, I am signing this object:
@nicksahler
nicksahler / holiday_bullshit_names
Last active January 1, 2016 11:49
Cards Against Humanity 12 Days of Holiday Bullshit names
{
"AARON": ["An extra A, to match your extra chromasome."],
"DJANGO": ["Did you mean the over-rated musician with the stupid name or the overcomplicatd web framework with the stupid name?"],
"ABBY": ["Abby. Gets stabby. Don't make her crabby! Abby."],
"KANYE": ["Watch the Throne was really disappointing."],
"ABDUL": ["Abdul. What a ghoul. Smells like drool. Abdul."],
"WIL": ["You watch sports with a horse head on. And your name is stupid."],
"ABE": ["Let's be honest. Your name is stupid."],
"BIZ": ["Biz is as bad a name for a person as Jelly is for a company."],
"ABEL": ["I hope your brother kills you."],
@nicksahler
nicksahler / AsyncFlow
Last active December 22, 2015 03:09
Async flow control thingy
module.exports = function (functions, callback) {
var i = 0, args;
(function it(err) {
args = Array.prototype.slice.call(arguments);
args.shift();
if (i < functions.length && !err) {
try {
functions[i++].apply(this, [it].concat(args));