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 / 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 / workarround.md
Last active November 9, 2016 07:54
Fix [drm:intel_pipe_update_start [i915]] *ERROR* Potential atomic update failure on pipe B in Fedora

To solve screen is flickering

sudo -e /etc/default/grub

Add i915.enable_psr=0 to GRUB_CMDLINE_LINUX="...... i915.enable_psr=0"

@antonmry
antonmry / README.md
Last active December 27, 2016 10:53
How you would have done things to have the best HA/automated architecture?. Share with us any ideas you have in mind to improve this kind of infrastructure. Tomorrow we want to put this project in production. What would be your advices and choices to achieve that? Regarding the infrastructure itself and also external services like the monitoring…

The best HA/automated architecture

Disclaimer: I don't believe there is a best architecture. It depends of the business requirements and there are several things to consider, including non-tecnical ones.

High-availability

List of things I've done to have a reliable, easy to maintain, operate and evolve HA architecture.

Scale dinamically

processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 61
model name : Intel(R) Core(TM) i7-5500U CPU @ 2.40GHz
stepping : 4
microcode : 0x24
cpu MHz : 2899.951
cache size : 4096 KB
physical id : 0
@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 / tareas.md
Created June 13, 2017 17:05
Chuleta VigoJUG
  • Confirmar ponentes
  • Añadilos o grupo @vigojug/ponentes e poñelos nesta issue (xa están invitados) @antonmry
  • Confirmar local (volver a facelo) e no calendar @antonmry
  • Crear PR entrada na web e editar http://www.vigojug.org/meetings.html @antonmry
  • Crear en meetup @antonmry
  • Publicar en Twitter e Linkedin @antonmry
  • Cartel @tomasalmeida
  • Envío a universidades e FPs @antonmry
  • Lanzar enquisa Reto (7 días antes) -> 27/06
  • Mandar correo recordatorio (3-4 días antes)
@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 / 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 / Data
Created August 9, 2019 10:52
Data
https://docs.google.com/presentation/d/10EW4cLJOW-q_lyDKAPw6wwhsySaZ-NTqEv3eyEAuJgU/edit?usp=sharing
@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;
}