Skip to content

Instantly share code, notes, and snippets.

@karel-murgas
karel-murgas / mapart_marker.txt
Last active July 7, 2025 10:03
Rebane2001's mapartcraft enhancments
javascript:(function(){let e={x:0,y:0},t=document.querySelector(".viewOnline2DContainer"),n=t?t.querySelector("canvas"):null;if(!n)return void console.error("Canvas not found in the specified container!");let a=n.getContext("2d"),l=33,c=new Set,o=Math.floor(n.height/l),r=Math.floor(n.width/l),i=a.getImageData(0,0,n.width,n.height);function d(){a.strokeStyle="rgba(0,0,255,0.7)",a.lineWidth=6,a.strokeRect(e.x*l,e.y*l,l,l)}function s(){c.forEach((e=>{let[t,n]=e.split(",").map(Number);a.fillStyle="rgba(0,0,255,0.2)",a.fillRect(t*l,n*l,l,l)}))}function w(t){let{key:n}=t;"ArrowUp"!==n&&"w"!==n|| (e.y=Math.max(0,e.y-1)),"ArrowDown"!==n&&"s"!==n||(e.y=Math.min(o-1,e.y+1)),"ArrowLeft"!==n&&"a"!==n||(e.x=Math.max(0,e.x-1)),"ArrowRight"!==n&&"d"!==n||(e.x=Math.min(r-1,e.x+1)),"q"===n&&((n=`${e.x},${e.y}`),c.has(n)?c.delete(n):c.add(n)),requestAnimationFrame((()=>{a.putImageData(i,0,0),d(),s()}))}window.addEventListener("keydown",w),d();})();
@kodekracker
kodekracker / draw_bounding_box_open_cv.py
Created June 20, 2018 18:31
To draw Bounding Box in a image using OpenCV python module
#!/usr/bin/env python
import cv2
import sys
def drawBoundingBoxes(imageData, imageOutputPath, inferenceResults, color):
"""Draw bounding boxes on an image.
imageData: image data in numpy array format
imageOutputPath: output image file path
inferenceResults: inference results array off object (l,t,w,h)
colorMap: Bounding box color candidates, list of RGB tuples.
@0xjac
0xjac / private_fork.md
Last active July 7, 2025 10:00
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare [email protected]:usi-systems/easytrace.git

@x0nu11byt3
x0nu11byt3 / elf_format_cheatsheet.md
Created February 27, 2021 05:26
ELF Format Cheatsheet

ELF Format Cheatsheet

Introduction

Executable and Linkable Format (ELF), is the default binary format on Linux-based systems.

ELF

Compilation

@vejei
vejei / CustomView.java
Last active July 7, 2025 10:00
Apply TextAppearance to TextPaint.
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Rect;
import android.graphics.Typeface;
import android.os.Build;
import android.os.LocaleList;
import android.text.TextPaint;
import android.util.AttributeSet;
EN:
n01807496 partridge small Old World gallinaceous game birds
n02916936 bulletproof vest a vest capable of resisting the impact of a bullet
n03794056 mousetrap a trap for catching mice
n10565667 scuba diver an underwater diver who uses scuba gear
n02978881 cassette a container that holds a magnetic tape used for recording or playing sound or video
n03126707 crane lifts and moves heavy objects; lifting tackle is suspended from a pivoted boom that rotates around a vertical axis
n03394916 French horn a brass musical instrument consisting of a conical tube that is coiled into a spiral and played by means of valves
n07693725 bagel (Yiddish) glazed yeast-raised doughnut-shaped roll with hard crust
n03710193 mailbox a private box for delivery of mail
@rain-1
rain-1 / base model trends.md
Last active July 7, 2025 09:58
base model trends.md
@minop1205
minop1205 / conventional-commits.md
Last active July 7, 2025 09:54
コミットメッセージ規約

Conventional Commits

コミットメッセージのバリデーションには commitlint ( https://github.com/conventional-changelog/commitlint ) を使用します。
またコミットメッセージは次の規約に準拠します。
https://github.com/conventional-changelog/commitlint/tree/master/@commitlint/config-conventional

Format

コミットメッセージのフォーマットは次の通りです。

@n1snt
n1snt / Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md
Last active July 7, 2025 09:54
Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md

Oh my zsh.

Oh My Zsh

Install ZSH.

sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh

Install Oh my ZSH.

@aleksbrgt
aleksbrgt / config.h
Last active July 7, 2025 10:00
Oled Arasaka Animation
/*
This is the c configuration file for the keymap
Copyright 2012 Jun Wako <wakojun@gmail.com>
Copyright 2015 Jack Humbert
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 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