Skip to content

Instantly share code, notes, and snippets.

View willsheppard's full-sized avatar

Will Sheppard willsheppard

View GitHub Profile
@emlyn
emlyn / ms_ssi.js
Last active June 25, 2024 07:34
I keep getting shown the "Stay signed in" page on Microsoft domains, even when I select "don't show this again" - this script will automatically click on "yes" for you every time the page comes up.
// ==UserScript==
// @name Stay signed in to MS
// @description Automatically click "yes" on the Microsoft "stay signed in" page that keeps appearing.
// @downloadURL https://gist.github.com/emlyn/2f0c9702bd83fe7d232ed58626c90ac7/raw/ms_ssi.js
// @updateURL https://gist.github.com/emlyn/2f0c9702bd83fe7d232ed58626c90ac7/raw/ms_ssi.js
// @namespace https://gist.github.com/emlyn/
// @version 0.6
// @author Emlyn Corrin
// @match https://login.microsoftonline.com/*
// @match https://login.live.com/*
const sleep = (delay) => new Promise((resolve) => setTimeout(resolve, delay))
const repeatedGreetings = async () => {
await sleep(1000)
console.log("First")
await sleep(1000)
console.log("Second")
await sleep(1000)
console.log("Third")
}
@bmaupin
bmaupin / free-database-hosting.md
Last active November 16, 2024 22:43
Free database hosting
@berkedel
berkedel / flow-error-icu4c-not-loaded.md
Created April 4, 2018 14:13
dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.60.dylib

How to solve dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.60.dylib

brew uninstall --ignore-dependencies node icu4c
brew install node
@jsit
jsit / pinboard-bookmarklet.js
Last active October 9, 2024 14:16
Pinboard Bookmarklet -- Use text selection for description if available, otherwise use meta description, and include referrer in description if exists.
javascript: q = location.href;
q = q.replace(/[?&]utm_[^&]*/g, "");
q = q.replace(/[?&]mc_[^&]*/g, "");
q = q.replace(/[?&]src=[^&]*/g, "");
q = q.replace(/[?&]ref=[^&]*/g, "");
desc = "";
if (document.getElementsByName("description").length > 0) {
desc = document.getElementsByName("description")[0].getAttribute("content")
"\n\n"
} else if (document.getElementsByName("Description").length > 0) {
@lmarkus
lmarkus / README.MD
Last active October 3, 2024 18:13
Extracting / Exporting custom emoji from Slack

Extracting Emoji From Slack!

Slack doesn't provide an easy way to extract custom emoji from a team. (Especially teams with thousands of custom emoji) This Gist walks you through a relatively simple approach to get your emoji out.

If you're an admin of your own team, you can get the list of emoji directly using this API: https://api.slack.com/methods/emoji.list. Once you have it, skip to Step 3

HOWEVER! This gist is intended for people who don't have admin access, nor access tokens for using that list.

Follow along...

@miyagawa
miyagawa / forkprove.pl
Created November 6, 2012 11:45
preload modules and then fork and run perl .t like prove. Runs Moose tests in < 50% of the time
package ForkProve::SourceHandler;
use strict;
use parent qw(TAP::Parser::SourceHandler);
use Capture::Tiny qw(capture_stdout);
use File::Spec;
use TAP::Parser::IteratorFactory;
TAP::Parser::IteratorFactory->register_handler(__PACKAGE__);
sub can_handle {
@augensalat
augensalat / gist:3699443
Created September 11, 2012 14:59
Simple Mojolicious::Lite upload
#!/usr/bin/env perl
use Mojolicious::Lite;
any '/upload' => sub {
my $self = shift;
# Check file size
return $self->render(text => 'File is too big.', status => 200)
if $self->req->is_limit_exceeded;