Skip to content

Instantly share code, notes, and snippets.

View Coronon's full-sized avatar
🧙‍♂️

Rubin Raithel Coronon

🧙‍♂️
View GitHub Profile
@Coronon
Coronon / AesCrypt.py
Created June 8, 2018 08:02 — forked from pfote/AesCrypt.py
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:
@Coronon
Coronon / NamedPipe.py
Last active October 3, 2019 15:31
Easy NamedPipe for Windows written in python3
import win32pipe, win32file
class PipeServer():
def __init__(self, pipeName):
self.pipe = win32pipe.CreateNamedPipe(
r'\\.\pipe\\'+pipeName,
win32pipe.PIPE_ACCESS_OUTBOUND,
win32pipe.PIPE_TYPE_MESSAGE | win32pipe.PIPE_READMODE_MESSAGE | win32pipe.PIPE_WAIT,
1, 65536, 65536,
0,
{"lastUpload":"2021-09-21T21:36:36.851Z","extensionVersion":"v3.4.3"}
@Coronon
Coronon / RRRLib.rkt
Last active August 17, 2020 07:13
My personal little scheme lib to make my life easier
;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:
@Coronon
Coronon / wsLogoutDecorator.py
Created December 28, 2020 00:52
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):
print(request.session.session_key)
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
Coronon / FlutterRemoteIOSPreview.md
Last active October 15, 2021 21:36
Allows you to write your code on Windows and live preview (hot reload) changes to your IOS device. (Requires Mac)

Develop Flutter App on Windows but preview on IOS

The file sync is based on unison.

Windows:

File sync

  1. Download current release of unison
@Coronon
Coronon / go_cross_compile.py
Created July 25, 2023 00:21
Easily cross compile and package GO binaries
import argparse
import os
from pathlib import Path
import shutil
import subprocess
import tempfile
from typing import List
parser = argparse.ArgumentParser(
prog='GoCrossCompile',