Skip to content

Instantly share code, notes, and snippets.

View TFaga's full-sized avatar

Tilen Faganel TFaga

View GitHub Profile
@TFaga
TFaga / driver.sh
Created June 24, 2017 10:02
Wildfly postgresql datasource configuration
./jboss-cli.sh
embed-server --std-out=echo --server-config=standalone.xml
module add --name=org.postgres --resources=/tmp/postgresql-42.1.1.jar --dependencies=javax.api,javax.transaction.api
exit
Install-windowsfeature AD-domain-services,DHCP,DNS
Install-ADDSDomainController -CreateDnsDelegation:$false -DomainName 'tf.com' -InstallDns:$true -NoGlobalCatalog:$false -SiteName 'Default-First-Site-Name' -NoRebootOnCompletion:$true -Force:$true -DatabasePath 'C:\Windows\NTDS' -SysvolPath 'C:\Windows\SYSVOL' -LogPath 'C:\Windows\NTDS'
netdom query fsmo
Move-ADDirectoryServerOperationMasterRole -Identity DC02-NEW -OperationMasterRole SchemaMaster, DomainNamingMaster, PDCEmulator, RIDMaster, InfrastructureMaster
Export-DhcpServer -File C:\DHCPdata.xml -Leases -Force -ComputerName old.network.local –Verbose
@TFaga
TFaga / settings.xml
Last active February 12, 2018 23:02
travis-gpg-mvn-keys.sh
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<localRepository/>
<interactiveMode/>
<usePluginRegistry/>
<offline/>
<pluginGroups/>
<servers>
@TFaga
TFaga / table_of_contents.rb
Created August 13, 2017 09:42
Markdown table of content creator
#!/usr/bin/env ruby
File.open("spec-payment-system-v1.md", 'r') do |f|
f.each_line do |line|
forbidden_words = ['Table of contents', 'define', 'pragma']
next if !line.start_with?("#") || forbidden_words.any? { |w| line =~ /#{w}/ }
title = line.gsub("#", "").strip
href = title.gsub(" ", "-").downcase
puts " " * (line.count("#")-1) + "* #{title}"
#!/usr/bin/env bash
mvn versions:set -DnewVersion=$1
mvn versions:commit
git add .
git commit -S -m "Release v$1"
#!/bin/bash
# Add usernames to add to /etc/sudoers for passwordless sudo and disable password
users=("ansible")
for user in "${users[@]}"
do
cat /etc/sudoers | grep ^$user
RC=$?
if [ $RC != 0 ]; then