Skip to content

Instantly share code, notes, and snippets.

View nnzv's full-sized avatar
💭
I may be slow to respond.

Enzo Venturi nnzv

💭
I may be slow to respond.
View GitHub Profile
@nnzv
nnzv / Dockerfile
Last active March 12, 2024 18:02
Run ansible inside a container!
FROM centos:7
WORKDIR /etc/ansible
COPY . .
ENV LC_ALL en_US.UTF-8
RUN yum update -y \
&& yum upgrade -y \
&& yum install -y epel-release \
@nnzv
nnzv / Dockerfile
Last active March 12, 2024 18:02
Enable SSH connection in a container.
FROM ubuntu:20.04
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
openssh-server \
&& mkdir -p /run/sshd \
&& echo "root:auth" | chpasswd \
&& sed -i 's/^#\(PermitRootLogin\) .*/\1 yes/' /etc/ssh/sshd_config \
&& sed -i 's/^\(UsePAM yes\)/# \1/' /etc/ssh/sshd_config
@nnzv
nnzv / app.go
Created January 1, 2023 22:34
[Go] Simple usage of flag package
package main
import (
"fmt"
f "flag"
)
var Flag = func() string {
var used string
f.Visit(func(fg *f.Flag) {
@nnzv
nnzv / create.go
Created January 1, 2023 17:14
Create gopass secrets based on bitwarden JSON vault.
package main
import (
"context"
"log"
"strings"
"io/ioutil"
"encoding/json"
"github.com/gopasspw/gopass/pkg/gopass/api"
@nnzv
nnzv / Makefile
Last active January 1, 2023 17:01
Vagrant libvirt example
all: env ssh
init:
-vagrant validate
clear:
vagrant destroy --force
env: init
vagrant up