Skip to content

Instantly share code, notes, and snippets.

<%- @acl_policies.each do |policy| -%>
<%= YAML.dump(policy) %>
<%- end -%>
@grafjo
grafjo / deploy-nexus.xml
Created October 15, 2015 15:42
Rundeck job using nexus step plugin
<joblist>
<job>
<context>
<options preserveOrder='true'>
<option enforcedvalues='true' name='repository' required='true' value='releases' values='releases,snapshots'>
<description>Nexus repository name</description>
</option>
<option name='version' required='true' value='LATEST'>
<description>Nexus artifact version</description>
</option>
package demo;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
@grafjo
grafjo / build.gradle
Created October 31, 2014 14:17
Example gradle build to upload a Spring Boot based jar to nexus
group = "foo"
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.1.8.RELEASE")
}
}
# Reverse lookup
lala=<%= scope.function_foobar(['192.168.0.0/24']) %>
@grafjo
grafjo / digitalocean
Last active November 5, 2016 23:44
Packer.io DigitalOcean example
{
"variables": {
"do_api_key": "",
"do_client_id": "",
"do_droplet_name": "trusty-x86-64-{{timestamp}}",
"do_private_networking": "false",
"do_image": "ubuntu-14-04-x64",
"do_region": "ams2",
"do_size": "512MB"
},
@grafjo
grafjo / 70-persistent-usb-rs232.rules
Created March 8, 2013 13:01
udev rule mapping for USB RS232 adapters pluged into a D-Link DUB-H7 7-Port USB 2 Hub
#/etc/udev/rules.d/70-persistent-usb-rs232.rules
KERNEL=="ttyUSB*", KERNELS=="1-1.3.1.1", SYMLINK="ttySerialPort1"
KERNEL=="ttyUSB*", KERNELS=="1-1.3.2", SYMLINK="ttySerialPort2"
KERNEL=="ttyUSB*", KERNELS=="1-1.3.1.2", SYMLINK="ttySerialPort3"
KERNEL=="ttyUSB*", KERNELS=="1-1.3.3", SYMLINK="ttySerialPort4"
KERNEL=="ttyUSB*", KERNELS=="1-1.3.1.3", SYMLINK="ttySerialPort5"
KERNEL=="ttyUSB*", KERNELS=="1-1.3.4", SYMLINK="ttySerialPort6"
KERNEL=="ttyUSB*", KERNELS=="1-1.3.1.4", SYMLINK="ttySerialPort7"
@grafjo
grafjo / wpa_supplicant.conf
Created March 8, 2013 12:36
Setup WIFI for your Raspberry Pi
#/etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=/var/run/wpa_supplicant
eapol_version=1
ap_scan=1
network={
ssid="TheSSIDOfYourWlan"
scan_ssid=1
proto=RSN
key_mgmt=WPA-PSK