Pop!_OS WiFi
popOS wifi
Tips worth saving • A collection of thoughts and tutorials
popOS wifi
Solves an issue where gopls hung in vim on Ubuntu and CentOS Vim hung with this a bottom of vim window: <pre>vim-go: initializing gopls</pre> ensure yo...
Create CSRF Crumb and save to Environment Variable $CRUMB <pre>CRUMB=$(wget -q --auth-no-challenge --user JenkinsAdmin --password $PASSWORD --output-docum...
In terraform the ECS version can be specified.<br> Using platform_version 1.3.0 uses Docker for your containers.<br> Using platform_version 1.4.0 uses containe...
<pre>kubectl delete pods -n development kubectl get pods -n development | grep Running | awk '{print $1}'</pre> ...
<a href="https://aws.amazon.com/blogs/devops/passing-parameters-to-cloudformation-stacks-with-the-aws-cli-and-powershell/">https://aws.amazon.com/blogs/devops/...
<pre> Ignore Certificate Issues >add-type @" using System.Net; using System.Security.Cryptography.X509Certificates; public class TrustAllCertsPolic...
<pre>python -m smtpd -n -c DebuggingServer localhost:8025</pre> ...
<pre> !/bin/sh source venv/bin/activate flask db upgrade exec gunicorn -b :5000 --access-logfile - --error-logfile - microblog:app </pre> Note the __exec__...
<pre> wget https://s3.amazonaws.com/amazoncloudwatch-agent/amazon_linux/amd64/latest/amazon-cloudwatch-agent.rpm sudo rpm -U ./amazon-cloudwatch-agent.rpm sudo ...
<a href="https://aws.amazon.com/blogs/infrastructure-and-automation/multiple-account-multiple-region-aws-cloudformation/">https://aws.amazon.com/blogs/infrastr...
To launch some stacks, you need the AWS account ID for each account. If you don’t know the account IDs, you can get them from the AWS CLI by using the sts ge...
Spotify Prefs file location on Ubuntu <pre>/home/<USER>/snap/spotify/current/.config/spotify/prefs</pre> Set app.window.position.saved value to f...
Use AWS CLI to setup virtual MFA device token <pre>aws iam create-virtual-mfa-device --virtual-mfa-device-name {username} outfile /home/{username}/QRCod...
Run the <a href="https://docs.aws.amazon.com/cli/latest/reference/sts/get-session-token.html" target="_blank" rel="noreferrer noopener">sts get-session-to...
We used this to enable sending keystrokes to a Java-based installer in Windows <pre> [void] [System.Reflection.Assembly]::LoadWithPartialName("System.Draw...
<pre> aws ec2 create-launch-template --launch-template-name my-template-for-auto-scaling --version-description version1 --launch-template-data file://co...
<pre> gem install tzinfo -v "~> 1.2" gem install tzinfo-data </pre> ...
<pre> { "Version": "2012-10-17","Statement": [ { "Sid": "", "Effect": "Allow","Action": [ "ecr:CreateReposit...
Home key sends the cursor to start of line, Shift-END selects to end of line from cursor <pre>{HOME} then +{End}</pre> ...
Create S3 bucket in AWS CLI with LocationConstraint <pre> aws s3api create-bucket --bucket my-bucket --region us-west-2 --create-bucket-configurat...
<pre>ip_address=(Get-WmiObject -Class Win32_NetworkAdapterConfiguration -Filter 'IPEnabled=True').IPAddress</pre> ...
<pre> !/bin/bash -xe exec > >(tee /var/log/user-data.log| logger -t user-data -s 2>/dev/console) 2>&1 yum -y update echo "...
<pre> if([string]::IsNullOrEmpty($VERSION)){ Write-Host "No NSM Version Found" $installType='new install' } </pre> <pre> $VERSION -notmatch "\S" > $null...
<pre> Get-CimInstance win32_product | Select-Object Name, PackageName, InstallDate | Out-GridView </pre> look in both locations for installed software <pre> ...
This was the help on dpkg errors when running yum updates in Windows WSL Ubuntu <pre> Options to Fix sub-process /usr/bin/dpkg returned an error code (1) s...
List S3 buckets with AWS CLI and get Canonical ID <pre>aws s3api list-buckets --query Owner.ID --output text</pre> ...
In a secure Windows environment, create a SecureString to authenticate between Windows computers <pre> $adminName = 'admin-username' $pw = 'St00p1dP@ssw0r...
Make top return results for only one process <pre> top -p $(pgrep -d, "(events|sshd)") </pre> ...
<pre> !/bin/bash rsyslogd -N1 retCode=$? if [ "$retCode" -eq 0 ] then echo ryslogd succeeded with return code: "$retCode" else echo rsyslo...
Dockerfile: <pre> FROM alpine:latest RUN apk upgrade RUN apk add nginx COPY files/default.conf /etc/nginx/conf.d/default.conf RUN mkdir -p /var/www/html W...
<pre> $pipeline_names = $("pipeline1", "pipeline2")$environment_name = 'test_environment'$branch = 'master' </pre> <pre> cd C:\\repo\directory foreach ($pipeli...
<pre> aws s3api list-object-versions --bucket ${bucket_name} --prefix ${bucket_path}/${object_name} | jq ".Versions[].VersionId" </pre> ...
This will prompt for vault password <pre> ansible-vault decrypt oo-encrypted.txt --output=/dev/stderr > /dev/null </pre> ...
Add ppa repo for ansible install on ubuntu <pre> sudo apt update sudo apt install software-properties-common sudo apt-add-repository --yes --update ppa:ans...
Encrypt string for use in ansible vault <pre> echo -n ${pwdstring} | ansible-vault encrypt_string --vault-password-file ${pwdFile} --stdin-name Application...
use apg to create passwords on the CLI <pre> alias mkpsswd='apg -s -a 1 -m 32 -n 4' </pre> apg command line help <pre> apg [-a algorithm] [-M m...
Before you decide to define a new class, there are a few things to keep in mind, and questions you should ask yourself: <ul> <li><strong>Figure out your data...
<ul> <li>Continuous <strong>Delivery</strong> does <strong>not</strong> mean every commit is deployed to <strong>production</strong> after passing automated te...
<strong>Continuous Integration</strong> <ul> <li>Developers <strong>regularly</strong> merge code changes into a central repository <ul> <li>this <strong>tri...
<strong>AWS Secrets Manager</strong> <strong>Troubleshoot Cross-Account Secret Sharing</strong> <ul> <li>When Sharing credentials cross-account <ul> <li>cr...
<strong>AWS Lambda Monitoring</strong> <ul> <li>Lambda does not provide a built-in metric for memory usage</li> <li>you can set up a CloudWatch metric filter...
<strong>AWS Solution to migrate data from relational database to DynamoDB</strong> <ul> <li>use Amazon DMS to migrate data to a DynamoDB table</li> <li>creat...
<strong>Amazon CloudSearch vs ElasticSearch</strong> <ul> <li><strong>CloudSearch</strong> is a <strong>managed</strong> service <ul> <li><strong>no</strong>...
<strong>Using CodePipeline Build and Deploy .Net Application</strong> <ul> <li>To build a .Net application from source, use an <strong>MSBuild</strong> Windo...
<strong>CloudFormation Template Errors</strong> <ul> <li>Invalid Value or Unsupported Resource Property <ul> <li>EITHER Parameter naming mistake</li> <li>OR ...
<strong>AWS Config</strong> <ul> <li><strong>Error</strong>: "We are unable to complete the request at this time. Please contact AWS Support." <ul> <li>eithe...
<strong>Kinesis Data Stream</strong> <ul> <li>A Kinesis data stream is set of shards. Each shard is a sequence of data records. <ul> <li>each data record in ...
<ul> <li>A producer is an application that writes data to Amazon Kinesis Data Streams</li> <li>An Amazon Kinesis Data Streams producer is an application that p...
<strong>Reuseable Templates</strong> <ul> <li><strong>Nested Stacks</strong> and <strong>Cross-Stack References </strong>can be used to modularize stack temp...
<strong>Introduction</strong> <ul> <li>Cloud computing takes advantage of virtualization to enabled on-demand provisioning of compute, network and storage</l...
<strong>User Interfaces</strong> <ul> <li>User Interfaces for microservices are typically Javascript</li> <li>Javascript can be chatty and cause latency</li>...
<ul> <li>Microservices need a way to synchronize their data and roll back state, where possible.</li> <li>AWS Step functions allow implementation of a Saga Exe...
<ul> <li>Each microservice should have its own data persistence layer</li> <li>distributed microservice architectures trade <strong>consistency</strong> for <s...
<ul> <li>Provides application level networking</li> <li>allows service intercommunication across multiple types of infrastructure</li> <li>standardizes how ser...
application developers don't need to modify code to make their applications function in a service mesh ...
<ul> <li><strong>data plane</strong> is a set of intelligent proxies</li> <li>deployed with the application code</li> <li>as a special <strong>sidecar</strong>...
<strong>Service Meshes</strong> <ul> <li>microservice applications can be made up of <strong>thousands</strong> of services</li> <li>most <strong>complex</st...
You’ll find this post in your _posts directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different way...
I'm a terrible conversationalist, I lose track of my train of thought in the middle of talking, especially when I start to feel passionate about a subject, and...
I have a BA in French Literature, and spent a couple years in grad school working on a Master's degree in that subject. I loved interpretation of lit, finding ...
Miserable can mean physical poverty, to the point of hunger and despair. It can also mean emotional unhappiness totally unrelated to your physical state. Mi...
Nobody should expect to be paid for their passion, but your greatest satisfaction, your greatest benefit to your community is where you can actually contribute...
See the opposition there, in my title? I may be volatile, too, a little emotional, but the emotions don't show like some other folks. That's why I fit in with e...
So, suddenly, I'm "in a manager role". Trying to figure out what that means, or even what I'm supposed to do in that role. It hasn't been announced to anybody y...
Got yet another phone interview scheduled, it's a lousy way to find new employees, so hard to communicate. I feel sorry for the candidate, half the time we brin...
Spent a couple hours trying to update my wife's 3gs, couldn't get one playlist to synch to the phone. Was a new Michael Buble album, not new to the world, 2007,...
One of those days at work, lots of meetings, some "drive-by" conversations. Not really satisfying, but tiring. I miss the opportunity to do real thinking, plann...
Interesting that Amazon now sells short books, some under a hundred pages. I wonder if that's a good thing? Is there something special about the 300 to 500 page...
<pre> To get a list of all listening TCP ports with lsof type: sudo lsof -nP -iTCP -sTCP:LISTEN Copy The options used are as follows: -n - Do not convert por...
you can squash multiple commits on a local branch into a single commit using the git rebase command with the -i or --interactive option. <h3>Steps:</h3> First...
Ubuntu install only security updates <pre> apt-get install -y --only-upgrade $( apt-get --just-print upgrade | awk 'tolower($4) ~ /.security./ || tolower(...
Loop over many users with paginate <pre> self.iam_client = self.session.client("iam") paginator = self.iam_client.get_paginator('list_users') fo...
Terraform module aws_lb_listener_rule oidc the module accepts a variable called lb_listener_rules which is a list of objects containing the rule name, typ...
Jenkinsfile using AWS assumed role to deploy a docker container <pre> stage('Deploy - Prod') { when { branch 'main' ...
Swap elements in a list of any size assign length variable with the current list's length for convenience for loop runs through body length // 2 tim...
Bubble Sort a List of Numbers Check adjacent elements and swap them if right element < left element <pre> my_list = [8, 10, 6, 2, 4] list to sort swap...
Run yum update against specific Patch Group Tag <pre> PATCH_GROUP=development aws ssm send-command --document-name "eXp-YumUpdateSecurityOnly" --document-ve...
CodeBuild buildspec.yaml example <pre> version: 0.2 phases: pre_build: commands: - echo Logging in to Amazon ECR... - aws --version ...
list cidrs for VPC's accross accounts <pre> for acct in acct1 acct2 acct3 acct4 acct5 acct6; do aws ec2 describe-vpcs --profile ${acct} --region us-east-1 |...
UserData install Docker/systemctl config <pre> !/bin/bash -xe exec > >(tee /var/log/user-data.log|logger -t user-data -s 2>/dev/console) 2>&1 echo "...
Symlink logfile writes to stdout and stderr <pre> ln -sf /dev/stdout /var/log/nginx/access.log \ && ln -sf /dev/stderr /var/log/nginx/error.log </pre> <pre...
<pre> import json import boto3 environment = "dev" instance_list = ["i-05e7e29b0d2d2a58c"] region_name="us-west-2" def lambda_handler(event, context): ses...
Format Specification Mini-Language <pre> The general form of a standard format specifier is: format_spec ::= [[fill]align][sign][][0][width][grouping...
<pre> for page in page_iterator['Contents']: if page['LastModified'] <= utc.localize(datetime.datetime.now()) - datetime.timedelta(days=1): print('Ob...
Format Specification Mini-Language python import json import boto3 from boto3.session import Session acct_ids = { "qa": "123456789", "productio...
sample jenkinsfile to run script from git repo groovy pipeline { parameters { string defaultValue: '1234567890', name: 'account-number' }...
write secret to stdout <pre> openssl rand -base64 20 | docker secret create my_secret_data - </pre> write secret to file <pre> openssl rand -base64 20 >...
run shared libraries from github https://github.com/darinpope/github-api-global-lib/blob/main/vars/helloWorld.groovy <pre> @Library("shared-library") _ pi...
<pre> https://stackoverflow.com/questions/43354059/catching-boto3-clienterror-subclass If you're using the client you can catch the exceptions like this: imp...
delete aws backup recovery points, so you can delete the vault <pre> !/bin/bash set -e echo "Enter the name of the vault where all backups should be de...
get info about domains/websites <pre> There are hundreds of tools relevant to security assessments, network reconnaissance, vulnerability scanning, and pene...
PASSWORD CRACKERS Although there are some Windows tools, including the infamous Cain and L0phtcrack (l0phtcrack.com) tools, most password crackers run...
<pre>aws ec2 describe-images --owner amazon --image-id $(aws ec2 describe-instances --instance-ids i-05e7e29b0d2d2a58c --query "Reservations[0].Instances[0].Im...
ansible playbook to replace text in config file yaml --- - hosts: labservers become: yes handlers: - name: restart apache service: name="...
Use a variable in a playbook {% raw %} yaml --- - hosts: localhost vars: inv_file: /home/ansible/vars/inv.txt tasks: - name: file: pa...
Run Boom against localhost passing a custom header <b> 30 concurrent requests, total requests of 3000 <pre> boom http://localhost/ --header Host:test-webs...
reset mysql root password <pre> 1. Stop Service 2. mysqld_safe --skip-grant-tables & mysql UPDATE mysql.user SET Password=PASSWORD('the-pw') WHERE U...
Create Self-Signed SSL Certificate for Nginx <pre> mkdir /etc/nginx/ssl openssl req -x509 -nodes -days 365 -newkey rsa:2048 \ -keyout /etc/nginx/ssl...
Updating SELinux Permissions for Nginx <b>ngx_modsecurity_module.so: failed to map segment from shared object: Permission Denied</b> <p>After installing a ...
Open a second file within same window <pre> -ESC- :e $filename </pre> Switch __back__ to previous buffer ('file') <pre> -ESC- :bn </pre> ...
Backup jobs directories with subdirectories but not builds directories <pre> tar zcvf jenkins-backup-jobs.tar.gz --exclude "builds" /var/tmp/jenkins/jobs/...
Git's HEAD pointer For me, the key to understanding how git works came when I grasped that the HEAD notation is similar to a window that can slide over a se...
Get Size of S3 Buckets with Boto3 https://www.slsmk.com/getting-the-size-of-an-s3-bucket-using-boto3-for-aws/ <pre> import boto3 import datetime now = dat...
Send 'Host' header to localhost with a custom value <pre> curl --header "Host: example.com localhost" </pre> ...
AWS Patch Management with SSM <pre> Use Patch Manager to patch different SSM-supported OSes. Create a patch baseline and see how it can help maintain and...
Create VPC <pre>aws ec2 create-vpc --cidr-block $VPC_CIDR --tag-specifications 'ResourceType=vpc,Tags=[{Key="Name",Value="TOOLS_VPC"}]'</pre> Create ...
this was causing an error 'cannot add EventListener of null', until I moved the script tag in index.html to after the element I was listening for <pre> doc...
Take json response for 'apps' and combine it with json response for 'branches' Makes dictionary of app names, each with a list of app branches in a li...
allow bucket owner to read objects written by other accounts <pre> How to know if your disk is EXT4, XFS, etc? Remember, in Linux, everything is a ...
allow bucket owner to read objects written by other accounts <pre> s3client = session.client('s3') s3client.put_object(Key=iam_username, ...
list load balancer attributes for each LoadBalancerArn <pre> for i in $( aws elbv2 describe-load-balancers --region ${aws_region} --profile ${profile_name}...
Python Method Resolution Order When dealing with class inheritance, it can be tricky to understand which objects are inherited in which order. Using <cla...
Enable Default encryption for new EBS volumes, run once per account <pre> aws ec2 enable-ebs-encryption-by-default --region us-east-1 { "EbsEncryptionBy...
use openssl to create a pem file to ssh into an aws instance <pre>ssh-keygen -t rsa -b 4096 -m PEM -f vm_base mv vm_base vm_base.pem</pre> ...
Using SSM: Amazon Linux2 <pre> aws ssm get-parameters --names /aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-gp2 --region us-east-2 </pr...
<pre> Rename all .html to .markdown for f in .html; do mv -- "$f" "${f%.html}.markdown" done </pre> <br> <pre>-- marks the end of the option list.</p...
AWS Control Tower sets up a number of required rules in each account’s Config service to protect the integrity of the configuration checks and logs. Adding an...
1. install Xcode 2. install Xcode commandline tools 3. git clone https://github.com/aws/aws-elastic-beanstalk-cli-setup.git 4. ./aws-elastic-beanstalk-cli-setu...
Using python3.8 with AWS SAM to create a lambda from a script that runs without error before applying changes for SAM. Using pathlib to check if a path exists ...
<pre>aws ec2 run-instances \ --image-id $(aws ssm get-parameters \ --names /aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-gp2 \ ...
<h4>Terraform weaknesses that can be helped with Terragrunt:</h4> <strong>the lack of Terraform module dependencies:</strong> it is not possible t...
you can define your backend configuration just once in the root terragrunt.hcl file <pre> stage/terragrunt.hcl remote_state { backend = "s3"...
troubleshoot error: <pre>UPGRADE FAILED: another operation (install/upgrade/rollback) is in progress</pre> (the release that was in progress didn't show wh...
Researching how to Automate a Java-based installer in Windows <strong>extract .msi from .exe</strong> https://www.codetwo.com/kb/msi-from-exe/ https://...