Skip to content

Instantly share code, notes, and snippets.

View SharkyRawr's full-sized avatar
🦄
Rawr

Sophie SharkyRawr

🦄
Rawr
View GitHub Profile
@SharkyRawr
SharkyRawr / pod-to-pod.yaml
Created September 15, 2022 16:34
pod-to-pod-affinity
affinity:
podAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: "app.kubernetes.io/component"
operator: In
values:
- synapse
topologyKey: "kubernetes.io/hostname"
# ACME challenge response for acmetool, others might look different
location ~ "^/\.well-known/acme-challenge/([-_a-zA-Z0-9]+)$" {
default_type text/plain;
return 200 "$1.your-account-id-here";
}
// ==UserScript==
// @name HumbleBundle Exporter
// @namespace https://sharky.pw/
// @version 0.2
// @description Export lists of your HumbleBundle purchases, keys, etc.
// @author Sophie 'Sharky' Schumann
// @require http://code.jquery.com/jquery-1.9.1.min.js
// @match https://www.humblebundle.com/home/keys
// @match https://www.humblebundle.com/home/purchases
// @match https://www.humblebundle.com/home/library
// This is the main DLL file.
#include "stdafx.h"
array<Byte>^ WebPCLR::Encoder::Encode(Bitmap^ bmp, float quality) {
Rectangle bounds = Rectangle(0, 0, bmp->Width, bmp->Height);
Imaging::BitmapData^ bmpdata = bmp->LockBits(bounds, Imaging::ImageLockMode::ReadOnly, Imaging::PixelFormat::Format32bppArgb);
IntPtr argb = bmpdata->Scan0;
#! /bin/bash -e
export GPG_TTY=$(tty)
KEY=12CDBA2124EC19869892D6175C29252265360140
if [ ! -f "$1" ]; then
echo "Please specify a file!"
exit 1
fi
#! /bin/sh
# By Sharky - https://sharky.pw/
COLS=`tput cols`
ROWS=`tput lines`
OWOS=(
"OwO" "ØwØ" "◕w◕" "◔w◔" "ʘwʘ" "𝕆𝕨𝕆" "σωσ" "𝙊𝙬𝙊" "(。O ω O。)"
"UwU" "🆄🆆🆄" "ⓤⓦⓤ" "𝖴𝗐𝖴" "𝓤𝔀𝓤" "( ᴜ ω ᴜ )"
/* Edited by IntelligentComment
/* Moderator tag */
.thing .tagline .author.friend {
padding: 1px 8px;
border-radius: 10px;
background-color: red;
@SharkyRawr
SharkyRawr / authkeys_to_sha256.sh
Created February 5, 2019 11:55
Convert OpenSSH authorized_keys entries in to sha256 sums used in /var/log/auth.log
#! /bin/bash -ex
while read p; do
echo -e "\n$p ->"
echo $p | awk '{ print $2 }' | # Only the actual key data without prefix or comments
base64 -d | # decode as base64
sha256sum | # SHA256 hash (returns hex)
awk '{ print $1 }' | # only the hex data
xxd -r -p | # hex to bytes
base64 # encode as base64
done < /root/.ssh/authorized_keys
@SharkyRawr
SharkyRawr / vscodehere.desktop
Last active June 11, 2024 19:13
KDE 5 Plasma Service Menu action: VSCode here (open visual studio code in current directory for KDE Plasma)
# Install in to ~/.local/share/kservices5/vscodehere.desktop
[Desktop Entry]
Type=Service
X-KDE-ServiceTypes=KonqPopupMenu/Plugin
MimeType=inode/directory;
Actions=openVSCodeHere;
X-KDE-AuthorizeAction=shell_access
[Desktop Action openVSCodeHere]
#! /bin/bash
# See ssh -Q cipher (on both machines)
CIPHERS="[email protected] aes128-ctr aes192-ctr aes256-ctr [email protected] [email protected]"
# Destination server (data will be piped to /dev/null)
DESTINATION="[email protected]"
for cipher in ${CIPHERS} ; do
for i in 1 2 3 ; do