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 | |
import dbus | |
from pprint import pprint | |
import json | |
import sys | |
import time; | |
def focus_wnd(proxy, id): |
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
[ | |
{ | |
"fullName": "ADVANCED DIGITAL HEALTH MEDICINA PREVENTIVA S.A.", | |
"tradingName": "ADVANCED-DH", | |
"details": { | |
"cnpj": "10.345.009/0001-98", | |
"tradingCodes": [ | |
"ADHM3" | |
], | |
"mainActivityDescription": "Prestação de Serv. de Medicina Preventiva; Comércio. Distribuição. Importação E Exportação de Kits de Teste Laboratorial; Intermediação de Neg.; Licenciamento de Marcas E Franquias; Etc.", |
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
! turns right alt into ctrl | |
remove control = Control_R | |
keycode 108 = Control_R NoSymbol Control_R | |
add control = Control_R | |
! VIM-like navigation for the entire system | |
keycode 43 = h H h H Left Left | |
keycode 44 = j J j J Down Down | |
keycode 45 = k K k K Up Up | |
keycode 46 = l L l L Right Right |
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
/** | |
* Enables lazy initialization of beans in tests, which means that | |
* only the beans you're actually using in a test will be initialized/instantiated for you. | |
* | |
* The main advantage of this approach is that it removes the need to configure | |
* properties for beans that you are not even using. | |
*/ | |
@TestComponent | |
class LazyInitializationBeanFactoryPostProcessor : BeanFactoryPostProcessor { | |
override fun postProcessBeanFactory(beanFactory: ConfigurableListableBeanFactory) { |
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
fun mockkStatic(fn: KFunction<Any>) { | |
fn.javaMethod | |
?.declaringClass | |
?.name | |
?.apply { mockkStatic(this) } | |
?: throw Exception("Couln't get declaringClass name from function ::${fn.name}") | |
} |
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
keycode 10 = exclam 1 1 exclam onesuperior exclamdown | |
keycode 11 = at 2 2 at twosuperior onehalf | |
keycode 12 = numbersign 3 3 numbersign threesuperior threequarters | |
keycode 13 = dollar 4 4 dollar sterling onequarter | |
keycode 14 = percent 5 5 percent cent threeeighths | |
keycode 15 = diaeresis 6 6 asciicircum notsign notsign | |
keycode 16 = ampersand 7 7 ampersand braceleft seveneighths | |
keycode 17 = asterisk 8 8 asterisk bracketleft trademark | |
keycode 18 = parenleft 9 9 parenleft bracketright plusminus | |
keycode 19 = parenright 0 0 parenright braceright degree |
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
#!/bin/bash | |
# copied without shame with a little adaptation from https://stackoverflow.com/a/33607859 | |
active_win_id=`xprop -root | grep '^_NET_ACTIVE_W' | awk -F'# 0x' '{print $2}' | awk -F', ' '{print $1}'` | |
if [ "$active_win_id" == "0" ]; then | |
active_win_id="" | |
fi | |
app_name=$1 |