- List domains: #virsh list --all
- Undefine domains: #virst undefine <domain-name>
- List all volumes in pool 'default': #virsh vol-list default
| virt-install --name vm1 --ram=8192 --disk size=10 --vcpus 1 --os-type linux --os-variant ubuntu20.04 --graphics none --location 'http://archive.ubuntu.com/ubuntu/dists/focal/main/installer-amd64/' --extra-args "console=tty0 console=ttyS0,115200n8" | |
| # When prompted, use the vm name for the host name, and be sure to add openssh when asked for software to pre-install | |
| # otherwise take defaults or most reasonable options. Follow install instructions till reboot, then ^] | |
| virsh domifaddr vm1 # get ip address | |
| ssh-copy-id [email protected] # use ip address from previous step |
| ... in steps below: |
| # OSX for Pentesting (Mavericks/Yosemite) | |
| # | |
| # A fork of OSX for Hackers (Original Source: https://gist.github.com/brandonb927/3195465) | |
| #!/bin/sh | |
| # Ask for the administrator password upfront | |
| echo "Have you read through the script prior to running this? (y or n)" | |
| read bcareful |
| #!/usr/bin/env expect -f | |
| # Start the CISCO VPN client on a Mac. Adapted from | |
| # https://blog.felipe-alfaro.com/2014/05/23/automating-cisco-anyconnect-secure-mobility-client-on-mac-os-x/ | |
| set HOSTNAME vpn.server.com | |
| set USER_NAME user.name | |
| set PASSWORD password | |
| spawn /opt/cisco/anyconnect/bin/vpn |
| package main | |
| import ( | |
| "os" | |
| "fmt" | |
| "github.com/mitchellh/cli" | |
| ) | |
| func main() { |
| -- | |
| -- Read only | |
| -- | |
| -- Create a group | |
| CREATE ROLE postgres_ro_group; | |
| -- Grant access to existing tables | |
| GRANT USAGE ON SCHEMA public TO postgres_ro_group; | |
| GRANT SELECT ON ALL TABLES IN SCHEMA public TO postgres_ro_group; |
| package main | |
| import ( | |
| "fmt" | |
| "log" | |
| "os" | |
| meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" | |
| "k8s.io/client-go/kubernetes" | |
| "k8s.io/client-go/tools/clientcmd" |
| # ~/.config/starship.toml | |
| [battery] | |
| full_symbol = "🔋" | |
| charging_symbol = "🔌" | |
| discharging_symbol = "⚡" | |
| [[battery.display]] | |
| threshold = 30 | |
| style = "bold red" |