Skip to content

Instantly share code, notes, and snippets.

View Hylke1982's full-sized avatar

Hylke Stapersma Hylke1982

View GitHub Profile
@Hylke1982
Hylke1982 / FirstLetterOfWordCapital.java
Created February 17, 2015 11:45
Method to make first letter of a word capital
public String firstLetterCapitalWithSingleSpace(final String words) {
return Stream.of(words.trim().split("\\s"))
.filter(word -> word.length() > 0)
.map(word -> word.substring(0, 1).toUpperCase() + word.substring(1))
.collect(Collectors.joining(" "));
}
@Hylke1982
Hylke1982 / librarian-puppet-script.sh
Last active August 29, 2015 14:09
librarian puppet shell script
#!/bin/sh
# Required GEM version for librarian puppet
REQUIRED_GEM_VERSION=1.9
PUPPET_DIR=/etc/puppet/
# Set correct package manager
set_package_manager()
{
# Determine which package manager to use