Skip to content

Instantly share code, notes, and snippets.

View shoshta73's full-sized avatar
😥
ssh... how do i use this?

Borna Šoštarić shoshta73

😥
ssh... how do i use this?
View GitHub Profile
@shoshta73
shoshta73 / fdecl.py
Created September 29, 2025 13:02
fdecl
import clang.cindex
import sys
import os
def get_type_declaration(node):
if node.kind == clang.cindex.CursorKind.CLASS_DECL:
return f'class {node.spelling};'
elif node.kind == clang.cindex.CursorKind.STRUCT_DECL:
return f'struct {node.spelling};'
@shoshta73
shoshta73 / Instrumentor.h
Last active September 11, 2025 11:27 — forked from TheCherno/Instrumentor.h
Basic Instrumentation Profiler
//
// Basic instrumentation profiler by Cherno
// Usage: include this header file somewhere in your code (eg. precompiled header), and then use like:
//
// Instrumentor::Get().BeginSession("Session Name"); // Begin session
// {
// InstrumentationTimer timer("Profiled Scope Name"); // Place code like this in scopes you'd like to include in profiling
// // Code
// }
@shoshta73
shoshta73 / sse.go
Created December 23, 2024 09:52 — forked from fiorix/sse.go
Go and Server Sent Events for HTTP/1.1 and HTTP/2.0
// Go and Server Sent Events for HTTP/1.1 and HTTP/2.0
//go:generate go run $GOROOT/src/crypto/tls/generate_cert.go -host localhost
package main
import (
"fmt"
"io"
"log"
"net/http"
@shoshta73
shoshta73 / arch.sh
Last active April 29, 2024 22:10
run this if you want to run to have same hyprland configuration as i do
set -x
# install neovim
sudo pacman -S neovim
# edit config files
sudo nvim /etc/makepkg.conf
sudo nvim /etc/pacman.conf
# update
@shoshta73
shoshta73 / taskManager.kt
Created May 26, 2023 10:56
Know your structures and loops well and no laugugae is difficult!
import java.io.*
import java.util.*
data class Task (
var id: Int,
var name: String,
var description: String,
var dueDate: String,
var isComplete: Boolean,
var isInProgress: Boolean)