Skip to content

Instantly share code, notes, and snippets.

🍮
Debugging in production

Kody mkody

🍮
Debugging in production
Block or report user

Report or block mkody

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:794725cc99b875a2196d13f30c0ab269
Verifying my Blockstack ID is secured with the address 19joqG54aDk2aKTfNmGZASxxgP3uQ1G7N6 https://explorer.blockstack.org/address/19joqG54aDk2aKTfNmGZASxxgP3uQ1G7N6
View gist:976e0b605518843996da41f3f3ea76ac
if ('serviceWorker' in navigator) {
navigator.serviceWorker.getRegistrations().then(function (registrations) {
for(let registration of registrations) {
registration.unregister()
}
})
}
@mkody
mkody / cleanup.js
Last active Nov 20, 2018
Only show highlighted runs from GDQ's schedule
View cleanup.js
// FOR USE WITH https://greasyfork.org/fr/scripts/31092-gdq-schedule-highlighter
// Hide all runs first
document.querySelectorAll('#runTable tbody tr:not(.day-split)').forEach(el => {
el.style.display = 'none'
})
// Show highlighted runs and remove background color
document.querySelectorAll('#runTable tbody tr.scheduled').forEach(el => {
el.style.display = null
el.style.backgroundColor = 'transparent'
})
@mkody
mkody / README.md
Last active May 4, 2018
Download videos from noco with puppeteer
View README.md

NocoDL

You'll need wget and a recent nodejs. Maybe Chrome too.
Also make sure you've disabled the flash player and set your prefered quality in your Noco settings.

  • Create a list.txt text file with every episode links (not a show page!)
  • Fill your logins on lines 3 and 4 in nocodl.js
  • Install puppeteer: npm install puppeteer (or yarn add puppeteer)
  • Run the script node nocodl.js
@mkody
mkody / upgradeMasto.sh
Last active Aug 23, 2018
im-in.space upgrade script
View upgradeMasto.sh
#!/bin/bash
# Notes:
# - The mastodon user is allowed to execute the `sudo systemctl` commands without any password promps
# - Three remotes: origin (im-in-space/mastodon), upstream (tootsuite/mastodon) and glitch-soc (gitch-soc/mastodon)
# - Three branches: im-in.space (our branch), master (based on upstream) and glitch-soc (based on glitch-soc)
# - If there's conflits in the merge, SAY NO to the second prompt and go fix em (+ `git commit`) before continuing
# Go to the mastodon install dir
cd live
@mkody
mkody / asschedule-fix.user.js
Created Oct 11, 2017
Fix old [as] schedule (Adult Swim)
View asschedule-fix.user.js
/* global jQuery */
// ==UserScript==
// @name Fix old [as] schedule (Adult Swim)
// @namespace https://gist.github.com/mkody/ebb259ff7ce237b5c85f33d5fa43291a
// @version 0.0.1
// @grant none
// @include http://www.adultswim.com/adultswimdynsched/servlet/ScheduleServlet?action=selectASDay
// @include http://www.adultswim.com/adultswimdynsched/servlet/ScheduleServlet?action=AS*
// @include http://www.adultswim.com/adultswimdynsched/servlet/ScheduleServlet?*filter=as
// ==/UserScript==
@mkody
mkody / bmschedule-fix.user.js
Created Oct 11, 2017
Fix old [as] schedule (Boomerang)
View bmschedule-fix.user.js
/* global jQuery */
// ==UserScript==
// @name Fix old [as] schedule (Boomerang)
// @namespace https://gist.github.com/mkody/4f0b4fad10204b6df95af2aa51016768
// @version 0.0.1
// @grant none
// @include http://www.adultswim.com/adultswimdynsched/servlet/BoomerangServlet?action=selectBMDay*
// ==/UserScript==
// Homepage: http://www.adultswim.com/adultswimdynsched/servlet/BoomerangServlet?action=selectBMDay
@mkody
mkody / backup.sh
Created Apr 10, 2017
im-in.space borg backups
View backup.sh
#!/bin/sh
# /etc/cron.daily/backup.sh
export MAILTO=XXX@im-in.space # FIXME
ts=$(date +%Y%m%d-%H%M%S)
export BORG_PASSPHRASE='XXX' # FIXME
su - postgres -c "pg_dump mastodon_production" > /var/backups/mastodon.sql
/usr/local/bin/borg create --exclude-from /root/borg.exclude -C lz4 -v -p -s \
bkup@bkup:/home/bkup/masto::${ts} \
/etc \
@mkody
mkody / cnschedule-fix.user.js
Last active Oct 11, 2017
Fix old [as] schedule (Cartoon Network)
View cnschedule-fix.user.js
/* global jQuery */
// ==UserScript==
// @name Fix old [as] schedule (Cartoon Network)
// @namespace https://gist.github.com/mkody/c72e2b2a01b95e4fbfe9f38e5ac54331
// @version 0.0.5
// @grant none
// @include http://www.adultswim.com/adultswimdynsched/servlet/ScheduleServlet*
// @exclude http://www.adultswim.com/adultswimdynsched/servlet/ScheduleServlet?action=AS*
// @exclude http://www.adultswim.com/adultswimdynsched/servlet/ScheduleServlet?*filter=as
// @exclude http://www.adultswim.com/adultswimdynsched/servlet/ScheduleServlet?action=selectASDay*
@mkody
mkody / openpgp.txt
Created Nov 23, 2016
Identité reliée à OpenKeychain
View openpgp.txt
Ce gist confirme l'identité reliée se trouvant dans ma clef OpenPGP et le relie à ce compte GitHub.
Jeton pour preuve :
[Verifying my OpenPGP key: openpgp4fpr:46e03856370035a4cb223730a0bbc25e7f92865b]
You can’t perform that action at this time.