Skip to content

Instantly share code, notes, and snippets.

View mtpereira's full-sized avatar
🌴
On vacation

Manuel Tiago Pereira mtpereira

🌴
On vacation
View GitHub Profile
@mtpereira
mtpereira / kube-bench-1030-status-fail-output.log
Last active November 5, 2021 08:59
kube-bench-1030-status-fail-output.log
[FAIL] 1.1.12 Ensure that the etcd data directory ownership is set to etcd:etcd (Automated)
[FAIL] 1.2.5 Ensure that the --kubelet-certificate-authority argument is set as appropriate (Automated)
[FAIL] 1.2.15 Ensure that the admission control plugin PodSecurityPolicy is set (Automated)
[FAIL] 1.2.20 Ensure that the --profiling argument is set to false (Automated)
[FAIL] 1.2.21 Ensure that the --audit-log-path argument is set (Automated)
[FAIL] 1.2.22 Ensure that the --audit-log-maxage argument is set to 30 or as appropriate (Automated)
[FAIL] 1.2.23 Ensure that the --audit-log-maxbackup argument is set to 10 or as appropriate (Automated)
[FAIL] 1.2.24 Ensure that the --audit-log-maxsize argument is set to 100 or as appropriate (Automated)
[FAIL] 1.3.2 Ensure that the --profiling argument is set to false (Automated)
[FAIL] 1.4.1 Ensure that the --profiling argument is set to false (Automated)
package ch4
import (
"fmt"
)
func removeAdjacentDuplicates(s []string) {
previous := 0
for i := 1; i < len(s); i++ {
if s[i] == s[previous] {
@mtpereira
mtpereira / .gitignore
Last active November 9, 2016 12:18
terraform ejson
*.tfvars
@mtpereira
mtpereira / # docker-machine-driver-xhyve - 2016-11-07_10-29-18.txt
Created November 7, 2016 10:41
docker-machine-driver-xhyve on macOS 10.10.5 - Homebrew build logs
Homebrew build logs for docker-machine-driver-xhyve on macOS 10.10.5
Build date: 2016-11-07 10:29:18
@mtpereira
mtpereira / local-registry.yml
Last active May 11, 2021 04:22
Local development with Kubernetes
apiVersion: v1
kind: ReplicationController
metadata:
name: kube-registry-v0
namespace: kube-system
labels:
k8s-app: kube-registry
version: v0
spec:
replicas: 1

Keybase proof

I hereby claim:

  • I am mtpereira on github.
  • I am mtpereira (https://keybase.io/mtpereira) on keybase.
  • I have a public key whose fingerprint is A9D0 225C CAC2 9909 9568 BE1C 0F7A EBEE EEB5 DC0C

To claim this, I am signing this object:

#!/usr/bin/env bash
set -eu
function brew_installed { brew list -1 | grep -q -E "^$1$" ; }
function brew_cask_installed { brew cask list -1 | grep -q -E "^$1$" ; }
function brew_cask_tapped { brew tap | grep -q -E "^$1$" ; }
function _stat {
if [ $(which stat) == "/usr/bin/stat" ]; then
From: Petr Matousek <pmatouse@redhat.com>
Date: Wed, 6 May 2015 07:48:59 +0000 (+0200)
Subject: fdc: force the fifo access to be in bounds of the allocated buffer
X-Git-Tag: v2.4.0-rc0~135^2
X-Git-Url: http://git.qemu.org/?p=qemu.git;a=commitdiff_plain;h=e907746266721f305d67bc0718795fedee2e824c
fdc: force the fifo access to be in bounds of the allocated buffer
During processing of certain commands such as FD_CMD_READ_ID and
FD_CMD_DRIVE_SPECIFICATION_COMMAND the fifo memory access could
@mtpereira
mtpereira / music_video.py
Created November 3, 2014 00:16
Create a music video from an audio file and an image file.
#!/usr/bin/env python
from moviepy.editor import AudioFileClip, ImageClip
from sys import argv
audio = AudioFileClip(argv[1])
clip = ImageClip(argv[2]).set_duration(audio.duration).set_audio(audio)
clip.write_videofile(argv[3])
@mtpereira
mtpereira / gist:8714618
Created January 30, 2014 17:55
ansible synchronize error playbook
prm.yml:
---
- hosts: all
sudo: yes
vars_files:
- defaults/main.yml
tasks: