• Skip to main content

Uly.me

cloud engineer

  • Home
  • About
  • Search

Archives for September 2020

GCP Create Internal IP Reservation

September 29, 2020

Here’s how to create an internal IP reservation in GCP.

gcloud compute addresses create my-private-ip-reservation \
--addresses 10.128.0.15 \
--region us-central1 \
--subnet default \
--project project-id

gcloud compute addresses create my-private-ip-reservation \ --addresses 10.128.0.15 \ --region us-central1 \ --subnet default \ --project project-id

To list your reserved IPs.

gcloud compute addresses list \
--project project-id

gcloud compute addresses list \ --project project-id

Filed Under: Cloud Tagged With: addresses, compute, create, gcloud, gcp, ip address, list, reserve

Logitech K811 Page Up and Down

September 23, 2020

I’ve been using this keyboard for a few years, but never knew how to use page and page down. It’s …

fn + up arrow = page up
fn + down arrow = page down

fn + up arrow = page up fn + down arrow = page down

Filed Under: Misc Tagged With: down, fn, function, k811, logitech, page, up

GCP List Instances with Service Account

September 23, 2020

Here’s how to list GCP instances with a specific service account.

gcloud compute instances list \
--project your-project-id \
--format="value(name,serviceAccounts[].email)" \
--filter="serviceAccounts.email=your-service-account@email.com AND name~\bwp"

gcloud compute instances list \ --project your-project-id \ --format="value(name,serviceAccounts[].email)" \ --filter="serviceAccounts.email=your-service-account@email.com AND name~\bwp"

I’m using filters to look for a specific service account, and any instance starting with ‘wp.’ \b means begins with.

Filed Under: Cloud Tagged With: gcp, instances, list, serviceaccount

GCP Listing Reservations

September 21, 2020

Here’s how to list reservations in GCP.

gcloud compute reservations list --project project-id

gcloud compute reservations list --project project-id

Specify a zone.

gcloud compute reservations list \
--filter="zone:('us-central1-a')" \
--project project-id

gcloud compute reservations list \ --filter="zone:('us-central1-a')" \ --project project-id

Filed Under: Cloud Tagged With: filter, gcp, list, project, reservations, zone

Dos2unix

September 18, 2020

In Windows a new line, is a CR (carriage return) followed by LF (line feed). In Linux, it’s just LF. If you bring over a text file from Windows to Linux, sometimes you’ll end up with a file with a bunch of ^M at the end of each line, which will breaks a lot of things. To fix, just run dos2unix.

dos2unix file.txt

dos2unix file.txt

Filed Under: Linux Tagged With: carriage return, convert, cr, dos2unix, lf, line feed

  • Go to page 1
  • Go to page 2
  • Go to page 3
  • Go to Next Page »
  • Home
  • About
  • Search

Copyright © 2023