# pull container for https://github.com/rcrowley/certified
docker pull groob/certified:latest
# create CA and intermediary CA; will prompty you for a password
docker run --rm -it --name certified -v $(pwd)/certs:/certified/etc -e GIT_USER=groob -e GIT_EMAIL=groob+github@gmail.com groob/certified certified-ca C="US" ST="NY" L="New York" O="Example" CN="groob-ca"
# create server cert
docker run --rm -it --name certified -v $(pwd)/certs:/certified/etc -e GIT_USER=groob -e GIT_EMAIL=groob+github@gmail.com groob/certified certified CN="servq.groob.io"
# create cert chain as server.crt
cat certs/ssl/certs/servq.groob.io.crt certs/ssl/certs/ca.crt certs/ssl/certs/root-ca.crt > server.crt
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" | |
"image" | |
"image/draw" | |
"image/jpeg" | |
"image/png" | |
"io" | |
"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
package main | |
import ( | |
"fmt" | |
"log" | |
"net/http" | |
) | |
/* | |
use |
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
lead, err := readExact(f, 28) | |
if err != nil { | |
return fmt.Errorf("error reading RPM lead: %s", err.Error()) | |
} | |
// fmt.Printf("%x", lead) | |
// Check file magic | |
magic := binary.BigEndian.Uint32(lead[0:4]) | |
if magic&0xffffffff != 0x70627a78 { |
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 | |
/* | |
#cgo LDFLAGS: -framework IOKit -framework ApplicationServices | |
#include <CoreFoundation/CoreFoundation.h> | |
#include <stdlib.h> | |
// cfstring_utf8_length returns the number of characters successfully converted to UTF-8 and | |
// the bytes required to store them. | |
static inline CFIndex cfstring_utf8_length(CFStringRef str, CFIndex *need) { |
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
module Main exposing (..) | |
import Autocomplete | |
import WebSocket | |
import Json.Decode.Extra exposing ((|:)) | |
import Json.Decode as Json exposing ((:=), Decoder) | |
import Json.Encode as JE | |
import String | |
import Task | |
import Dom |
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
/* | |
HookHandler - listen for github webhooks, sending updates on channel. | |
DeploymentMonitor select update type based on channel and call deployment script | |
*/ | |
package main | |
import ( | |
"fmt" | |
"html/template" | |
"io/ioutil" |
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
call plug#begin('~/.vim/plugged') | |
Plug 'fatih/vim-go' | |
Plug 'SirVer/ultisnips' | |
Plug 'AndrewRadev/splitjoin.vim' "split go structs... | |
Plug 'morhetz/gruvbox' | |
Plug 'tomtom/tcomment_vim' | |
Plug 'ctrlpvim/ctrlp.vim' | |
Plug 'godlygeek/tabular' | |
Plug 'tpope/vim-fugitive' | |
Plug 'ctrlpvim/ctrlp.vim' |
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
https://elmvids.groob.io:443 { | |
log stdout | |
prometheus | |
proxy / localhost:4001 | |
tls { | |
max_certs 10 | |
} | |
} | |
https://groob.io:443 { |
First, create the appropriate directories like tags/some_role/hardware_tag.txt
The text file, hardware_tag.txt
can have any metadata you'd like, as long as it's in a format that facter will read.
See https://docs.puppet.com/facter/3.1/custom_facts.html#external-facts
# hardware_tag.txt
role=labmac
building=nh
room=101
dualboot=true