Skip to content

Instantly share code, notes, and snippets.

View iacchus's full-sized avatar

Iacchus Mercurius iacchus

View GitHub Profile
// see it here:
// https://stackoverflow.com/questions/7563169/detect-which-word-has-been-clicked-on-within-a-text
// https://jsbin.com/oXetAcI/4/edit?html,js,output
$.fn.OneClickSelect = function(){
return $(this).on('click',function(){
var range, selection;
if (window.getSelection) {
selection = window.getSelection();
@iacchus
iacchus / tmux.conf
Created July 1, 2021 01:34 — forked from spicycode/tmux.conf
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
@iacchus
iacchus / myweechat.md
Created May 12, 2021 21:27 — forked from pascalpoitras/config.md
My always up-to-date WeeChat configuration (weechat-dev)

WeeChat Screenshot

You need at least WeeChat 3.2-dev

Enable mouse

/mouse enable

@iacchus
iacchus / gist:25cf9c61fd70e0153f78303b713f9b1b
Created May 12, 2021 21:05 — forked from hencjo/gist:0710d51c5ba51e0aeb2d905f1e3a38f3
Xorg: Two keyboards with different keyboard layout.
# Use xinput to find your keyboards.
$ xinput
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ SynPS/2 Synaptics TouchPad id=11 [slave pointer (2)]
⎜ ↳ TPPS/2 IBM TrackPoint id=12 [slave pointer (2)]
⎜ ↳ Logitech Performance MX id=14 [slave pointer (2)]
⎜ ↳ E-Signal USB Gaming Keyboard id=16 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
@iacchus
iacchus / two-mouse-or-touchpad-pointers-on-X.md
Last active April 4, 2022 15:05
Using Two Mouse Pointers on X.org

ORIGINAL HERE: https://stackoverflow.com/questions/4012352/linux-dual-mice-multiple-mice-with-multiple-mouse-pointers

I've found a way to do it, but it causes major tearing with Gnome.

  1. Open a terminal and type in xinput (all commands should be done as normal user).
  2. Look at the id of the one of your mice or touchpad.
  3. Then create a new master device with this command xinput create-master "name". (any name of your choice.)
  4. Get the new master "name" numeric id.
  5. Now you just need to reattach one of your mice to the new master xinput reattach "mouse id" "new master id".
@iacchus
iacchus / install_fonts.sh
Last active April 24, 2024 23:28
Install all Google Fonts on Linux (Debian/Ubuntu etc.)
#!/usr/bin/env sh
# Original author: Michalis Georgiou <mechmg93@gmail.comr>
# Modified by Andrew http://www.webupd8.org <andrew@webupd8.org>
# Current version by Kassius Iacchus https://github.com/iacchus/
# Depends on: `wget`
#
# Install `wget` on Debian/Ubuntu with:
# apt install wget
@iacchus
iacchus / delete_git_submodule.md
Created July 24, 2020 12:50 — forked from myusuf3/delete_git_submodule.md
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@iacchus
iacchus / sample_ssh_server.py
Created May 21, 2020 04:59 — forked from cschwede/sample_ssh_server.py
Sample paramiko SSH server to receive commands
#!/usr/bin/env python
import logging
import socket
import sys
import threading
import paramiko
logging.basicConfig()
logger = logging.getLogger()
@iacchus
iacchus / colors.muttrc
Created September 6, 2019 01:34 — forked from LukeSmithxyz/colors.muttrc
Mutt example colors
# vim: filetype=neomuttrc
# Default index colors:
color index yellow default '.*'
color index_author red default '.*'
color index_number blue default
color index_subject cyan default '.*'
# For new mail:
color index brightyellow black "~N"
color index_author brightred black "~N"
@iacchus
iacchus / widen_ascii.py
Created April 14, 2018 21:21
widen_ascii.py
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
WIDE_MAP = dict((i, i + 0xFEE0) for i in range(0x21, 0x7F))
WIDE_MAP[0x20] = 0x3000
def widen(s):
"""
Convert all ASCII characters to the full-width counterpart.