Skip to content

Instantly share code, notes, and snippets.

@ruanbekker
ruanbekker / promtail_docker_logs.md
Last active November 17, 2024 10:23
Docker Container Logging using Promtail
@AveYo
AveYo / .. MediaCreationTool.bat ..md
Last active November 18, 2024 01:03
Universal MediaCreationTool wrapper for all MCT Windows 10 versions - MOVED TO github.com/AveYo/MediaCreationTool.bat
import asyncio
import threading
from tornado.ioloop import IOLoop
def non_main_thread_task(g_io_loop):
assert IOLoop.current(False) is None, "invalid current thread's ioloop object."
assert IOLoop.current() is g_io_loop, "invalid current thread's ioloop object."
io_loop = IOLoop()
@extremecoders-re
extremecoders-re / qemu-networking.md
Last active November 7, 2024 03:36
Setting up Qemu with a tap interface

Setting up Qemu with a tap interface

There are two parts to networking within QEMU:

  • The virtual network device that is provided to the guest (e.g. a PCI network card).
  • The network backend that interacts with the emulated NIC (e.g. puts packets onto the host's network).

Example: User mode network

@cyberang3l
cyberang3l / How to setup VirtualGL and TurboVNC on Ubuntu.md
Last active October 16, 2024 09:30
Setup VirtualGL and TurboVNC on Ubuntu for OpenGL forwarding
@offirgolan
offirgolan / unwatch-gh-org.js
Created August 2, 2017 05:57
Unwatch All Org Repos
// Navigate to https://github.com/watching and then run:
// Taken from: https://stackoverflow.com/questions/11043374/how-to-unwatch-multiple-repos-easily-on-github
Array.prototype
.slice.apply(document.querySelectorAll('.js-subscription-row'))
.forEach(el => { const org = el.querySelector('a[href^="/YOUR_ORG"]'); if (org) el.querySelector('button').click()});
@boaheck
boaheck / imgfucker.py
Last active May 24, 2022 05:44
ImageGlitcher
#!/usr/bin/env python
import random
import sys
cutLength = 1
pasteDist = 1
frames = 20
imgSequence = False

Solus packaging cheat sheet

Setup

Install required packages

  • sudo eopkg install -c system.devel
  • sudo eopkg install git solbuild
  • sudo eopkg install solbuild-config-unstable

Create repository directory

  • mkdir ~/repository
@acundari
acundari / traefik-auth.conf
Last active December 6, 2022 09:41
Traefik fail2ban
# /etc/fail2ban/filter.d/traefik-auth.conf
[Definition]
failregex = ^<HOST> \- \S+ \[\] \"(GET|POST|HEAD) .+\" 401 .+$
@bradmontgomery
bradmontgomery / single_dispatch_example.py
Created August 23, 2016 17:08
Example of single dispatch in python. This is seriously cool stuff.
"""
Playing with python's single dispatch.
See: https://hynek.me/articles/serialization/
See also PEP 443: https://www.python.org/dev/peps/pep-0443/
"""
from datetime import datetime
from functools import singledispatch