Skip to content

Instantly share code, notes, and snippets.


Marcin Chwedczuk marcin-chwedczuk

View GitHub Profile
nstarke /
Last active Nov 30, 2021
Resize Ghidra GUI for High DPI screens

Resize Ghidra for High DPI screens

If you run Ghidra on a high DPI screen, you will probably find the GUI to be scaled down so small to be almost of no use.

There is a setting that you can adjust to scale the Ghidra GUI:

in $GHIDRA_ROOT/support is a file named In this file is the following configuration key:

View gist:081e4386bea3a4a428b87ff7e0532b1b
brew install gmp
brew install mpfr
brew install libmpc
pip install gmpy2
yellowbyte /
Last active Nov 30, 2021
how to assemble assembly with NASM assembler to 32-bit or 64-bit ELF binary with or without libc

32-bit ELF binary

how to assemble and link:

nasm -f elf32 -o <filename>.o <filename>.asm
ld -m elf_i386 -o <filename> <filename>.o

template code (hello world):

section .text
global _start
henfiber /
Last active Nov 30, 2021
Buying keyboards and keyboard components from EU


MightyPork / usb_hid_keys.h
Last active Dec 2, 2021
USB HID Keyboard scan codes
View usb_hid_keys.h
* USB HID Keyboard scan codes as per USB spec 1.11
* plus some additional codes
* Created by MightyPork, 2016
* Public domain
* Adapted from:

Explaining Miles's Magic

Miles Sabin recently opened a pull request fixing the infamous SI-2712. First off, this is remarkable and, if merged, will make everyone's life enormously easier. This is a bug that a lot of people hit often without even realizing it, and they just assume that either they did something wrong or the compiler is broken in some weird way. It is especially common for users of scalaz or cats.

But that's not what I wanted to write about. What I want to write about is the exact semantics of Miles's fix, because it does impose some very specific assumptions about the way that type constructors work, and understanding those assumptions is the key to getting the most of it his fix.

For starters, here is the sort of thing that SI-2712 affects:

def foo[F[_], A](fa: F[A]): String = fa.toString
jewelsea /
Last active Sep 3, 2021
Demonstrate using the System Tray (AWT) to control a JavaFX application.
import javafx.application.*;
import javafx.geometry.Pos;
import javafx.scene.*;
import javafx.scene.control.Label;
import javafx.scene.layout.*;
import javafx.scene.paint.Color;
import javafx.stage.*;
import javax.imageio.ImageIO;
roxlu / install_cygwin_sshd.txt
Last active Sep 11, 2021
Installing CYGWIN + SSHD for remote access through SSH on windows
View install_cygwin_sshd.txt
Installing CYGWIN with SSH
1) Download cygwin setup.exe from
- Execute setup.exe
- Install from internet
- Root directory: `c:\cygwin` + all users
- Local package directory: use default value
- Select a mirror to download files from
- Select these packages:
- editors > xemacs 21.4.22-1
- net > openssh 6.1-p