Skip to content

Instantly share code, notes, and snippets.

@rsvalerio
rsvalerio / ansible-galaxy-local
Created August 19, 2015 03:45
Shortcut to run playbooks wihtout the need of -i 'localhost,'
#!/bin/bash
ansible-playbook "$1" -i 'localhost,'
GVCast - Pod cast do geracao de valor
http://geracaodevalor.com/gvcast/site/index
Empreendedorismo
NerdCast
http://jovemnerd.com.br/categoria/nerdcast/
Humor/Geek
Inglês na ponta da língua
http://www.inglesnapontadalingua.com.br/category/podcast
platforms:
- name: EL
versions:
- all
- 5
- 6
- 7
- name: GenericUNIX
versions:
- all
package com.rsvalerio.spring;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import org.atteo.classindex.ClassIndex;
import org.springframework.beans.factory.ObjectFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.embedded.FilterRegistrationBean;
import org.springframework.context.MessageSource;
<?xml version="1.0" encoding="UTF-8"?>
<configuration scan="true">
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<charset>utf-8</charset>
<Pattern>[%p] %c - %m%n</Pattern>
</encoder>
</appender>
<logger name="javax.activation" level="warn"/>
<profiles>
<profile>
<id>travis</id>
<activation>
<property>
<name>env.TRAVIS</name>
<value>true</value>
</property>
</activation>
<build>
@rsvalerio
rsvalerio / install_jenkins_plugin.sh
Created December 13, 2016 23:40 — forked from micw/install_jenkins_plugin.sh
Script to install one or more jenkins plugins including dependencies while jenkins is offline
#!/bin/bash
set -e
if [ $# -eq 0 ]; then
echo "USAGE: $0 plugin1 plugin2 ..."
exit 1
fi
plugin_dir=/var/lib/jenkins/plugins
@rsvalerio
rsvalerio / netbox-ansible-inventory
Created June 28, 2017 09:02
netbox-ansible-inventory
{% regroup queryset|dictsort:"device_role.id" by device_role as per_role %}
{% for role in per_role %}
[{{ role.grouper.slug }}]
{% for device in role.list %}{% if device.primary_ip %}
{{ device.name|slugify }} ansible_host={{ device.primary_ip.address.ip }}{% endif %}{% endfor %}
{% endfor %}
@rsvalerio
rsvalerio / gist:639501ccc2b1bc29e1b3b8f6d07fe040
Created July 4, 2017 16:09
Switch jenkins scm trigger from poll to webhook
import hudson.model.*
import hudson.triggers.*
import com.cloudbees.jenkins.*
TriggerDescriptor SCM_TRIGGER_DESCRIPTOR = Hudson.instance.getDescriptorOrDie(SCMTrigger.class)
assert SCM_TRIGGER_DESCRIPTOR != null;
for(item in Hudson.instance.items)
{