Skip to content

Instantly share code, notes, and snippets.

@thesamesam
thesamesam / xz-backdoor.md
Last active November 17, 2024 13:13
xz-utils backdoor situation (CVE-2024-3094)

FAQ on the xz-utils backdoor (CVE-2024-3094)

This is a living document. Everything in this document is made in good faith of being accurate, but like I just said; we don't yet know everything about what's going on.

Background

On March 29th, 2024, a backdoor was discovered in xz-utils, a suite of software that

@FreddieOliveira
FreddieOliveira / docker.md
Last active November 17, 2024 15:46
This tutorial shows how to run docker natively on Android, without VMs and chroot.

Docker on Android 🐋📱

Edit 🎉

All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker. This will install the whole docker suite, left only Tini to be compiled manually.


Summary

@gdamjan
gdamjan / README.md
Last active November 16, 2024 19:38
libvirt with ipvtap over wifi

ipvtap over wifi for libvirt

ipvtap is similar to macvtap, but works over wifi too, since it uses the same mac address as the wifi interface.

libvirt doesn't support ipvtap, so we have to configure everything manually. Important data we need before we start:

  • the name of the wifi interface, wlan0 in my case (it's already connected - use NM or networkd+iwd).
  • the mac address of the wifi interface (it must be the same in the guest too)

On the host:

@chemzqm
chemzqm / pack.js
Last active November 1, 2024 07:57
pack and unpack wxvpkg
const path = require('path')
const fs = require('fs')
const { execSync } = require('child_process')
let file = path.join(process.cwd(), 'core.wxvpkg')
if (fs.existsSync(file)) {
execSync(`rmtrash ${file}`)
}
let fd = fs.openSync(file, 'w')
@KirinDave
KirinDave / copyfile.sh
Created February 21, 2019 02:47
OSC 52 CopyFile Script
#!/bin/bash
# Convenient when you're using lots of in-browser terminals.
set -eu
MAXLEN=74994
TARGET=$1
if [ -f $TARGET ]; then
@mvsde
mvsde / android-volume-steps.md
Last active September 20, 2024 23:54
Android Volume Steps

Android Volume Steps

Warning

This is a rather old guide and may or may not work with modern versions of Android.

Connect through ADB

  1. Boot into TWRP
  2. Connect device to computer
  3. Terminal: List devices with adb devices
@mrw34
mrw34 / postgres.sh
Last active October 16, 2024 22:51
Enabling SSL for PostgreSQL in Docker
#!/bin/bash
set -euo pipefail
openssl req -new -text -passout pass:abcd -subj /CN=localhost -out server.req -keyout privkey.pem
openssl rsa -in privkey.pem -passin pass:abcd -out server.key
openssl req -x509 -in server.req -text -key server.key -out server.crt
chmod 600 server.key
test $(uname -s) = Linux && chown 70 server.key
docker run -d --name postgres -e POSTGRES_HOST_AUTH_METHOD=trust -v "$(pwd)/server.crt:/var/lib/postgresql/server.crt:ro" -v "$(pwd)/server.key:/var/lib/postgresql/server.key:ro" postgres:12-alpine -c ssl=on -c ssl_cert_file=/var/lib/postgresql/server.crt -c ssl_key_file=/var/lib/postgresql/server.key
anonymous
anonymous / polybridge_fix.c
Created June 22, 2017 20:28
Fixes Poly Bridge not starting on Linux when you have e.g. Google Chrome open
#define _GNU_SOURCE
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <assert.h>
#include <dlfcn.h>
// compile: gcc polybridge_fix.c -o polybridge_fix.so -ldl -shared -fPIC
// use: set launch command in steam to
// LD_PRELOAD=/path/to/polybridge_fix.so %command%
@kekru
kekru / Docker connect to remote server.md
Last active October 17, 2024 11:55
Connect to another host with your docker client, without modifying your local Docker installation

Run commands on remote Docker host

This is how to connect to another host with your docker client, without modifying your local Docker installation or when you don't have a local Docker installation.

Enable Docker Remote API

First be sure to enable the Docker Remote API on the remote host.

This can easily be done with a container.
For HTTP connection use jarkt/docker-remote-api.