Skip to content

Instantly share code, notes, and snippets.

View javierprovecho's full-sized avatar

javierprovecho

View GitHub Profile
command:
# interpeted as a string
- helm push $${repo}:${DRONE_TAG}
# interpreted as string
- helm push foo:bar
# if ${DRONE_TAG} is missing or empty,
# it will be rendered as follows.
ALERT deleted_container_rate_on_hosts
IF sum without(instance) (rate(engine_daemon_container_actions_seconds_count{action="delete"}[1m])) > 0.1
FOR 1m
ANNOTATIONS {
summary = "DELETED CONTAINER RATE WARNING ON '{{ $labels.instance }}'",
description = "{{ $labels.instance }} has a HIGH rate of deleted containers. Deleted container rate is {{ humanize $value}}%.",
}
@javierprovecho
javierprovecho / README.md
Last active May 25, 2017 20:11 — forked from jorgesancha/python_code_test_carto.md
Python code test - CARTO

Build the following and make it run as fast as you possibly can using Python 3 (vanilla). The faster it runs, the more you will impress us!

Your code should:

All of that in the most efficient way you can come up with.

@javierprovecho
javierprovecho / iterm2-solarized.md
Created March 1, 2017 23:00 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Meslo powerline font + [Powerlevel9k] - (macOS)

Default

Default

Powerlevel9k

Powerlevel9k

Generating Authy passwords on other authenticators


There is an increasing count of applications which use Authy for two-factor authentication. However many users who aren't using Authy, have their own authenticator setup up already and do not wish to use two applications for generating passwords.

Since I use 1Password for all of my password storing/generating needs, I was looking for a solution to use Authy passwords on that. I couldn't find any completely working solutions, however I stumbled upon a gist by Brian Hartvigsen. His post had a neat code with it to generate QR codes (beware, through Google) for you to use on your favorite authenticator.

His method is to extract the secret keys using Authy's Google Chrome app via Developer Tools. If this was not possible, I guess people would be reverse engineering the Android app or something like that. But when I tried that code, nothing appeared on the screen. My gues

@javierprovecho
javierprovecho / install-imapsync.sh
Last active September 19, 2015 08:53 — forked from carlos22/install-imapsync.sh
Install imapsync on Ubuntu 14.04 (trusty)
#!/bin/bash
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install makepasswd rcs perl-doc libio-tee-perl git libmail-imapclient-perl libdigest-md5-file-perl libterm-readkey-perl libfile-copy-recursive-perl build-essential make automake libunicode-string-perl
cd $HOME
git clone git://github.com/imapsync/imapsync.git --depth 1
cd imapsync
sudo make install
@javierprovecho
javierprovecho / gist:0db63d94373f85c301e6
Last active August 29, 2015 14:26 — forked from yoya/gist:6aa1658155a337c8bf95
golang png image composition
package main
// http://blog.golang.org/go-image-package
// http://d.hatena.ne.jp/taknb2nch/20131231/1388500659
// https://blog.golang.org/go-imagedraw-package
import (
"flag"
"fmt"
"image"
"image/draw"
package main
import (
"fmt"
"math/rand"
"time"
)
var manos [][]int
var baraja []int