Skip to content

Instantly share code, notes, and snippets.

View igormorgado's full-sized avatar
🙃

Igor Morgado igormorgado

🙃
View GitHub Profile
@igormorgado
igormorgado / A_readme
Last active October 16, 2019 01:29
Simple GObject usage.
How to use G_DECLARE_DERIVATIVE_TYPE and/or G_DECLARE_FINAL_TYPE in this code to reduce the "boilerplate code"?
Right now, errors building the code:
pet-dog.c: In function ‘pet_dog_print’:
pet-dog.c:17:36: error: invalid type argument of ‘->’ (have ‘PetBaseClass’ {aka ‘struct _PetBaseClass’})
PET_DOG_GET_CLASS(self)->parent->print(self);
^~
pet-dog.c: In function ‘pet_dog_class_init’:
pet-dog.c:86:27: warning: assignment to ‘void (*)(PetBase *)’ {aka ‘void (*)(struct _PetBase *)’} from incompatible pointer type ‘void (*)(PetDog *)’ {aka ‘void (*)(struct _PetDog *)’} [-Wincompatible-pointer-types]
@igormorgado
igormorgado / tmux-notify.pl
Created July 1, 2017 22:11 — forked from basilfx/tmux-notify.pl
Irssi and tmux-notify
use strict;
use warnings;
use vars qw($VERSION %IRSSI);
use Irssi;
# Script info
$VERSION = '0.1';
%IRSSI = (
authors => 'Bas Stottelaar',
@igormorgado
igormorgado / tmux.conf
Created July 1, 2017 22:09 — forked from petrhosek/tmux.conf
Irssi Tmux integration
new-window -n irssi irssi
split-window -h -p15 -t0 ‘/bin/cat ~/.irssi/nicklistfifo’
send-keys -t1 "tmux send-keys -t0 \"irssi\" C-m; \
tmux send-keys -t0 \"/set nicklist_height \$(stty size | cut -f1 -d' ' -)\" C-m; \
tmux send-keys -t0 \"/set nicklist_width \$(stty size | cut -f2 -d' ' -)\" C-m; \
tmux send-keys -t0 \"/nicklist fifo\" C-m; \
cat ~/.irssi/nicklistfifo" C-m
select-pane -t