Skip to content

Instantly share code, notes, and snippets.

image list -f
shell dotnet-symbol /home/div0/.dotnet/shared/Microsoft.NETCore.App/9.0.0/libcoreclr.so
target symbols add /home/div0/.dotnet/shared/Microsoft.NETCore.App/9.0.0/libcoreclr.so.dbg
@defufna
defufna / tidyicon.py
Created February 21, 2025 15:23
This script automates tidying desktop icon positions in KDE Plasma.
#!/usr/bin/env python
from typing import List, Dict, Tuple
import json
from itertools import batched
import tempfile
from shutil import move
import subprocess
import time
import os
@defufna
defufna / roman.html
Created November 16, 2024 19:37
Roman
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Roman Numerals Quiz</title>
<style>
body {
display: flex;
flex-direction: column;
@defufna
defufna / Program.cs
Created June 6, 2023 17:46
Cache line contention
using System.Diagnostics;
internal class Program
{
static long[] counters;
const int timeLimit = 20 * 1000;
static void Count(int index)
{
Stopwatch sw = Stopwatch.StartNew();
while(sw.ElapsedMilliseconds < timeLimit)
code:
org 0x100
mov dx, msg
mov ah, 9
int 0x21
;get int2f dos handler
mov ax, 0x352f
int 0x21
import asciichartpy
import colorama
import subprocess
import time
import re
r = re.compile("(\d+\.?\d*)")
def get_temp():
@defufna
defufna / Main.hx
Created September 12, 2019 12:28
Deadlock on program tremination
package;
import kha.System;
import haxe.ds.Vector;
class Main {
public static function main() {
var v:Vector<Int>;
for (i in 0...8192){
// ==UserScript==
// @name Proslji
// @version 1
// @grant none
// @include https://*.slack.com/*
// ==/UserScript==
var fixit = {"proslji" : "prošli",
"prosljeg":"prošlog",
"prosljem":"prošlom",
@defufna
defufna / script.js
Created June 25, 2018 10:39
greasemonkey script for better blic.rs
// ==UserScript==
// @name Better Blic!
// @version 1
// @grant none
// @include https://*.blic.rs/*
// @include https://blic.rs/*
// ==/UserScript==
blacklist = ["kij.?", "kijin", "kijom", "anabel.?", "lun.?", "lunin"]
re = new RegExp("\\b(" + blacklist.join("|") + ")\\b", "i");
@defufna
defufna / measles.py
Created March 6, 2018 10:40
Plot measles epidemic in Serbia
# -*- coding: utf-8 -*-
import requests
import bs4
import re
import datetime
from matplotlib import pyplot
replacements = str.maketrans({
'а':'a',
'е':'e',