Skip to content

Instantly share code, notes, and snippets.

Marius Ghita mhitza

  • Romania
Block or report user

Report or block mhitza

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:9d0e42aa5f6fa320e5cb1df6b9f46890
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./compat -I./include -I./include -g -O2 -Wall -fno-strict-aliasing -pthread -MT bufferevent_openssl.lo -MD -MP -MF .deps/bufferevent_openssl.Tpo -c bufferevent_openssl.c -o bufferevent_openssl.o
bufferevent_openssl.c: In function ‘bio_bufferevent_new’:
bufferevent_openssl.c:106:3: error: dereferencing pointer to incomplete type ‘BIO’ {aka ‘struct bio_st’}
b->init = 0;
bufferevent_openssl.c: At top level:
bufferevent_openssl.c:228:1: error: variable ‘methods_bufferevent’ has initializer but incomplete type
static BIO_METHOD methods_bufferevent = {
bufferevent_openssl.c:79:27: warning: excess elements in struct initializer
mhitza /
Created Nov 22, 2018
Prolong keyboard backlight timeout

I have a Dell Inspiron 5570 (5000 series) and for some obscure reason in my default linux instalation the default keyboard backlight timeout is something like 1 second. Doesn't make any sense, what benefit does a keyboard backlight have if I can only see it in the dark only when I'm already typing?

Took a couple of wrong paths searching for a solution until I found how to manually tweak that value. Keyboard backlights configuration files are located under /sys/class/leds and for a Dell laptop the magic file is /sys/class/leds/dell::kbd_backlight/stop_timeout.

There's no option to disable the timeout completely so I've created a systemd service that sets the timeout to 30 minutes (just an arbitrary large value) each time is reached.


Keybase proof

I hereby claim:

  • I am mhitza on github.
  • I am mhitza ( on keybase.
  • I have a public key whose fingerprint is E096 835D F783 5B79 8CFD 7DC3 EA9C C2E8 C590 119A

To claim this, I am signing this object:


LVM snapshots are logical volumes that reflect the state of the snapshoted volume at the exact moment in time the snapshot was created. Useful for backups and reference points we can revert back to.

Creating snapshots

$ sudo lvcreate --size 5G --snapshot --name root-backup /dev/vg0/root
  Logical volume "root-backup" created.
mhitza / Makefile
Last active Oct 31, 2019
Programming Arduino Uno (ATmega386P) in assembly
View Makefile
%.hex: %.asm
avra -fI $<
rm *.eep.hex *.obj *.cof
all: $(patsubst %.asm,%.hex,$(wildcard *.asm))
upload: ${program}.hex
avrdude -c arduino -p m328p -P /dev/arduino-uno -b 115200 -U flash:w:$<
mhitza /
Created Oct 8, 2015
How to connect your PSP on Linux

It should work by default when connected, however you might reach this page with the same issue I had, where you where missing a few essential steps.

  1. Be sure that your PSP is set into USB mode: Settings -> USB connection
  2. Be sure the kernel module usb-storage is enabled, you can check with sudo modinfo usb-storage and enable it with sudo modprobe usb-storage
  3. Reconnect your cable after trying any of the previous steps
  4. If it doesn't get automounted, run dmesg to find the device (on my local machine it's sdb as seen in the output) and mount it manually (prefered with your user access rights so you don't have to use sudo for file copy)
mhitza /
Last active Oct 8, 2015
Sculpin for Github pages

After a couple hesitating months to move to github pages, and from my hacked together static site generator, yesterday was my 4th attempt in getting started with github pages blogging, just because there where a few annoyances with the different variations I've tried.

Decided to go with Octopress, just for their nice logo. And for their Github pages oriented focus. That didn't pan out, but at least I learned a few things about their blogging process and setup, which I'm adapting for sculpin.

Sculpin for Github pages (Déjà vu)

You can’t perform that action at this time.