This guide will configure a udev
rule to trigger a script that changes the keyboard layout when a specific Bluetooth device is connected.
To get the MAC address of your Bluetooth device:
- List paired devices:
This guide will configure a udev
rule to trigger a script that changes the keyboard layout when a specific Bluetooth device is connected.
To get the MAC address of your Bluetooth device:
[/] | |
animate-app-switch=true | |
animate-appicon-hover=false | |
animate-appicon-hover-animation-extent={'RIPPLE': 4, 'PLANK': 4, 'SIMPLE': 1} | |
appicon-margin=0 | |
appicon-padding=7 | |
available-monitors=[0] | |
dot-position='BOTTOM' | |
hotkeys-overlay-combo='TEMPORARILY' | |
leftbox-padding=-1 |
services: | |
postgres: | |
image: postgres:latest | |
environment: | |
- 'POSTGRES_DATABASES=database_1,database_2' | |
- 'POSTGRES_PASSWORD=password' | |
- 'POSTGRES_USER=postgres' | |
healthcheck: | |
test: exit $$DUMPS_IMPORTED # Use variable created on multiple-database.sh for checke if dumps were imported | |
interval: 5s |
sudo apt install zsh
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting
git filter-branch --env-filter ' | |
WRONG_EMAIL="wrong@example.com" | |
NEW_NAME="New Name Value" | |
NEW_EMAIL="correct@example.com" | |
if [ "$GIT_COMMITTER_EMAIL" = "$WRONG_EMAIL" ] | |
then | |
export GIT_COMMITTER_NAME="$NEW_NAME" | |
export GIT_COMMITTER_EMAIL="$NEW_EMAIL" | |
fi |
Esses dias me deparei com o seguinte desafio: listar no properties
de um projeto Spring Boot as filas que são utilizadas no projeto e criá-las no RabbitMQ de acordo com essa lista. Até então eu criava as filas uma a uma declarando uma @Bean
(Exemplo 1) e assim toda vez que a aplicação é iniciada as devidas filas são criadas, caso já não existam. O problema aqui é a necessidade de alterar código toda vez que for necessário criar uma nova fila.
Exemplo 1
@Bean
public Queue example1Queue() {
// This code is JSR223 PreProcessor, it's changing post data replacing variable in POST DATA of request | |
String variableValue = vars.get("variableName"); | |
String bodyData = sampler.getArguments().getArgument(0).getValue(); | |
String newBodyData = bodyData.replace("variableName", variableValue); | |
sampler.getArguments().getArgument(0).setValue(newBodyData); |
static calculateAge(birthDate: Date) { | |
const today = new Date(); | |
let age = today.getFullYear() - birthDate.getFullYear(); | |
const month = today.getMonth() - birthDate.getMonth(); | |
if (month < 0 || (month === 0 && today.getDate() < birthDate.getDate())) { | |
age--; | |
} | |
return age; |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.FileOutputStream; | |
import java.io.IOException; | |
import java.util.Arrays; | |
import java.util.List; | |
import java.util.zip.ZipEntry; | |
import java.util.zip.ZipOutputStream; |
import lombok.SneakyThrows; | |
import org.springframework.beans.BeanUtils; | |
import java.lang.reflect.Field; | |
import java.util.ArrayList; | |
import java.util.List; | |
public class CustomBeansUtils extends BeanUtils { | |
public static <T> void copyNonNullValues(Object input, T output) { | |
var ignoreProperties = nullPropertiesFromObject(input); |