Skip to content

Instantly share code, notes, and snippets.

View mroavi's full-sized avatar

Martin Roa Villescas mroavi

  • Eindhoven University of Technology
View GitHub Profile
@paulo-raca
paulo-raca / unicode_input.py
Last active February 18, 2023 22:56
Using UInput to enter unicode text
from evdev import UInput, ecodes as e
import time
# This class sends CTRL+SHIFT+U+<HEXCODE> sequences to produces arbitrary unicode characters.
# It works fine on Gnome applications, but not on KDE
# in https://en.wikipedia.org/wiki/Unicode_input#In_X11_.28Linux_and_other_Unix_variants.29
class UnicodeInput:
def __init__(self):
keys = [
e.KEY_LEFTCTRL,
@oanhnn
oanhnn / using-multiple-github-accounts-with-ssh-keys.md
Last active May 21, 2024 19:58
Using multiple github accounts with ssh keys

Problem

I have two Github accounts: oanhnn (personal) and superman (for work). I want to use both accounts on same computer (without typing password everytime, when doing git push or pull).

Solution

Use ssh keys and define host aliases in ssh config file (each alias for an account).

How to?

  1. Generate ssh key pairs for accounts and add them to GitHub accounts.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mishurov
mishurov / qt.mak
Last active April 9, 2024 21:06
Makefile to build QT projects (Linux) without qmake
CC=g++
MOC=moc-qt4
CFLAGS=-Wall
SOURCES=hello.cc hello_cls.cc
MOC_HEADERS=hello_cls.h
EXECUTABLE=hello
INCDIRS=-I/usr/include/qt4 -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtCore
LIBS=-lQtCore -lQtGui
# Change postfixes
MOC_SOURCES=$(MOC_HEADERS:.h=.moc.cc)
@jexchan
jexchan / multiple_ssh_setting.md
Created April 10, 2012 15:00
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@spicycode
spicycode / tmux.conf
Created September 20, 2011 16:43
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000