This file contains 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/local/bin/nginx: | |
apt install nginx |
This file contains 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
VENV=.venv | |
$(VENV): | |
virtualenv $(VENV) | |
$(VENV)/bin/py.test: $(VENV) | |
$(VENV)/bin/pip install dev_requirements.txt | |
test: $(VENV)/bin/py.test | |
$(VENV)/bin/py.test . |
This file contains 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
SOURCES=$(shell find . -name '*.go') | |
myapp: $SOURCES | |
go build -o myapp ./cmd/myapp |
This file contains 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 CreateExecutor(cmdType string, cmdCfg CommandConfig) *CommandExecutor { | |
ce := &CommandExecutor{} | |
switch cmdType { | |
case "docker": | |
ce.Command = CreateDockerCommand(cmdCfg) | |
case "ssh": | |
ce.Command = CreateSSHCommand(cmdCfg) | |
} | |
This file contains 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
type CreateCommand func() []string | |
type CommandExecutor struct { | |
CmdString string | |
Command CreateCommand | |
} | |
func (ce *CommandExecutor) defaultCommand() []string { | |
return []string{"/bin/bash", "-c", ce.CmdString} | |
} |
This file contains 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
--- | |
- exec: | |
cmd: ls -la | |
- docker: | |
image: ubuntu | |
cmd: ls -la | |
- ssh: | |
connect: foo.example.com |
This file contains 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
package main | |
import ( | |
"encoding/json" | |
"flag" | |
"fmt" | |
"io/ioutil" | |
"os" | |
"github.com/ionrock/procs" |
This file contains 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
Failure/Error: expect(model).to eq('environment') | |
expected: "environment" | |
got: "environemnt" | |
(compared using ==) |
This file contains 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
with_items: "{% for host in groups['app'] %}" | |
- "{{ host }}" | |
"{% endfor %}" |
This file contains 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
(defun source-to-elisp (fname) | |
(with-temp-buffer | |
(insert-file fname) | |
(while (re-search-forward "^export \\(.*\\)=\\(.*\\)") | |
(let ((key (match-string 1)) | |
(value (replace-regexp-in-string "\'\"" "" (match-string 2)))) | |
(if (and key value) | |
(progn | |
(setenv key value))))))) |
NewerOlder