I hereby claim:
- I am ev0rtex on github.
- I am darkwing (https://keybase.io/darkwing) on keybase.
- I have a public key whose fingerprint is 7EEB 9106 942E CD46 0C5C 15C0 66BA AD06 E6A9 850A
To claim this, I am signing this object:
esphome: | |
name: salt-level-sensor | |
esp8266: | |
board: d1_mini | |
# Enable logging | |
logger: | |
# Enable Home Assistant API |
#!/bin/bash | |
echo "Getting list of Availability Zones" | |
all_regions=$(aws ec2 describe-regions --output text --query 'Regions[*].[RegionName]' | sort) | |
all_az=() | |
while read -r region; do | |
az_per_region=$(aws ec2 describe-availability-zones --region $region --query 'AvailabilityZones[*].[ZoneName]' --output text | sort) | |
while read -r az; do |
#!/usr/bin/env python3 | |
import sys | |
import operator | |
from decimal import Decimal | |
def main(): | |
ops = { | |
"+": operator.add, | |
"-": operator.sub, |
#!/usr/bin/env python3 | |
DIAGONAL_WATER = True | |
def dfs_from(arr, i, j): | |
size = 0 | |
if i >= 0 and j >= 0 and i < len(arr) and j < len(arr) and arr[i][j] == 0: | |
arr[i][j] = -1 # Mark visited | |
size += 1 | |
size += dfs_from(arr, i, j + 1) # right | |
size += dfs_from(arr, i + 1, j) # down |
I hereby claim:
To claim this, I am signing this object:
esversions: | |
1.5.1: | |
zip: "https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.5.1.zip" | |
tar: "https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.5.1.tar.gz" | |
deb: "https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.5.1.deb" | |
rpm: "https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.5.1.noarch.rpm" | |
apt: "http://packages.elasticsearch.org/elasticsearch/1.5/debian" | |
yum: "http://packages.elasticsearch.org/elasticsearch/1.5/centos" | |
plugins: | |
elasticsearch/elasticsearch-analysis-icu: 2.5.0 |
# Get version information | |
{% set versions = salt['pillar.get']('versions', { | |
"libsodium": "1.0.2" | |
}, True) %} | |
# Fetch libsodium tar and hash | |
{% do salt['cp.get_url']( | |
"https://download.libsodium.org/libsodium/releases/libsodium-" ~ versions.libsodium ~ ".tar.gz", | |
"/tmp/libsodium.tar.gz" | |
) %} |
##OAuth2 Flow
Definitions:
Resource Owner: A
User
with access to a desired resource Client: Entity (3rd party) desiring access to a resource held by theResource Owner
Authorization Server: OAuth2 API server capable of granting access to resources Resource Server: The server with the desired resource(s) for which access is desired
function vagrant-cd() { | |
VMS=() | |
OLD=$IFS | |
IFS=$'\r\n' | |
for line in $(vagrant global-status | egrep "^[a-z0-9]{7}\s" -); do | |
VMS+=($line) | |
done | |
IFS=$OLD | |
if [[ -z "$1" ]]; then |
from fabric.api import env, run, sudo, prompt, hide, warn_only, quiet | |
from fabric.contrib import files | |
from getpass import getpass | |
import os | |
import re | |
def login(user=None, passwd=None): | |
uname = user if user is not None else prompt("Remote username: ", default=env.user) | |
pword = passwd if passwd is not None else getpass("Remote password: ") |