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
| description "LDAP" | |
| start on filesystem and started docker | |
| stop on runlevel [!2345] | |
| respawn | |
| respawn limit 5 5 | |
| script | |
| /usr/bin/docker start -a ldap | |
| end script |
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 | |
| require 'bundler/setup' | |
| require 'http' | |
| require 'celluloid' | |
| require 'celluloid/io' | |
| require 'json' | |
| class Event |
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
| FROM busybox | |
| ADD echo.sh /tmp/echo.sh | |
| ENTRYPOINT ["/tmp/echo.sh"] |
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 OperatingHour | |
| class MissingTimeZoneError < StandardError; end | |
| class MissingTimeStringError < StandardError; end | |
| attr_reader :time_string, :time_zone | |
| def initialize(opts={}) | |
| @time_string = opts[:time_string] | |
| @time_zone = opts[:time_zone] | |
| end |
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
| merged_images = left.images.with_index.collect do |image, index| | |
| compare(left.images[index], right.images[index], index) | |
| end |
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
| FROM ubuntu | |
| # some awesome stuff with mysql | |
| VOLUME /var/lib/mysql | |
| --- End Dockerfile --- | |
| docker build -t my/awesome_mysql_stuff |
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
| func (b *buildFile) BuildCmdFromJson(args string) []string { | |
| var cmd []string | |
| if err := json.Unmarshal([]byte(args), &cmd); err != nil { | |
| utils.Debugf("Error unmarhsalling: %s, setting %s to /bin/sh -c", err) | |
| cmd = []string{"/bin/sh", "-c", args} | |
| } | |
| return cmd | |
| } | |
| func (b *buildFile) CmdCmd(args string) error { |
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
| func (b *buildFile) CmdEnv(args string) error { | |
| var env map[string]string | |
| if err := json.Unmarshal([]byte(args), &env); err != nil { | |
| env = []string{args} | |
| } | |
| if err := b.commit("", env, fm.Sprintf("ENV %v", env)); err != nil { | |
| return err | |
| } |
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 'celluloid' | |
| require 'celluloid/io' | |
| class MySocket | |
| def go | |
| @sock ||= Celluloid::IO::TCPSocket.open('localhost', 2000) | |
| puts "#{@sock.read}" | |
| end | |
| end |
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 | |
| require 'winrm' | |
| IP=ARGV[0] | |
| USER=ARGV[1] | |
| endpoint = "http://#{IP}:5985/wsman" | |
| winrm = WinRM::WinRMWebService.new endpoint, :plaintext, user: USER, pass: 'secret', basic_auth_only: true | |
| winrm.set_timeout 1800 | |
| installer_file = "c:\\Users\\#{USER}\\Downloads\\chef_client.msi" |