Skip to content

Instantly share code, notes, and snippets.

@sefgit
sefgit / index.html
Last active April 14, 2025 02:58
favicon datauri
<link href="data:image/x-icon;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQEAYAAABPYyMiAAAABmJLR0T///////8JWPfcAAAACXBIWXMAAABIAAAASABGyWs+AAAAF0lEQVRIx2NgGAWjYBSMglEwCkbBSAcACBAAAeaR9cIAAAAASUVORK5CYII=" rel="icon" type="image/x-icon" />
<!-- https://davidwalsh.name/blank-favicon -->
@sefgit
sefgit / server.py
Created April 16, 2025 06:08
Simple python web server
from http.server import HTTPServer, SimpleHTTPRequestHandler
import ssl
import logging
from os import path
from urllib.parse import urlparse
SECURE = False
PORT = 8000
class Handler(SimpleHTTPRequestHandler):
@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;
@sefgit
sefgit / vscodium-extensions.txt
Last active April 26, 2025 13:00
vscodium - extensions
TEMPLATE:
https://marketplace.visualstudio.com/_apis/public/gallery/publishers/${itemName.fieldA}/vsextensions/${itemName.fieldB}/${version}/vspackage
Optionally, add targetPlatform as needed:
?targetPlatform=win32-x64
https://marketplace.visualstudio.com/_apis/public/gallery/publishers/${itemName.fieldA}/vsextensions/${itemName.fieldB}/${version}/vspackage?targetPlatform=win32-x64
https://marketplace.visualstudio.com/items?itemName=Horoko.create-python-project
@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()