Skip to content

Instantly share code, notes, and snippets.

abc = '0123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghjkmnopqrstuvwxyz'
def to_b58(div):
ret = ''
while div != 0:
div, mod = divmod(div, len(abc))
ret += abc[mod]
return ret[::-1]
def from_b58(num):
@sergkondr
sergkondr / ansible-summary.md
Created March 23, 2018 09:02 — forked from andreicristianpetcu/ansible-summary.md
This is an ANSIBLE Cheat Sheet from Jon Warbrick

An Ansible summary

Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)

Configuration file

intro_configuration.html

First one found from of

# -*- mode: ruby -*-
# vi: set ft=ruby :
os = "ubuntu/bionic64"
domain = "my.lab"
additional_disk = false
hosts = {
"server01" => "192.168.33.10",
# "server02" => "192.168.33.11",
import paramiko
import time
import warnings
warnings.filterwarnings(action='ignore', module='.*paramiko.*')
class ParamikoWraper:
def __init__(self, host, user, password, port=22):
self.client = paramiko.SSHClient()
self.client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
history | awk '{CMD[$2]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "% " a;}' | grep -v "./" | grep -v "#" | sort -nr | nl | column -c3 -s " " -t | head -10
package main
import (
"flag"
"fmt"
"math/rand"
"time"
)
var (

Keybase proof

I hereby claim:

  • I am sergkondr on github.
  • I am sergkondr (https://keybase.io/sergkondr) on keybase.
  • I have a public key ASCfzW4zo37kO7hBGCfjI6xr-N5S9OKGIpzqCtsVYTTjJAo

To claim this, I am signing this object:

#########################################################
# Get Public IP of EC2-instances by tag:
aws ec2 describe-instances \
--profile=XXX \
--region=eu-west-1 \
--output=table \
--filter Name=tag:Name,Values=XXX \
--query 'Reservations[].Instances[].[PublicIpAddress]'
frets = 24
_notes = ["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"] * int(frets/12 + 1)
def get_chord(n):
current = _notes
if n.find("m") == -1:
key = "maj"
else:
#!/bin/bash
VERSION=$1
DOWNLOAD_FILE=/tmp/terraform.zip
if [[ $# -ne 1 ]]; then
echo "update_terraform 0.12.24"
exit 1
fi