Skip to content

Instantly share code, notes, and snippets.

@Gabrielcarvfer
Gabrielcarvfer / gitlab_navigation_userscript.js
Last active February 10, 2024 01:08
Make Gitlab navigation less bad
// ==UserScript==
// @name Make Gitlab navigation great again
// @namespace http://tampermonkey.net/
// @version 0.2
// @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 June 22, 2024 19:32
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 July 12, 2024 13:19
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 July 28, 2024 21:51 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy
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 July 9, 2024 11:29
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