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
@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
@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"
@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)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@oanhnn
oanhnn / using-multiple-github-accounts-with-ssh-keys.md
Last active May 20, 2024 20:17
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.
@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,
@joncardasis
joncardasis / Storing-Images-On-Github.md
Last active May 19, 2024 20:11
Storing Images and Demos in your Repo

Storing Images and Demos in your Repo

In this quick walkthough you'll learn how to create a separate branch in your repo to house your screenshots and demo gifs for use in your master's readme.

How to

1. Clone a fresh copy of your repo

In order to prevent any loss of work it is best to clone the repo in a separate location to complete this task.

2. Create a new branch

Create a new branch in your repo by using git checkout --orphan assets

@t184256
t184256 / example_remap.py
Created January 19, 2018 03:26
A thoroughly annotated example on keyboard remapping with evdev/uinput.
#!/usr/bin/python3
# CC0, originally written by t184256.
# This is an example Python program for Linux that remaps a keyboard.
# The events (key presses releases and repeats), are captured with evdev,
# and then injected back with uinput.
# This approach should work in X, Wayland, anywhere!
@dataPulverizer
dataPulverizer / RegularExpressionsInJulia.jl
Created February 17, 2018 02:53
Regular Expressions In Julia
#=
Notes on Regular expressions in Julia:
Sources:
Regular Expressions Cookbook, Jan Goyvaerts & Steven Levithan.
https://www.regular-expressions.info/wordboundaries.html
https://www.regular-expressions.info/lookaround.html
http://www.rexegg.com/regex-disambiguation.html
Julialang Gitter Chat.
=#
@bittner
bittner / keyboard-keys.md
Created February 28, 2019 22:50
Keyboard keys markup in MarkDown

Ctrl + Alt + Space