Skip to content

Instantly share code, notes, and snippets.

locals {
prefix = "bastion"
}
resource "azurerm_resource_group" "main" {
name = "${local.prefix}-resources"
location = var.azure_location
}
resource "azurerm_virtual_network" "main" {
location ~ ^/users/([^/]+)$ {
proxy_cache static-cache;
proxy_cache_key "$scheme$host$request_uri$http_accept";
proxy_cache_valid 200 1h;
proxy_cache_valid 410 7d;
proxy_cache_valid 404 30m;
proxy_cache_use_stale error timeout updating http_404 http_500 http_502 http_503 http_504;
# proxy_cache_bypass $http_x_purge; # you may not want this to mitigate potential attacks
add_header X-Cache-Status $upstream_cache_status;
fn get_profile_or_default(aws_profile: Option<Profile>) -> Profile {
match aws_profile {
Some(p) => p.clone(),
None => "default".to_string() as Profile,
}
}
fn has_credential_process_or_sso(
context: &Context,
aws_profile: &Option<Profile>,
Visited 377116 accounts, removed 15535 (DRY RUN)
The following domains were not available during the check:
tootplanet.space
spooky.pizza
rich.gop
a.weirder.earth
mastodon.blue
anti.energy
mammouth.cafe
@offbyone
offbyone / amazon.md
Created August 23, 2020 17:33 — forked from terabyte/amazon.md
Amazon's Build System

Prologue

I wrote this answer on stackexchange, here: https://stackoverflow.com/posts/12597919/

It was wrongly deleted for containing "proprietary information" years later. I think that's bullshit so I am posting it here. Come at me.

The Question

Amazon is a SOA system with 100s of services (or so says Amazon Chief Technology Officer Werner Vogels). How do they handle build and release?

@offbyone
offbyone / key.md
Last active May 13, 2020 22:13
Twitter (un)official Consumer Key

Twitter Official Consumer Key

Test

Twitter for Android

type:            PIN
Consumer key:    3nVuSoBZnx6U4vzUxf5w
Consumer secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys

Twitter for iPhone

type: PIN

diff --git a/paramiko/__init__.py b/paramiko/__init__.py
index 4d80bf2..5429cfd 100644
--- a/paramiko/__init__.py
+++ b/paramiko/__init__.py
@@ -21,15 +21,22 @@ import sys
from paramiko._version import __version__, __version_info__
from paramiko.transport import SecurityOptions, Transport
from paramiko.client import (
- SSHClient, MissingHostKeyPolicy, AutoAddPolicy, RejectPolicy,
+ SSHClient,
offby1@void:~% brew tap 13:24 offby1@void
caskroom/cask
homebrew/boneyard
homebrew/command-not-found
homebrew/core
homebrew/dev-tools
homebrew/dupes
homebrew/fuse
homebrew/php
homebrew/versions
#!/usr/bin/env python3
import sys
import json
total = err = 0
for line_no, line in enumerate(sys.stdin):
try:
d = eval(line.rstrip())
except Exception as e:
sys.stderr.write("Line {} was malformed: {}\n".format(line_no, e))
"""Goals:
1. Easy matcher definitions from methods, without the class plumbing.
>>> from hamcrest.decorators import matcher
>>> @matcher()
... def checks_out(item):
... return item.checks_out()
...
>>> assert_that(value, checks_out())