Ctrl + Alt + Space
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# put this in your startup.jl | |
using InteractiveUtils | |
let | |
tmuxsession = nothing | |
sessions = split(String(read(`tmux list-panes -a -F '#{pane_tty} #{session_name}'`)), '\n') | |
io = IOBuffer() | |
run(pipeline(`tty`, stdout=io)) | |
tty = chomp(String(take!(io))) | |
for session in sessions | |
if occursin(tty, session) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using ColorSchemes | |
using Javis | |
N = 6 # Number of dots | |
radius = 20 # Radius of each dot | |
colors = ColorSchemes.rainbow1 # Color palette | |
speed = 10 # Degrees per frame | |
function draw_circle(frame, i, radius, speed) | |
# Angle of the direction vector for the dot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" gq wrapper that: | |
" - tries its best at keeping the cursor in place | |
" - tries to handle formatter errors | |
function! Format(type, ...) | |
normal! '[v']gq | |
if v:shell_error > 0 | |
silent undo | |
redraw | |
echomsg 'formatprg "' . &formatprg . '" exited with status ' . v:shell_error | |
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Vim syntax file | |
" Language: Todo | |
" Maintainer: Huy Tran | |
" Latest Revision: 14 June 2020 | |
if exists("b:current_syntax") | |
finish | |
endif | |
" Custom conceal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#= | |
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. | |
=# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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! |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
OlderNewer