Skip to content

Instantly share code, notes, and snippets.

@sparsick
sparsick / Vagrantfile-For-Ansible-Testenv-On-Windows
Last active January 19, 2021 23:54
Ansible Local Testenvironment Setup for Windows based on Vagrant and Virtualbox
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
#!/usr/bin/env groovy
import groovy.transform.Field
@Grab('org.eclipse.jgit:org.eclipse.jgit:5.1.2.201810061102-r')
@Grab('io.github.http-builder-ng:http-builder-ng-core:1.0.3')
@Grab('io.github.cdimascio:java-dotenv:3.1.2')
import groovyx.net.http.HttpBuilder
import io.github.cdimascio.dotenv.Dotenv
import jgit.*
import org.eclipse.jgit.api.CreateBranchCommand
@sparsick
sparsick / Vagrantfile-Ansible
Last active October 20, 2020 15:07
Vagrant Box with installed Ansible inside
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "bento/ubuntu-18.04"
config.vm.synced_folder ".", "/vagrant"
config.vm.synced_folder "~/.ssh", "/home/vagrant/ssh-host"

Keybase proof

I hereby claim:

  • I am sparsick on github.
  • I am sparsick (https://keybase.io/sparsick) on keybase.
  • I have a public key whose fingerprint is 0C64 8CEC 331A CECE CFF1 E57B 5F94 32F6 CCAE 222F

To claim this, I am signing this object:

@sparsick
sparsick / jenkins.sh
Last active February 28, 2017 08:38
Jenkins Startscript
#!/bin/bash
export JENKINS_HOME=/path/to/your/jenkins/installation
export HTTP_PORT=8001
export AJP_PORT=8002
export CONTROL_PORT=8003
case "$1" in
start)
nohup java -Djava.awt.headless=true -jar $JENKINS_HOME/jenkins.war --httpPort=$HTTP_PORT --controlPort=$CONTROL_PORT > $JENKINS_HOME/jenkins.log 2>&1 &
@sparsick
sparsick / pom-livingdoc-selenium.xml
Created March 6, 2016 21:16
POM for Acceptance Test with Selenium and LivingDoc
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<repositories>
<repository>
<id>central</id>
<name>Central Repository</name>
<url>http://repo.maven.apache.org/maven2</url>
<layout>default</layout>
@sparsick
sparsick / java-pom-template.xml
Last active May 5, 2023 21:46
Maven POM Template for Java Projects
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId></groupId>
<artifactId></artifactId>
<version>1.0.0-SNAPSHOT</version>
@sparsick
sparsick / autorun.sh
Created January 12, 2015 20:07
auto shutdown and wake up bash script
#!/bin/bash
sudo rtcwake -m no -s 61200 && sudo shutdown -h 00:20
@sparsick
sparsick / vagrant-install-plugin-debug-log
Created October 2, 2014 12:09
Debug Log Output by running vagrant plugin install vagrant-hosts
INFO global: Vagrant version: 1.6.3
INFO global: Ruby version: 2.0.0
INFO global: RubyGems version: 2.0.14
INFO global: VAGRANT_DOTFILE_PATH="/media/skosmalla/Seagate Backup Plus Drive/.vagrant/"
INFO global: VAGRANT_EXECUTABLE="/opt/vagrant/bin/../embedded/gems/gems/vagrant-1.6.3/bin/vagrant"
INFO global: VAGRANT_LOG="debug"
INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="/opt/vagrant/bin/../embedded"
INFO global: VAGRANT_INSTALLER_VERSION="2"
INFO global: VAGRANT_HOME="/media/skosmalla/Seagate Backup Plus Drive/.vagrant.d/"
INFO global: VAGRANT_DETECTED_OS="Linux"
@sparsick
sparsick / groovy-pom.xml
Last active August 17, 2020 09:29
Maven POM Template for Groovy Projects
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>my.group.id</groupId>
<artifactId>my.artifact.id</artifactId>
<version>1.0.0-SNAPSHOT</version>