View core.clj
(ns bsp.core
(:require [clojure.repl :refer :all]
[clojure.spec :as spec]
[clojure.test.check :refer [quick-check]]
[clojure.test.check.generators :as gen]
[clojure.test.check.properties :refer [for-all]]
[clojure.test :refer [is are run-tests deftest]]))
(defn ultrasort [coll] (seq (into (sorted-set) coll)))
View yaml2json.py
# convert yaml to json
# pip3 install pyyaml
# http://pyyaml.org/wiki/PyYAMLDocumentation
# py3 yaml2json.py < ~/code/manpow/homeland/heartland/puphpet/config.yaml
# gist https://gist.github.com/noahcoad/51934724e0896184a2340217b383af73
import yaml, json, sys
sys.stdout.write(json.dumps(yaml.load(sys.stdin), sort_keys=True, indent=2))
View docker-compose.yml
# Note: You only need to modify one thing to get this to work
# Change line 14 to reflect where your certificates are stored; certs/cert.pem and certs/key.pem
traefik:
image: traefik
command: --web --docker --docker.watch --docker.domain=localhost --logLevel=DEBUG --entryPoints="Name:https Address::443 TLS:/certs/cert.pem,/certs/key.pem" --entryPoints="Name:http Address::80 Redirect.EntryPoint:https"
ports:
- "80:80"
- "443:443"
- "8080:8080"
View keybindings.json
[
{
"key": "ctrl+d",
"command": "editor.action.cutLines",
"when": "editorTextFocus"
},
{
"key": "ctrl+o",
"command": "workbench.action.gotoSymbol"
},
View main.go
package main
import (
"fmt"
"os"
"os/exec"
"syscall"
)
func main() {
View install_jenkins_plugins.sh
#!/bin/bash
host=http://localhost:8080
url=/pluginManager/installNecessaryPlugins
# git plugin https://wiki.jenkins-ci.org/display/JENKINS/Git+Plugin
curl -X POST -d '<jenkins><install plugin="git@2.0" /></jenkins>' --header 'Content-Type: text/xml' $host$url
# artifactory plugin https://wiki.jenkins-ci.org/display/JENKINS/Artifactory+Plugin
curl -X POST -d '<jenkins><install plugin="artifactory@2.2.1" /></jenkins>' --header 'Content-Type: text/xml' $host$url