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 / 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

@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 / 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 / main.groovy
Last active June 23, 2016 08:22
Load groovy properties-like file in another groovy file
import groovy.lang.GroovyClassLoader
// http://docs.groovy-lang.org/latest/html/documentation/index.html#_integrating_groovy_in_a_java_application
def gcl = new GroovyClassLoader()
def clazz = gcl.parseClass(new File("./template.groovy"))
assert clazz.name == 'Env'
def o = clazz.newInstance()
o.doIt()
println o.test
@antonmry
antonmry / call-forwarding-receiver.xml
Created June 18, 2016 11:15
SIP Diversion Header test
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE scenario SYSTEM "sipp.dtd">
<!-- Luis Barreiro - Mobicents QA team -->
<scenario name="UAS for SIP-Servlets Tests">
<recv request="INVITE" rrs="true" timeout="5000" />
<send>
@antonmry
antonmry / intellij.md
Created June 4, 2016 11:48 — forked from uarun/intellij.md
Intellij IDEA - Cheat Sheet (aka useful shortcuts)

Intellij IDEA - Cheat Sheet (aka most useful shortcuts)

Note: Some of these keymapping are specific to IdeaVim plugin. If you don't use IdeaVim (what' wrong with you :)), I've tried to point out where they differ, but I could have missed a few

Coding Session

Parameter documentation for Method Calls

  • Ctrl-P - Popup parameter documentation for method calls
@antonmry
antonmry / cards.go
Created June 1, 2016 21:43
dailyprogrammer: Network and Cards: Part 1, The network
package main
// See https://www.reddit.com/r/dailyprogrammer/comments/4knivr/20160523_challenge_268_easy_network_and_cards/
import (
"flag"
"fmt"
"net"
"os"
"sync"
@antonmry
antonmry / restcomm_rc_range.yml
Created May 21, 2016 13:48
RestComm & Kubernetes with port ranges
apiVersion: v1
kind: ReplicationController
metadata:
name: restcomm-core-controller
spec:
replicas: 1
selector:
app: restcomm-core
template:
metadata:
@antonmry
antonmry / delete_label_from_issues.sh
Created May 19, 2016 18:03
Delete one label from the issues already done in one repository
ghi list -L LABELTOBEDELETED -s closed -- YOURORGANIZATION/YOURREPO | sed -n '/^[ 0-9 ]/p' | sed -r 's/([^0-9]*([0-9]*)){1}.*/\2/' | xargs -I %issue sh -c 'ghi label "%issue" -d "LABELTOBEDELETED" -- YOURORGANIZATION/YOURREPO'
@antonmry
antonmry / restcomm_rc.yml
Last active April 30, 2016 14:20
restcomm_rc.yml by @adimania
apiVersion: v1
kind: ReplicationController
metadata:
name: restcomm-core-controller
spec:
replicas: 1
selector:
app: restcomm-core
template:
metadata: