Skip to content

Instantly share code, notes, and snippets.

@Gabrielcarvfer
Gabrielcarvfer / gitlab_navigation_userscript.js
Last active April 7, 2025 22:29
Make Gitlab navigation less bad, like it was in the past
// ==UserScript==
// @name Make Gitlab navigation great again
// @namespace http://tampermonkey.net/
// @version 0.5
// @description Trying to make the new Gitlab navigation feel less crappy
// @author Gabriel Ferreira
// @match https://gitlab.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=gitlab.com
// @grant none
// ==/UserScript==
@nurupo
nurupo / irc_network_migration_guide.md
Last active October 14, 2023 16:16
How to close a channel on Freenode when migrating to Libera

How to close a channel on Freenode when migrating to Libera

Run /msg NickServ LISTCHANS to see what permissions you have in what channels.

For each channel you have +s, +R and either +o or +O or +t permissions in, run:

/msg ChanServ OP #channel
/msg ChanServ SET #channel TOPICLOCK OFF
/msg ChanServ TOPIC #channel We have moved to irc.libera.chat
@ef4
ef4 / examples.md
Last active January 29, 2025 20:54
Webpack 5 Node Polyfills Upgrade Cheatsheet

Webpack 5 Node Polyfills Upgrade Cheatsheet

Webpack 4 automatically polyfilled many Node APIs in the browser. This was not a great system, because it could lead to surprisingly giant libraries getting pulled into your app by accident, and it gave you no control over the exact versions of the polyfills you were using.

So Webpack 5 removed this functionality. That means you need to make changes if you were relying on those polyfills. This is a quick reference for how to replace the most common patterns.

List of polyfill packages that were used in webpack 4

For each automatically-polyfilled node package name on the left, this shows the name of the NPM package that was used to polyfill it on the right. Under webpack 5 you can manually install these packages and use them via resolve.fallback.

@Snarp
Snarp / google-docs-copy.js
Last active May 6, 2025 16:15
Script to allow copying from a protected Google Doc
/*
<https://stackoverflow.com/questions/40296831/is-it-possible-to-force-a-copy-of-a-protected-google-doc>
NOTE - 2021-05-24
-----------------
The script below isn't the fastest way to copy-and-paste from a protected
Google Doc. Before trying it, I'd suggest following MikoFrosty's advice from
the comments:
@mikeyarce
mikeyarce / vipgo-remove-jp-stas.php
Last active March 13, 2020 18:28
Disable and hide Jetpack Stats module
<?php
// Disable the Stats Jetpack Module
add_filter( 'jetpack_active_modules', 'vipgo_override_jp_modules', 99, 9 );
function vipgo_override_jp_modules( $modules ) {
$disabled_modules = array(
'stats',
);
foreach ( $disabled_modules as $module_slug ) {
@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active May 12, 2025 11:23 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy

Exporting your 2FA tokens from Authy to transfer them into another 2FA application

IMPORTANT - Update regarding deprecation of Authy desktop apps

Past August 2024, Authy stopped supported the desktop version of their apps:
See Authy is shutting down its desktop app | The 2FA app Authy will only be available on Android and iOS starting in August for details.

And indeed, after a while, Authy changed something in their backend which now prevents the old desktop app from logging in. If you are already logged in, then you are in luck, and you can follow the instructions below to export your tokens.

If you are not logged in anymore, but can find a backup of the necessary files, then restore those files, and re-install Authy 2.2.3 following the instructions below, and it should work as expected.

apiVersion: v1
kind: Pod
metadata:
name: test
namespace: paws
spec:
nodeName: tools-worker-1001.tools.eqiad.wmflabs
containers:
- name: test
image: docker-registry.tools.wmflabs.org/toollabs-php-web:latest
@BretFisher
BretFisher / docker-for-mac.md
Last active March 31, 2025 10:12
Getting a Shell in the Docker Desktop Mac VM

2021 Update: Easiest option is Justin's repo and image

Just run this from your Mac terminal and it'll drop you in a container with full permissions on the Docker VM. This also works for Docker for Windows for getting in Moby Linux VM (doesn't work for Windows Containers).

docker run -it --rm --privileged --pid=host justincormack/nsenter1

more info: https://github.com/justincormack/nsenter1


@joakin
joakin / README.md
Last active January 14, 2019 18:55
Collapse repeated unread notifications in phabricator
@atdt
atdt / takeover.py
Last active December 3, 2022 17:53
Zero-downtime restarts via interprocess descriptor transfer
#!/usr/bin/env python3
# -*- coding: utf8 -*-
"""
takeover.py
~~~~~~~~~~~
This script demonstrates a technique for zero-downtime restarts via
interprocess descriptor transfer.
The script operates a simple echo service on port 9999. When a new instance
is launched, the old instance will transfer the server socket to the new