Skip to content

Instantly share code, notes, and snippets.


Rubin Raithel Coronon

View GitHub Profile
View goa_autossh.service
Description=AutoSSH tunnel
ExecStart=/usr/bin/autossh -M 0 -q -N -o "ServerAliveInterval 60" -o "ServerAliveCountMax 3" -R 901:localhost:22 -i /etc/ssh/goa_key
Coronon /
Created Dec 28, 2020
Django Channels Websocket logout handler (Handles all logout throughout the app)
import functools
from asgiref.sync import async_to_sync
from django.contrib.auth.signals import user_logged_out
from channels.layers import get_channel_layer
def __ws_login_required_signal_handler(sender, request, user, **kwargs):
channel_layer = get_channel_layer()
async_to_sync(channel_layer.group_send)(f"SESSION-{request.session.session_key}", {"type": "close", "code": None})
user_logged_out.connect(__ws_login_required_signal_handler, dispatch_uid="__ws_login_required_signal_handler")
Coronon / RRRLib.rkt
Last active Aug 17, 2020
My personal little scheme lib to make my life easier
View RRRLib.rkt
;MIT License
;Copyright (c) 2020 Rubin Romeo Raithel
;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 without limitation the rights
;to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
;copies of the Software, and to permit persons to whom the Software is
;furnished to do so, subject to the following conditions:
View cloudSettings
Coronon /
Last active Oct 3, 2019
Easy NamedPipe for Windows written in python3
import win32pipe, win32file
class PipeServer():
def __init__(self, pipeName):
self.pipe = win32pipe.CreateNamedPipe(
win32pipe.PIPE_TYPE_MESSAGE | win32pipe.PIPE_READMODE_MESSAGE | win32pipe.PIPE_WAIT,
1, 65536, 65536,
Coronon /
Created Jun 8, 2018 — forked from pfote/
AES256 with PKCS5 padding
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from Crypto.Cipher import AES
import base64
import random
import hashlib
import os
class AesCrypt256: