Skip to content

Instantly share code, notes, and snippets.

View richardsonlima's full-sized avatar
:octocat:
Focusing

Richardson Lima richardsonlima

:octocat:
Focusing
View GitHub Profile
@richardsonlima
richardsonlima / virsh_cheat.rst
Created October 1, 2021 11:54 — forked from amitsaha/virsh_cheat.rst
Virsh cheat sheet

Domain Management

  • List domains: #virsh list --all
  • Undefine domains: #virst undefine <domain-name>

Volume Management

  • List all volumes in pool 'default': #virsh vol-list default
@richardsonlima
richardsonlima / installVM.sh
Created October 1, 2021 11:01 — forked from rkamradt/installVM.sh
Create VM for ubuntu 20.04
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 rkamradt@192.168.122.95 # use ip address from previous step
@richardsonlima
richardsonlima / kvm-with-ubuntu-cloud-image.log
Created October 1, 2021 02:45 — forked from vitali2y/kvm-with-ubuntu-cloud-image.log
Creating, running, and destroying a Ubuntu 16.04 minimal cloud image KVM under Linux Mint 18.3
... in steps below:
@richardsonlima
richardsonlima / QEMU_ON_M1.md
Created October 1, 2021 02:37 — forked from citruz/QEMU_ON_M1.md
Create Ubuntu and Windows VMs with QEMU on Apple Silicon

Running Linux and Windows on M1 with QEMU

30.11.2020: Updated with the new patchseries and instructions for Windows

02.12.2020: Added tweaks

08.12.2020: Updated with patchseries v4

31.01.2020: Updated with patchseries v6

@richardsonlima
richardsonlima / dockercompose-gitlabce-full-orig.yml
Last active September 16, 2021 21:52
Gitlab CE Docker Compose - Web 15 Sep 2021
version: '3'
# See https://docs.docker.com/compose/overview/ for more information.
# If you make changes to this file or any related files, apply them by
# navigating to the directory that holds this file and run this as root:
# docker-compose down; docker-compose up -d
# Create a network for our containers.
networks:
frontend:
@richardsonlima
richardsonlima / osx-for-pentesting.sh
Created July 7, 2021 01:58 — forked from gabemarshall/osx-for-pentesting.sh
A fork of osx-for-hackers for my personal pentesting setup preferences
# 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
@richardsonlima
richardsonlima / start_vpn.expect
Created June 3, 2021 20:37 — forked from alecthegeek/start_vpn.expect
Start the CISCO VPN client from the command line
#!/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
@richardsonlima
richardsonlima / mitchellh_cli.go
Created May 26, 2021 22:20 — forked from cynipe/mitchellh_cli.go
Golang CLI Example
package main
import (
"os"
"fmt"
"github.com/mitchellh/cli"
)
func main() {
@richardsonlima
richardsonlima / rw_ro_access.sql
Created May 12, 2021 15:39 — forked from checco/rw_ro_access.sql
How to create a read only user in AWS RDS PostgreSQL and a user with superuser privileges on AWS RDS PostgreSQL
--
-- 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;
@richardsonlima
richardsonlima / main.tf
Created May 10, 2021 20:32
Terraform - s3 demo
resource "aws_s3_bucket" "b" {
bucket = "private-tf-test-bucket-013"
acl = "private"
tags = {
Name = "private bucket"
Environment = "Dev"
}
}