http://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html https://www.youtube.com/watch?v=_wiGpBQGCjU
Discover gists
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: localhost | |
connection: local | |
name: IMPORTING SECURITY KEYS | |
vars: | |
my_key_list: | |
- https://rpmfusion.org/keys?action=AttachFile&do=get&target=RPM-GPG-KEY-rpmfusion-free-fedora-2020 | |
- https://rpmfusion.org/keys?action=AttachFile&do=get&target=RPM-GPG-KEY-rpmfusion-nonfree-fedora-2020 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html | |
$dlurl = "https://awscli.amazonaws.com/AWSCLIV2.msi" | |
$installerPath = Join-Path $env:TEMP (Split-Path $dlurl -Leaf) | |
$ProgressPreference = 'SilentlyContinue' | |
Invoke-WebRequest $dlurl -OutFile $installerPath | |
Start-Process -FilePath msiexec -Args "/i $installerPath /passive" -Verb RunAs -Wait | |
Remove-Item $installerPath | |
$env:Path += ";C:\Program Files\Amazon\AWSCLIV2" |
Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.
- Follow standard conventions.
- Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
- Boy scout rule. Leave the campground cleaner than you found it.
- Always find root cause. Always look for the root cause of a problem.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
''' | |
NameMash by superkojiman | |
Generate a list of possible usernames from a person's first and last name. | |
https://blog.techorganic.com/2011/07/17/creating-a-user-name-list-for-brute-force-attacks/ | |
''' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Composable | |
fun BottomSheet( | |
isShown: Boolean, | |
modifier: Modifier = Modifier, | |
onDismissRequest: () -> Unit = {}, | |
shape: Shape = BottomSheetDefaults.ExpandedShape, | |
sheetGesturesEnabled: Boolean = true, | |
dismissOnBack: Boolean = sheetGesturesEnabled, | |
windowInsets: WindowInsets = WindowInsets(0), // This is a nice default if the app is edge to edge | |
content: @Composable ColumnScope.() -> Unit, |
Did you just check out / clone a repository and forget --recursive / --recurse-submodules? Well, do this:
git submodule update --init --recursive --remote
For information about why this nugget was lost and burried in another stack exchange article, see this: https://meta.stackoverflow.com/questions/400424/how-can-i-request-that-a-question-merge-be-reversed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Author: Casper Pedersen (github.com/casperghst42) | |
# License: GPL2 | |
wget https://cloud.debian.org/images/cloud/bookworm/latest/debian-12-generic-amd64.qcow2 | |
virt-customize -a debian-12-generic-amd64.qcow2 --install qemu-guest-agent --install resolvconf --install systemd-resolved --update --run-command 'mkdir -p /etc/network/interfaces.d' --run-command 'echo "auto ens18" >> /etc/network/interfaces.d/ens18' --run-command 'echo "iface ens18 inet manual" >> /etc/network/interfaces.d/ens18' | |
qm create 100000 --name "debian12-cloudinit-template" --memory 2048 --net0 virtio,bridge=vmbr0 | |
qm importdisk 100000 debian-12-generic-amd64.qcow2 local-lvm -format qcow2 |
NewerOlder