Skip to content

Instantly share code, notes, and snippets.

View JSH32's full-sized avatar
📎
sudo rm -rf /

Josh Rudnik JSH32

📎
sudo rm -rf /
View GitHub Profile
### Keybase proof
I hereby claim:
* I am riku32 on github.
* I am riku32 (https://keybase.io/riku32) on keybase.
* I have a public key ASBwTLiWcGc68SmRjdvAZKD0g_zDpJYoA4P5toadFxN9ugo
To claim this, I am signing this object:
@JSH32
JSH32 / mistake.js
Created April 1, 2020 16:46
A very special discord bot
const Discord = require('discord.js')
const client = new Discord.Client();
const token = ''
const channel = ''
const deletemsg = false
client.on('guildMemberRemove', (member) => {
member.ban()
client.channels.cache.get(channel).send(`@everyone ${member.user.tag} just got banned cus they left lmfao`)
@JSH32
JSH32 / nightmare.py
Created May 6, 2020 23:58
NIGHTMARE NIGHTMARE NIGHTMARE NIGHTMARE NIGHTMARE NIGHTMARE NIGHTMARE NIGHTMARE NIGHTMARE NIGHTMARE
import sys, time
import pygame
pygame.init()
myfont = pygame.font.SysFont('Arial', 25)
size = width, height = 1000, 1000
# Colors
speed = [2, 2]
@JSH32
JSH32 / Profile.md
Created August 26, 2020 16:15
Github profile

Hey I'm Riku 💾

I have good projects and shitposts gone wrong, looking at my repositories will let you know which is which and which is both. I've been doing computer stuff as long as I can remember and I enjoy it. My strong suits are backend, realtime, and lower level programs. Fuck frontend though I hate that shit. Riku banner

@JSH32
JSH32 / screenshot.sh
Last active May 18, 2021 15:08
Custom screenshot uploader using maim and curl
#!/bin/bash
# Dependencies: maim, curl, jq, libnotify-bin, xclip
TOKEN="some-token"
function _notify() {
notify-send --expire-time 2000 \
--app-name 'kawaii.sh' \
--icon 'flameshot' \
"Screenshot" "$1"
@JSH32
JSH32 / launch.json
Created July 7, 2021 09:34
VSCode settings for debugging Minecraft plugins
{
"version": "0.2.0",
"configurations": [
{
"type": "java",
"name": "Launch server",
"preLaunchTask": "runserver",
}
]
}
@JSH32
JSH32 / DependencyNotFoundException.java
Created August 11, 2021 06:59
Basic dependency injection annotation framework with Java
public class DependencyNotFoundException extends Exception {
public DependencyNotFoundException(String message) {
super(message);
}
}
@JSH32
JSH32 / rust-semantic-colors.json
Created February 12, 2022 03:14
Rust semantic coloring
{
"[rust]": {
"editor.wordBasedSuggestions": false,
},
"editor.semanticTokenColorCustomizations": {
"[Default Dark+]": {
"enabled": true,
"rules": {
"method.static:rust": {
"foreground": "#f0c506"
@JSH32
JSH32 / response.rs
Created March 6, 2022 01:28
A response type for actix. Allows you to use `?` for every error
use derive_more::Display;
use thiserror::Error;
use actix_web::{http::StatusCode, HttpRequest, HttpResponse, Responder, ResponseError};
#[derive(Debug, Display)]
pub struct Error(anyhow::Error);
/// # Response
///
/// Utility type for error reporting.
@JSH32
JSH32 / state.hpp
Last active June 30, 2022 04:27
Reactive State
#pragma once
template <class Container, class F>
auto erase_where(Container& c, F&& f) {
return c.erase(std::remove_if(c.begin(), c.end(), std::forward<F>(f)),
c.end());
}
/**
* @brief Reactive state. Listeners will be registered as callbacks to state