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
// safeSplit handles quoting well for commands for use with github.com/jmervine/exec/v2 | |
// | |
// Examples: | |
// > safeSplit("/bin/bash bash -l -c 'echo \"foo bar bah bin\"'") | |
// => []string{"/bin/bash", "-l", "-c", "echo \"foo bar bah bin\""} | |
// > safeSplit("docker run --rm -it some/image bash -c \"npm test\"") | |
// => []string{"docker", "run", "--rm", "-it", "some/image", "bash", "-c", "npm test"} | |
//---- | |
// package main | |
// import "github.com/jmervine/exec/v2" |
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/bin/env bash | |
# Simple script to start and seed a local splunk instances using Docker | |
# Usage: | |
# $ bash splunk.sh [USERNAME] [HEC TOKEN] | |
PASSWORD="$1" | |
TOKEN="$2" | |
test -z "$PASSWORD" && PASSWORD=password | |
test -z "$TOKEN" && TOKEN=token |
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
$ sudo apt-get install mysql-server mysql-client | |
... output omitted ... | |
$ sudo mysqladmin -u root -h localhost password 'password' | |
... output omitted ... | |
$ mysql -u root -p | |
... output omitted ... | |
mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'your_host_name' IDENTIFIED BY "password"; | |
Query OK, 0 rows affected (0.00 sec) | |
mysql> FLUSH PRIVILEGES; |
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
# Usage: | |
# | |
# Start with: | |
# | |
# sudo /use/local/sbin/nginx -c /path/to/this/nginx.conf | |
# | |
# Tail logs: | |
# | |
# $ sudo tail -f /tmp/access.log /tmp/error.log /tmp/match.log | |
# |
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
# | |
# Tasks | |
# | |
# - start :: starts application using forever | |
# - stop :: stops application using forever | |
# - restart :: restart application using forever | |
# | |
# This set's your local directory to to your NODE_PATH | |
NODE_EXEC = NODE_PATH=.:$(NODE_PATH) |
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 ( | |
"fmt" | |
"log" | |
"net/http" | |
) | |
func Log(handler http.Handler) http.Handler { | |
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { |
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
--- | |
apiVersion: 'kubernetes-client.io/v1' | |
kind: ExternalSecret | |
metadata: | |
name: test-external-secrets | |
namespace: default | |
secretDescriptor: | |
backendType: secretsManager | |
data: | |
- key: /splunk/license |
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/bin/env node | |
/*** | |
* Setup: | |
* | |
* npm install maxcdn subarg async | |
* | |
***/ | |
var MaxCDN, subarg, async; | |
try { | |
MaxCDN = require('maxcdn'); |
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
UPDATE_TYPE ?= sts | |
STS ?= | |
indexers: ## Select indexer as actionable StatefultSet | |
indexers: | |
$(eval STS := indexer) | |
@echo "Set indexer as actionable StatefulSet" | |
indexer: indexers |