Skip to content

Instantly share code, notes, and snippets.

View Roxxers's full-sized avatar
🏳️‍⚧️

Roxie Gibson Roxxers

🏳️‍⚧️
  • UK
  • 22:58 (UTC +01:00)
View GitHub Profile
@Roxxers
Roxxers / docker_remote.go
Created July 16, 2021 07:02 — forked from agbaraka/docker_remote.go
Access remote docker daemon via ssh using Golang Docker SDK
package main
import (
"context"
"fmt"
"github.com/docker/cli/cli/connhelper"
"github.com/docker/docker/api/types"
"github.com/docker/docker/client"
"net/http"
"os"
@Roxxers
Roxxers / luks-encrypted-root-on-nixos.org
Created November 15, 2020 17:46 — forked from walkermalling/luks-encrypted-root-on-nixos.org
Nix Setup with LUKS encrypted root

Setting up NixOs with LUKS encrypted root

Here are my working notes on getting a system up and running.

WARNING: You can run into a hidden problem that will prevent a correct partition setup and /etc/nixos/configuration.nix from working: if you are setting up a UEFI system, then you need to make sure you boot into the NixOS installation from the UEFI partition of the bootable media. You may have to enter your BIOS boot selection menu to verify this. For example, if you setup a NixOS installer image on a flash drive, your BIOS menu may display several boot options from that flash drive: choose the one explicitly labeled with “UEFI”.

References

I used these resources:

@Roxxers
Roxxers / discordimagedl.py
Created August 12, 2020 19:54
Takes list of images and downloads them from discord, converting ID to UTC time for the filename
import requests
import datetime
import os
def snowflake_time(id):
return datetime.datetime.utcfromtimestamp(
((id >> 22) + 1420070400000) / 1000)
@Roxxers
Roxxers / concatanatefolders.py
Created December 30, 2019 03:33
Concatanates google photo export folders from daily to monthly
import os
import glob
import datetime
# For this to work as accurately as possible, you need to remove any folders that might span between the
# end of one month and the beginning of the next
def googledate_to_datetime(time: str) -> datetime.datetime:
# Get rid of any patterns like 2019-06-19 #2
time = time.split(" ")[0]
@Roxxers
Roxxers / deletedupes.py
Last active December 28, 2019 21:31
Simple file to delete duplicates from ssdeep csv output ran on a google photos export
import re
import os
import sys
import csv
import datetime
DELETED_TEXT = "deleted {}: dupe of {}"
dupe_brackets = re.compile("\([0-9]\)*")
dupe_tilda = re.compile("\~[0-9]*")

Keybase proof

I hereby claim:

  • I am roxxers on github.
  • I am roxxers (https://keybase.io/roxxers) on keybase.
  • I have a public key ASCF3prgoLi5OEjIzrAcXrplE8em8GvPcNFYPI0btGeyqgo

To claim this, I am signing this object:

@checks.is_admin_or_mod()
@bot.command(pass_context=True, enabled=False)
async def emojiuse(self, ctx, emoji, *args):
# TODO: Add check that emoji is an emoji
# TODO: Disable so like when we go to 1.3 this isn't live cause it needs more work and it needs to be completed already
# The way forward is clearly put the given emoji in and treat it as a list of emojis,
# if all emojis, then generate the list. Allows for more than one emoji to be analysed. Works better for larger servers/
# Flag Parsing
import time
import discord
from discord.ext import commands
bot = commands.Bot(command_prefix="=", description="Role creation script for role colours. Author: Roxxers#7443")
roles = """Red: #ff000b
Light/Dark Red: #ce030d
Dark Red: #b4171e
from discord.ext.commands import Bot
bot = Bot(command_prefix="=")
@bot.event
async def on_ready():
print("Ready innit")
@bot.event
async def on_reaction_add(reaction, user):