Skip to content

Instantly share code, notes, and snippets.

View Xenthys's full-sized avatar
💻
Site Reliability Engineer

Dylan Ysmal Xenthys

💻
Site Reliability Engineer
View GitHub Profile
@Xenthys
Xenthys / pct-enter.sh
Last active January 1, 2024 22:10
A helper for Proxmox's "pct enter" to use containers' hostnames and enter them from any cluster node.
#!/bin/bash
id=$(grep "$1" /etc/pve/.rrd | cut -d'/' -f 2 | cut -d':' -f 1)
[[ "$id" == '' ]] && echo "The specified LXC does not exist." && exit 1
node=$(grep "^\"$id\":" /etc/pve/.vmlist | cut -d'"' -f 6)
[[ $(hostname) != "$node" ]] && pre="ssh -t $node "
echo "Entering LXC $id on node $node..."
${pre}pct enter $id
@Xenthys
Xenthys / sharexen.sh
Last active July 12, 2022 11:55
Shell convenience script for ShareXen
#!/bin/sh
# Shell convenience script for ShareXen
# Source: https://github.com/Xenthys/ShareXen
# GNU/Linux dependencies: jq curl maim xclip notify-send
# - jq: parse ShareXen API JSON results
# - curl: query the ShareXen API itself
# - maim: take screenshots
# - xclip: copy URL to clipboard
@Xenthys
Xenthys / CVE-2016-5195.sh
Last active March 5, 2021 09:29
CVE-2016-5195 - A little script made to mitigate the Dirty COW exploit on Debian when a reboot is not possible yet.
#!/bin/bash
# SystemTap workaround for CVE-2016-5195
# Bash script by Dylan Ysmal <xenthys@blackfields.net>
# https://security-tracker.debian.org/tracker/DSA-3696-1
# https://bugzilla.redhat.com/show_bug.cgi?id=1384344#c13
# systemtap linux-headers-$(uname -r) linux-image-$(uname -r)-dbg
# https://xenthys.blackfields.net/CVE-2016-5195.stp
# sudo stap -F -g /path/to/CVE-2016-5195.stp
@Xenthys
Xenthys / keybase.old.md
Last active November 18, 2019 13:41
Former Keybase Proof

Keybase proof

I hereby claim:

  • I am Xenthys on github.
  • I am xenthys (https://keybase.io/xenthys) on keybase.
  • I have a public key whose fingerprint is 89ED 31A7 8A29 F025 1C75 7249 4ED2 D0AE 449F C57E

To claim this, I am signing this object:

@Xenthys
Xenthys / keybase.md
Created November 18, 2019 13:41
Keybase Proof

Keybase proof

I hereby claim:

  • I am xenthys on github.
  • I am dysmal (https://keybase.io/dysmal) on keybase.
  • I have a public key ASBEsYHfC-2dZ0wKc1GwPcjMmXyIy8b1cpPDCau_NjF-GQo

To claim this, I am signing this object:

@Xenthys
Xenthys / ShareXen.md
Last active October 8, 2018 22:02
ShareXen - Another ShareX Custom Uploader PHP Script
@Xenthys
Xenthys / img2irc.py
Created October 2, 2016 23:39 — forked from Polsaker/img2irc.py
Makes beautiful ART from regular, boring images.
#!/usr/bin/env python
# This script shall be distributed under the "who cares" license.
# Just leave this note here stating that Polsaker
# (https://github.com/Polsaker) created this.
# Usage: img2irc.py image.png [-rgb]
# With -rgb the script uses RGB to compare colors instead of L*A*B*.
# It is faster but it might lead to worse (or better ;D) image quality
@Xenthys
Xenthys / op.sh
Last active August 11, 2016 23:53
A shell script to generate an IRC command to op you in a channel
#!/bin/bash
if [[ -z "$1" ]]; then
printf "You need to specify a channel, dumbass.\n" >&2
exit
fi
printf "/join #%s,0\n" "$(echo "$1"|sha256sum|head -c12)"