Skip to content

Instantly share code, notes, and snippets.

View raphink's full-sized avatar
🐝
eBPF everything!

Raphaël Pinson raphink

🐝
eBPF everything!
View GitHub Profile
@raphink
raphink / main.go
Created March 29, 2016 13:34
Access environment variables in a Go template
package main
import (
"os"
"strings"
)
func main() {
const tmpl := `
USER={{.USER}}
mco_site() {
local site=$1
local config=$HOME/.mcollective.d/$site/client.cfg
# "agent"
if test -z $MCOLLECTIVE_SSL_PRIVATE; then
key=$(sed -n "/plugin.ssl_client_private = \(.*\)/ s//\1/p" $config)
MCOLLECTIVE_SSL_PRIVATE=$(mktemp /tmp/mcokey.XXXXXX)
chmod 0600 $MCOLLECTIVE_SSL_PRIVATE
openssl rsa -in $key -out $MCOLLECTIVE_SSL_PRIVATE >/dev/null
@raphink
raphink / Dockerfile
Last active March 22, 2016 12:00
C2C Blog post: Deploying public keys in Docker containers
FROM debian:jessie
ENV GOPATH=/go
RUN apt-get update && apt-get install -y golang-go git \
&& go get github.com/camptocamp/github_pki \
&& apt-get autoremove -y golang-go git \
&& rm -rf /var/lib/apt/lists/*
@raphink
raphink / Dockerfile
Last active February 11, 2019 22:38
C2C blog post: Flexible Docker entrypoints scripts
COPY /docker-entrypoint.sh /
COPY /docker-entrypoint.d/* /docker-entrypoint.d/
ONBUILD COPY /docker-entrypoint.d/* /docker-entrypoint.d/
ENTRYPOINT ["/docker-entrypoint.sh", "/opt/puppetlabs/puppet/bin/mcollectived"]
CMD ["--no-daemonize"]
@raphink
raphink / docker-compose.yml
Last active May 22, 2017 22:55
C2C Blog Post: Puppet docker-compose.yml
---
puppetmaster:
image: 'camptocamp/puppetserver:2.2.1-3'
restart: 'always'
environment:
JAVA_ARGS: '-Xmx10g -Xms10g -XX:MaxPermSize=256m -XX:OnOutOfMemoryError="kill -9 %p" -Djava.security.egd=/dev/urandom -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9010 -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false'
MAX_ACTIVE_INSTANCES: '5'
hostname: 'puppet.example.com'
links:
- 'puppetdb'
# found matching server_name in server_name=geoserver.hello.org
# server_name = geoserver.dev.hello.org
acl host_geoserver_dev_hello_org hdr(host) -i geoserver.dev.hello.org
use_backend geoserver_dev_hello_org_backend if host_geoserver_dev_hello_org
> lua5.1
Lua 5.1.5 Copyright (C) 1994-2012 Lua.org, PUC-Rio
> require 'augeas'
error loading module 'augeas' from file '/usr/lib/x86_64-linux-gnu/lua/5.1/augeas.so':
/usr/lib/x86_64-linux-gnu/lua/5.1/augeas.so: undefined symbol: aug_close
stack traceback:
[C]: ?
[C]: in function 'require'
stdin:1: in main chunk
[C]: ?
module Test_YAML =
(* Simple value *)
test YAML.lns get "aa: master\n" =
{ "aa" = "master" }
(* Simple label *)
test YAML.lns get "aa: &bb\n" =
{ "aa" { "@label" = "bb" } }
Hello! I need some help from the theologians amongst you.
I'm starting to teach the Gospel of John, and being confronted to interesting questions, linked to the Trinity and to the Word "made flesh".
As I'm digging into it, I am seeing that the Logos being the Son of God has been apparently historically rejected by the councils, and that the idea that the Son preexisted his incarnation (Theodore of Mopsuestia and Diodorus of Tarsus) was rejected in the 4th century as implying two sons.
I'm heard a lot of teachings saying that the Angel of the Lord was Jesus in the Old Testament, that Abraham actually met Jesus himself, and so on (and I've taught so, myself).
What is CC's official position on all this?
@raphink
raphink / Dockerfile
Created November 18, 2015 12:30
Dockerized Puppetboard development pointing to distant PuppetDB container
FROM grahamdumpleton/mod-wsgi-docker:python-2.7-onbuild
CMD [ "wsgi.py" ]