Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.
You've got two main options:
| #!/usr/bin/env python3 | |
| """ | |
| AWS Identity Collector: Extract Trust and Privilege Data Across Accounts | |
| This script collects identity and access metadata from one or more AWS accounts, | |
| including IAM roles, IAM users, SSO (AWS IAM Identity Center) users, and their policies. | |
| It’s used as a precursor for analyzing trust relationships and admin-equivalent access | |
| across AWS environments. |
| #!/usr/bin/env -S bash -c "docker run -p 8080:8080 -it --rm \$(docker build --progress plain -f \$0 . 2>&1 | tee /dev/stderr | grep -oP 'sha256:[0-9a-f]*')" | |
| # syntax = docker/dockerfile:1.4.0 | |
| FROM node:20 | |
| WORKDIR /root | |
| RUN npm install sqlite3 |
| import requests | |
| from requests.adapters import HTTPAdapter, Retry | |
| def get_vscode_extensions(max_page=10000, page_size=100, | |
| include_versions=True, include_files=True, include_category_and_tags=True, include_shared_accounts=True, include_version_properties=True, | |
| exclude_non_validated=False, include_installation_targets=True, include_asset_uri=True, include_statistics=True, | |
| include_latest_version_only=False, unpublished=False, include_name_conflict_info=True, api_version='7.2-preview.1', session=None): | |
| if not session: | |
| session = requests.session() |
| // I'm tired of extensions that automatically: | |
| // - show welcome pages / walkthroughs | |
| // - show release notes | |
| // - send telemetry | |
| // - recommend things | |
| // | |
| // This disables all of that stuff. | |
| // If you have more config, leave a comment so I can add it!! | |
| { |
You can inherit the environment variables from PID 1 by iterating over the list of null-terminated strings
in /proc/1/environ, parsing the first characters up to the first = as the variable name, setting the
remaining value as that variable, and exporting it.
The Code Snippet
This works with multiline environment variables, and environment variables with arbitrary values, like
strings, including = or JSON blobs.
Paste this in your current terminal session to inherit the environment variables from PID 1:
| import openai | |
| import boto3 | |
| import json | |
| import time | |
| from typing import Dict, List | |
| openai.api_key = '### SET YOUR OPENAPI API KEY HERE ###' | |
| session = boto3.session.Session() | |
| client = session.client('iam') |
| #!/usr/bin/env python3 | |
| import os | |
| import sys | |
| import click | |
| import subprocess | |
| import tempfile | |
| import itertools as IT | |
| import select | |
| from time import sleep |
| # Gist of the Day: Turbo Intruder Cluster Bomb with SmartFiltering | |
| # Author: Evan Custodio (@defparam) | |
| # | |
| # MIT License | |
| # Copyright 2021 Evan Custodio | |
| # | |
| # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
| # | |
| # The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
| # |
This guide was adapted from https://gist.github.com/niw/e4313b9c14e968764a52375da41b4278#running-ubuntu-server-for-arm64