Skip to content

Instantly share code, notes, and snippets.

View 0xdeadbeer's full-sized avatar
🔬
Avoiding rapid decay into disorder and chaos

Kevin J. 0xdeadbeer

🔬
Avoiding rapid decay into disorder and chaos
View GitHub Profile
@0xdeadbeer
0xdeadbeer / rclone-backup.py
Created April 16, 2023 14:16
Backup to Google Drive through rclone
#!/usr/bin/python3
import os, os.path
import sys
import time
from datetime import datetime
def help():
print("Data reaper!")
print("Written by: @0xdeadbeer")
print(" - first_param: list containing file locations to backup")
@0xdeadbeer
0xdeadbeer / wiener_rsa.py
Last active March 12, 2023 13:53
Wiener's attack on RSA - Python3
#!/usr/bin/python3
import contfrac
import math
"""
Generously coded by me and my friend in the middle of a chill Sunday
Resources:
- https://crypto.stanford.edu/~dabo/pubs/papers/RSA-survey.pdf
- https://en.wikipedia.org/wiki/Wiener%27s_attack
- https://en.wikipedia.org/wiki/RSA_(cryptosystem)
@tatsumoto-ren
tatsumoto-ren / subs.md
Last active June 10, 2024 08:51
Japanese Subtitles

📓 Table of Contents 📚 Resources ✉️ Chat


kitsunekko.net jp subtitles

A large repository of japanese subtitles that is updated reasonably often and has a clean design.| The most popular one, you can upload your own subs.| Often have to be retimed.

@stigok
stigok / hexstr.c
Last active February 4, 2023 22:09
C program demonstrating byte array to hex string
#include <stdio.h> // printf, sprintf, fprintf
#include <stdlib.h> // malloc
int main() {
const unsigned char bytearr[] = { 0x12, 0x34, 0x56, 0x78 };
const size_t arrlen = sizeof(bytearr);
const size_t hexlen = 2; // hex representation of byte with leading zero
const size_t outstrlen = arrlen * hexlen;
char * outstr = malloc(outstrlen + 1);
@jclosure
jclosure / contains_key_or_empty.txt
Created July 3, 2017 05:33
Kibana Painless scripted field checks if field exists or is empty and returns default, otherwise value
if (!doc.containsKey('myfield') || doc['myfield'].empty) { return "unavailable" } else { return doc['myfield'].value }
@miguelmota
miguelmota / i3-cheat-sheet.md
Last active June 7, 2024 03:16 — forked from JeffPaine/i3-cheat-sheet.md
i3 Window Manager Cheat Sheet

i3 Window Manager Cheat Sheet

$mod refers to the modifier key (window/command or alt by default depending on config)

General

  • startx i3 start i3 from command line
  • $mod+<Enter> open a terminal
  • $mod+d open dmenu (text based program launcher)
  • $mod+r resize mode ( or to leave resize mode)
  • $mod+shift+e exit i3
@tomykaira
tomykaira / Base64.h
Last active June 7, 2024 14:41
C++ single header base64 decode/encoder for C++ 11 and above.
#ifndef _MACARON_BASE64_H_
#define _MACARON_BASE64_H_
/**
* The MIT License (MIT)
* Copyright (c) 2016-2024 tomykaira
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@manics
manics / README.md
Last active July 13, 2023 09:39
etcd self-signed client certificates
@shamil
shamil / mount_qcow2.md
Last active June 8, 2024 07:26
How to mount a qcow2 disk image

How to mount a qcow2 disk image

This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running.

Step 1 - Enable NBD on the Host

modprobe nbd max_part=8