Skip to content

Instantly share code, notes, and snippets.

View antonmry's full-sized avatar

Antón Rodríguez antonmry

View GitHub Profile
@antonmry
antonmry / litra-auto-on.plist
Last active February 26, 2024 13:08
This is script to auto on/off a Logitech light when the webcam is on/off in Mac. It requires hidapitester
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>litra-auto-on</string>
<key>ProgramArguments</key>
<array><string>/Library/LaunchDaemons/litra-auto-on.sh</string></array>
<key>RunAtLoad</key>
<true/>
@antonmry
antonmry / Dockerfile
Created May 3, 2022 10:42
Docker and Kubernetes workshop
FROM nginx:latest
WORKDIR /usr/share/nginx/html
COPY index.html index.html
@antonmry
antonmry / updateAWSecurityGroup.bash
Last active February 3, 2021 15:23
Simple bash script to update a Security Group matched by description and port in AWS with your Public IP
#! /bin/bash
publicIP=`dig +short myip.opendns.com @resolver1.opendns.com`
## TODO: move port, description and group-id to variables
## Consult previous one
cidrIP=`aws ec2 describe-security-groups --group-ids sg-XXXXXX | jq -r '.SecurityGroups[0].IpPermissions[] | select(.ToPort==80) | .IpRanges[] | select(.Description == "antonmry") | .CidrIp' | tail -1f`
## Delete the previous one
@antonmry
antonmry / application.yml
Created January 30, 2020 11:20
Disable Spring Embedded Kafka logs
spring:
kafka:
producer:
value-serializer: org.springframework.kafka.support.serializer.JsonSerializer
logging:
level:
org.springframework.kafka.*: OFF
org.springframework.kafka.listener.[KafkaMessageListenerContainer$ListenerConsumer]: OFF
org.apache.kafka.*: OFF
@antonmry
antonmry / Foo2.java
Last active January 30, 2020 07:22
SpringBoot application with Junit5 tests using EmbeddedKafka
package example;
import lombok.*;
@Data
@NoArgsConstructor(access = AccessLevel.PRIVATE, force = true)
@AllArgsConstructor
public class Foo2 {
private String foo;
}
@antonmry
antonmry / Data
Created August 9, 2019 10:52
Data
https://docs.google.com/presentation/d/10EW4cLJOW-q_lyDKAPw6wwhsySaZ-NTqEv3eyEAuJgU/edit?usp=sharing
@antonmry
antonmry / config
Created November 14, 2018 09:38
i3 config configuration
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
## Startup
exec xrandr --dpi 220
@antonmry
antonmry / thyme.sh
Created September 14, 2016 14:29
Thyme script with detect absent, autoupdate and web refresh
#! /bin/bash
# Dependencies (Fedora)
# xprintidle: https://copr.fedorainfracloud.org/coprs/alonid/xprintidle/
# wmctrl: dnf install wmctrl
# Config
LOGFILE="/home/antonmry/Documents/thyme/thyme_$(date '+%Y%m%d').log"
HTMLFILE="/home/antonmry/Documents/thyme/thyme_$(date '+%Y%m%d').html"
HTMLFILETEMP="/home/antonmry/Documents/thyme/thyme.html"
@antonmry
antonmry / .Xresources
Last active January 9, 2018 22:48
My i3 configuration and some xrand outputs
! Fonts {{{
Xft.antialias: true
Xft.hinting: true
Xft.rgba: rgb
Xft.hintstyle: hintfull
Xft.dpi: 100
! }}}
@antonmry
antonmry / Installation of Fedora 23 on Dell XPS 13 2015 (9343) .md
Last active August 21, 2017 14:00
Installation of Fedora 21 on Dell XPS 13 Developer Edition 2015