This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class updated::config { | |
file { '/updated/bin/': | |
ensure => directory, | |
recurse => true, | |
purge => true, | |
force => true, | |
owner => root, | |
group => root, | |
mode => 775, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# Use the currently configured ruby version | |
# I could not get this to work on v1.8.7, only v1.9.3 | |
# optparse contains OptionParser, ostruct: OpenStruct and growl Growl | |
require 'optparse' | |
require 'ostruct' | |
require 'growl' | |
# This is the name of the script that is called |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name accessphase.mydomain.com; | |
rewrite ^ https://accessphase.mydomain.com$request_uri permanent; | |
} | |
server { | |
listen 192.168.97.208:443; | |
server_name accessphase.mydomain.com; | |
root /opt/nginx/accessphase.mydomain.com/public_html; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
srpm_url=$1 | |
srpm=`basename $srpm_url` | |
srpm_name=`echo $srpm | sed -r 's|-[0-9]+.*$||g'` | |
cat <<EOF | |
## Setting up tree for: ## | |
########################## |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# on centos minimal | |
yum install gcc | |
yum install make | |
yum install ncurses-devel | |
yum install lua lua-devel | |
yum install ruby ruby-devel | |
yum install python python-devel | |
yum install perl perl-devel |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Example use: | |
# | |
# 1.9.3p392 :000 > equal_div(432,239842934,22) | |
# => [[432, 10902364], [10902365, 21804297], [21804298, 32706230], [32706231, 43608163], [43608164, 54510096], [54510097, 65412029], [65412030, 76313962], [76313963, 87215895], [87215896, 98117828], [98117829, 109019761], [109019762, 119921694], [119921695, 130823627], [130823628, 141725560], [141725561, 152627493], [152627494, 163529426], [163529427, 174431359], [174431360, 185333292], [185333293, 196235225], [196235226, 207137158], [207137159, 218039091], [218039092, 228941024], [228941025, 239842934]] | |
# | |
# 1.9.3p392 :001 > equal_div(432,239842934,4) | |
# => [[432, 59961058], [59961059, 119921685], [119921686, 179882312], [179882313, 239842934]] | |
# | |
def equal_div(first, last, num_of_groups) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'optparse' | |
options = {} | |
optparse = OptionParser.new do |opts| | |
opts.banner = "Usage: #{File.basename($0)} [options]" | |
opts.on("-d", "--debug", | |
"Enables some helpful debugging output." | |
) { |value| options[:debug] = true } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
file { '/etc/opendkim.conf': | |
ensure => present, | |
owner => root, | |
group => root, | |
mode => 644, | |
source => 'puppet:///modules/postfix/etc/opendkim.conf', | |
notify => [ Exec['execName'], Service['opendkim'] ], | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
CACERTS_KEYSTORE="/usr/java/latest/jre/lib/security/cacerts" | |
wget http://www.startssl.com/certs/ca.pem | |
keytool -import -trustcacerts -file ca.pem -alias startssl_ca -keystore ${CACERTS_KEYSTORE} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'io/console' | |
print "Please enter your password: " | |
password = STDIN.noecho(&:gets).chomp | |
puts ## This is here to add a line break after grabbing the user input |
OlderNewer