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
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active May 3, 2024 05:44
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@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'
@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" ]
@raphink
raphink / Talk_Subjects.md
Last active May 16, 2022 10:08
Talk Subjects to be used for CFPs

General and Concepts

  • Declarative Deployments & why it matters

Over the last 30 years, the Configuration Management community has learned that using a declarative approach to resource management is beneficial for both stability and change management. How does this apply to the new paradigm of Kubernetes deployments?

YAML has become the de-facto standard to express resources in many fields linked to DevOps practices. What are YAML's strengths and weaknesses, and what are the other options going forward?

File Manipulation Approaches

Full configurations

Static content

  • Software/script => have you considered packaging it?
  • binary/large data file => add metadata (git + vcsrepo type, maybe even git-annex or git-lfs?)
  • Puppet >= 3.7:
@jedi4ever
jedi4ever / dns tuning ssh login speedup vagrant
Created May 27, 2013 13:37
speeding up DNS/SSH connections in vagrant
- Tune /etc/ssh/sshd_config
UseDNS no # Disable DNS lookups
GSSAPIAuthentication no # Disable negotation of slow GSSAPI
don't forget to restart it, use a script provider to set it , or create it with veewee or snapshot it
- Tune Vagrantfile
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
@thbar
thbar / how-to-diff-pdf-files-with-git-and-diffpdf.md
Last active November 3, 2023 06:01
How to diff PDF files with Git

One can use MD5 or plain text diff to see differences in PDF files. If that's not enough, here's how to use diff-pdf which knows how to diff based on appearance or words:

  • brew install diff-pdf
  • edit your ~/.gitconfig to add this:
[difftool "diffpdf"]
  cmd = diff-pdf --view \"$LOCAL\" \"$REMOTE\"
@emboss
emboss / gist:2902696
Created June 9, 2012 21:44
Save RSA public keys in the pre-1.9.3 PKCS#1 format
require 'openssl'
require 'base64'
rsa = OpenSSL::PKey::RSA.new(2048)
modulus = rsa.n
exponent = rsa.e
ary = [OpenSSL::ASN1::Integer.new(modulus), OpenSSL::ASN1::Integer.new(exponent)]
pub_key = OpenSSL::ASN1::Sequence.new(ary)
base64 = Base64.encode64(pub_key.to_der)