Skip to content

Instantly share code, notes, and snippets.

@musinsky
musinsky / gnome-shell.css
Last active May 7, 2024 10:09
GNOME 3 files
@import url("/usr/share/gnome-shell/theme/gnome-shell.css");
/* customizing GNOME Shell for desktop interface
with fonts size 9pt (instead default 11pt size) */
/* Text Styles */
/* default text style */
stage {
font-size: 9pt; /* 11pt */
}
# Resurrection Remix OS - Marshmallow
Source Code: http://github.com/ResurrectionRemix
G+: https://plus.google.com/communities/109352646351468373340
Resurrection Remix Crowdin : https://crowdin.com/project/resurrectionremix/
For extended changelog, track github activities
# The Changelog
@maxvt
maxvt / infra-secret-management-overview.md
Last active February 3, 2025 06:11
Infrastructure Secret Management Software Overview

Currently, there is an explosion of tools that aim to manage secrets for automated, cloud native infrastructure management. Daniel Somerfield did some work classifying the various approaches, but (as far as I know) no one has made a recent effort to summarize the various tools.

This is an attempt to give a quick overview of what can be found out there. The list is alphabetical. There will be tools that are missing, and some of the facts might be wrong--I welcome your corrections. For the purpose, I can be reached via @maxvt on Twitter, or just leave me a comment here.

There is a companion feature matrix of various tools. Comments are welcome in the same manner.

@jirutka
jirutka / abuild-can-remove
Last active September 13, 2021 17:50
Some helper scripts for checking dependencies of Alpine packages.
#!/bin/sh
#
# This scripts checks the given list of packages if they have
# reverse dependencies (i.e. there are packages which depends on them).
# Dependencies that are on the list are excluded.
#
# Usage: $0 LIST
set -eu
SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
@joemaller
joemaller / Verizon FiOS - DNS servers.md
Created May 9, 2018 14:49
Nameservers for Verizon FiOS - North East US specific

Boston, MA:

  • nsbost02.verizon.net - 71.243.0.14

New York, NY:

  • nsnyny02.verizon.net - 68.237.161.14

Newark, NJ:

nsnwrk02.verizon.net - 71.250.0.14

Philadelphia, PA:

@rrei
rrei / proxy-headers.conf
Last active April 12, 2025 18:35
Nginx proxy headers
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # allows django to get the client's IP address (see the ipware module)
proxy_set_header X-Forwarded-Proto $scheme; # allows django to determine that the request is secure (see SECURE_PROXY_SSL_HEADER and request.is_secure())
proxy_set_header X-Forwarded-Host $host; # allows django to determine the name/addr of the server that the client originally connected to (see request.get_host())
proxy_set_header X-Forwarded-Port $server_port; # same idea as above, but for port number (see request.get_port())
@rrei
rrei / settings.py
Created December 26, 2018 11:41
Django settings for reverse-proxy scenarios
USE_X_FORWARDED_HOST = True
USE_X_FORWARDED_PORT = True
SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")
@rrei
rrei / chunked_qs.py
Created July 29, 2020 08:40
Break a large Django queryset into an equivalent set of smaller querysets (caveats apply)
def chunked_queryset(queryset, chunk_size=10000):
"""Slice a queryset into chunks. This is useful to avoid memory issues when
iterating through large querysets.
Code adapted from https://djangosnippets.org/snippets/10599/
"""
if not queryset.exists():
return
queryset = queryset.order_by("pk")
pks = queryset.values_list("pk", flat=True)
@rrei
rrei / example.py
Last active April 12, 2025 18:33
Different attempts at solving memory usage problems caused by large Django querysets
def do_stuff(obj):
"""Performs some simple processing on `obj`."""
obj.y = obj.related_obj.x ** 2 + 1 # DB query to fetch `.related_obj`
obj.save() # DB query to update `obj`
# Obtain a large queryset for this example.
qs = MyFurstModel.objects.all()
# Attempt no. 1: NO GOOD. This direct/naive approach has the advantage of describing
@jeb5
jeb5 / Youtube Subs to OPML.js
Last active July 22, 2025 13:06
Youtube Subscriptions to RSS/OPML
const channels = [...document.querySelectorAll("#main-link.channel-link")].map(e => {
const [, a, b] = e.href.match("/((?:user)|(?:channel))/(.*)$");
const feed = "https://www.youtube.com/feeds/videos.xml?" + (a === "user" ? "user=" : "channel_id=") + b;
const channelName = e.querySelector("yt-formatted-string.ytd-channel-name").innerText;
return [feed, channelName];
});
if (channels.length == 0) {
alert("Couldn't find any subscriptions");
} else {
console.log(channels.map(([feed, _]) => feed).join("\n"));