Skip to content

Instantly share code, notes, and snippets.

@sefgit
sefgit / sha512.html
Created August 18, 2025 13:47 — forked from grazerblade/sha512.html
SHA512 hash converter via Javascript (from the orig cryptostorm.is website)
<meta name="description" content="Easily calculate SHA-512 algorithms" />
<script type="text/javascript" src="assets/js/sha512.js">
</script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript">
//<![CDATA[
function calcSHA()
{
calcHash("SHA-512");
@sefgit
sefgit / simulateNativeLink.js
Created August 14, 2025 12:59 — forked from smitroshin/simulateNativeLink.js
Simulate native link click programmatically in React.js
@sefgit
sefgit / ImpPubKeyFromPriv.c
Created August 4, 2025 05:08 — forked from aleks-f/ImpPubKeyFromPriv.c
CryptoAPI: import public key from private key PEM
#include "windows.h"
#include "wincrypt.h"
#include "stdio.h"
/* This code example:
1) creates a Crypto Service Provider
2) generates keys
3) extracts public key
4) exports private key into PEM
@sefgit
sefgit / websocket_proxy.js
Created June 22, 2025 02:35 — forked from Checksum/websocket_proxy.js
Intercepting WebSockets in the browser using JavaScript
const WebSocketProxy = new Proxy(window.WebSocket, {
construct(target, args) {
console.log("Proxying WebSocket connection", ...args);
const ws = new target(...args);
// Configurable hooks
ws.hooks = {
beforeSend: () => null,
beforeReceive: () => null
};
@sefgit
sefgit / api.py
Created May 2, 2025 01:14 — forked from raphaeljolivet/api.py
Add custom rest API to streamlit app
# This code adds custom REST api handler at runtime to a running Streamlit app
#
from tornado.web import Application, RequestHandler
from tornado.routing import Rule, PathMatches
import gc
import streamlit as st
@st.cache_resource()
@sefgit
sefgit / clr_via_native.c
Created April 20, 2025 01:57 — forked from xpn/clr_via_native.c
A quick example showing loading CLR via native code
#include "stdafx.h"
int main()
{
ICLRMetaHost *metaHost = NULL;
IEnumUnknown *runtime = NULL;
ICLRRuntimeInfo *runtimeInfo = NULL;
ICLRRuntimeHost *runtimeHost = NULL;
IUnknown *enumRuntime = NULL;
LPWSTR frameworkName = NULL;
#!/usr/bin/python3
'''
Copyright (C) Saeed Gholami Shahbandi. All rights reserved.
Author: Saeed Gholami Shahbandi
This file is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version. This program is distributed in
the hope that it will be useful, but WITHOUT ANY WARRANTY; without
even the implied warranty of MERCHANTABILITY or FITNESS FOR A
@sefgit
sefgit / matplotlib_bottons_x_axis_zoom.py
Created April 13, 2025 14:48 — forked from saeedghsh/matplotlib_bottons_x_axis_zoom.py
A Matplotlib plot with bottons and mouse scroll for y-axis zooming
#!/usr/bin/python3
'''
Copyright (C) Saeed Gholami Shahbandi. All rights reserved.
Author: Saeed Gholami Shahbandi
This file is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version. This program is distributed in
the hope that it will be useful, but WITHOUT ANY WARRANTY; without
@sefgit
sefgit / main.cpp
Created April 10, 2025 07:44 — forked from enghqii/main.cpp
Win32 Console Double Buffering
#include <windows.h>
#include <stdio.h>
#define WIDTH 120
#define HEIGHT 30
float playerX = 0;
float playerY = 0;
float dx = 0,dy = 0;
@sefgit
sefgit / README.md
Created March 15, 2025 03:24 — forked from shawnohare/README.md
asyncio socket client / server example

A basic example of using the higher level asyncio constructs such as streams in a server and client where both pass messages with regular cadence.