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 / Call 1234
Last active April 26, 2016 11:58
Restcomm using Amazon ECS
19:35:02,214 INFO [gov.nist.javax.sip.stack.SIPTransactionStack] (SIP-TCP-Core-PipelineThreadpool-9) <message
from="91.116.135.52:49532"
to="172.17.0.3:5063"
time="1461612902214"
isSender="false"
transactionId="z9hg4bk-363539-444588cfc4915bd2042802134f4b13bb"
callId="1461612902182"
firstLine="REGISTER sip:ec2-54-194-81-211.eu-west-1.compute.amazonaws.com SIP/2.0"
>
<![CDATA[REGISTER sip:ec2-54-194-81-211.eu-west-1.compute.amazonaws.com SIP/2.0
{
"requiresAttributes": [],
"taskDefinitionArn": "arn:aws:ecs:eu-west-1:742070958976:task-definition/restcomm-task-ayuste:4",
"status": "ACTIVE",
"revision": 4,
"containerDefinitions": [
{
"volumesFrom": [],
"memory": 3000,
"extraHosts": null,
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:GetBucketLocation",
"s3:ListAllMyBuckets"
],
"Resource": "arn:aws:s3:::*"
@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:
@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_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 / 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 / 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 / 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 / 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