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 / gist:8714558
Created January 30, 2014 17:54
ansible 1.4.4 synchronize error
TASK: [repo - sync local files with repo] *************************************
<127.0.0.1> EXEC ['/bin/sh', '-c', 'mkdir -p $HOME/.ansible/tmp/ansible-1391102601.17-167011879999364 && chmod a+rx $HOME/.ansible/tmp/ansible-1391102601.17-167011879999364 && echo $HOME/.ansible/tmp/ansible-1391102601.17-167011879999364']
<127.0.0.1> PUT /var/folders/zb/s_x416gj5fjgmyhjzhdl32dr0000gn/T/tmp6na_PB TO /Users/user/.ansible/tmp/ansible-1391102601.17-167011879999364/synchronize
<127.0.0.1> EXEC ['/bin/sh', '-c', '/usr/bin/python /Users/user/.ansible/tmp/ansible-1391102601.17-167011879999364/synchronize; rm -rf /Users/user/.ansible/tmp/ansible-1391102601.17-167011879999364/ >/dev/null 2>&1']
failed: [ansible-prm] => {"cmd": "rsync --delay-updates --compress --timeout=10 --rsh 'ssh -o StrictHostKeyChecking=no' --out-format='<<CHANGED>>%i %n%L' files/repo/ /srv/repo", "failed": true, "item": "", "rc": 12}
msg: rsync: push_dir#3 "/srv" failed: No such file or directory (2)
rsync error: errors selecting input/output files,
@mtpereira
mtpereira / gist:8714590
Created January 30, 2014 17:55
ansible devel synchronize error
TASK: [repo - sync local files with repo] *************************************
<127.0.0.1> EXEC ['/bin/sh', '-c', 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1391102989.92-54417022812654 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1391102989.92-54417022812654 && echo $HOME/.ansible/tmp/ansible-tmp-1391102989.92-54417022812654']
<127.0.0.1> PUT /var/folders/zb/s_x416gj5fjgmyhjzhdl32dr0000gn/T/tmphuEBpz TO /Users/user/.ansible/tmp/ansible-tmp-1391102989.92-54417022812654/synchronize
<127.0.0.1> EXEC ['/bin/sh', '-c', '/usr/bin/python /Users/user/.ansible/tmp/ansible-tmp-1391102989.92-54417022812654/synchronize; rm -rf /Users/user/.ansible/tmp/ansible-tmp-1391102989.92-54417022812654/ >/dev/null 2>&1']
failed: [ansible-prm] => {"cmd": "rsync --delay-updates --compress --timeout=10 --rsh 'ssh -o StrictHostKeyChecking=no -o Port=2222' --out-format='<<CHANGED>>%i %n%L' files/repo/ /srv/repo", "failed": true, "item": "", "rc": 12}
msg: rsync: push_dir#3 "/srv" failed: No such file or directory (2)
rsync error: error
@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:
@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])
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
#!/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

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:

@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 / .gitignore
Last active November 9, 2016 12:18
terraform ejson
*.tfvars
package ch4
import (
"fmt"
)
func removeAdjacentDuplicates(s []string) {
previous := 0
for i := 1; i < len(s); i++ {
if s[i] == s[previous] {