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
| fn bottles(x : u8) -> String { | |
| match x { | |
| 0 => String::from("no more bottles"), | |
| 1 => String::from("1 bottle"), | |
| y => format!("{} bottles", y), | |
| } | |
| } | |
| fn phrase(x : u8) -> String { | |
| format!("{current} of beer on the wall |
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 | |
| # Run in directory project | |
| comment_spec(){ | |
| spec_helper=$(cat <<\EOF | |
| require 'beaker-rspec' | |
| hosts.each do |host| | |
| #install_puppet | |
| #on host, "mkdir -p #{host['distmoduledir']}" |
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
| diff --git a/doc/source/statsd.rst b/doc/source/statsd.rst | |
| index b3bf99f..de0c414 100644 | |
| --- a/doc/source/statsd.rst | |
| +++ b/doc/source/statsd.rst | |
| @@ -26,6 +26,82 @@ Your init script most probably loads a configuration file named | |
| STATSD_HOST=10.0.0.1 | |
| STATSD_PORT=8125 | |
| +Metrics Types | |
| +------------- |
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 alpine:3.2 | |
| RUN mkdir /counterstrike | |
| WORKDIR /counterstrike | |
| ADD * /counterstrike/ | |
| EXPOSE 3000 | |
| CMD ls /counterstrike |
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 | |
| # Run in directory project | |
| comment_spec(){ | |
| spec_helper=$(cat <<\EOF | |
| require 'beaker-rspec' | |
| hosts.each do |host| | |
| #install_puppet | |
| #on host, "mkdir -p #{host['distmoduledir']}" | |
| 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 bash | |
| spec_helper=$(cat <<\EOF | |
| require 'beaker-rspec' | |
| hosts.each do |host| | |
| #install_puppet | |
| #on host, "mkdir -p #{host['distmoduledir']}" |
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 'shellwords' | |
| def escape(s) | |
| Shellwords.shellescape(s) | |
| end | |
| entry = '' | |
| entry_escaped = entry.gsub(/\*/, '\\*').gsub(/\[/, '\\[').gsub(/\]/, '\\]') | |
| grep_command = "grep -v '^[[:space:]]*#' | grep -- ^#{escape(entry_escaped)}$" |
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
| git: github.com/bltavares/kickstart, dependencies/kickstart, master | |
| hg: bitbucket.org/banana/banana, bin/banana, asdf12 |
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 'rack' | |
| app = Proc.new do |env| | |
| if env['PATH_INFO'] == '/301' | |
| next ['301', {'Content-Type' => 'text/html', 'X-Auth-Token' => 'This-Should-Be-Forwarded', 'Location' => '/headers'}, []] | |
| end | |
| if env['PATH_INFO'] == '/302' | |
| next ['302', {'Content-Type' => 'text/html', 'X-Auth-Token' => 'This-Should-Be-Forwarded', 'Location' => '/headers'}, []] | |
| 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
| module A | |
| class B::C | |
| end | |
| end |