Friss élesztő és szárított élesztő összehasonlítása

A legegyszerűbben a következő formulával hasonlíthatjuk össze a friss élesztőt és a szárított élesztőt:

1 g szárított élesztő 3 g friss élszetőnek felel meg.

Ha nincs eléggé érzékeny mérlegünk, 1 teáskanál ( 3 g ) szárított élesztő 9 g friss élesztőnek felel meg.

extra characters at the end of n command

When you use sed to insert a template file into another file with the command

# $1 String to insert
# $2 File to insert to
# $3 String to insert after
sed  "/$3/a\\
$1\\
" $2 > tmp && mv tmp $2	

and get the error message

extra characters at the end of n command

Make sure the template file supplied in $1 does not have an empty line at the top.

Test Chef cookbooks with Docker containers

Kitchen Dokken is a provisioner to test cookbooks in Docker containers. It is very fast and efficient compared to cloud instances like AWS EC2s, Vagrant boxes, or VMWare virtual machines.

Currently, you can only test Linux cookbooks with Kitchen Dokken.

To generate a cookbook with the dokken provisioner use the –kitchen option

chef generate cookbook MY_COOKBOOK_NAME --kitchen dokken

The Kitchen Dokken GitHub repository contains more information at https://github.com/test-kitchen/kitchen-dokken

Sample kitchen.yml file with kitchen dokken provisioner at https://github.com/chef-cookbooks/sudo/blob/master/kitchen.dokken.yml

Webinar links at https://www.chef.io/webinars

Silence unknown callers

The new iPhone operating system includes a feature to send all unwanted calls directly to the voicemail. This eliminates the daily car warranty spam calls. If someone calls you from a number that is in your contact list, in your recent outgoing call list, or in a Siri suggestion, the call rings your phone, otherwise it is immediately forwarded to the voicemail. If it was an important call, the caller can leave a message and you can call them back.

To configure your iPhone

  • open Settings
  • select Phone
  • select Silence Unknown Callers
  • slide the switch on the page to show green background

Simultaneous screen sharing in Zoom

Zoom supports simultaneous screen sharing by multiple participants. It is ideal for remote meetings, design sessions, and pair programming. To enable it, configure your Zoom client to use multiple monitors.

  • Open the Zoom preferences
  • On the general tab check Use dual monitors
  • During the meeting in the Share Screen icon select Multiple participants can share simultaneously

Is the Chef aws_s3_file resource idempotent?

Yes, it is idempotent. It means, when the target file on the local drive matches the source file in the S3 bucket, Chef Client does not download the file. In the past aws_s3_file was not idempotent, but now behind the scenes it calls remote_file which compares the files and skips the download when the files match.

     * aws_s3_file[/var/myfile.deb] action create
       * remote_file[/var/myfile.deb] action create (skipped due to not_if)

Chef FATAL: IndexError: string not matched

Chef attributes are “Mash” type.

From the Ruby Doc: “Mash allows you to create pseudo-objects that have method-like accessors for hash keys.” Mash is inherited from Hash.

Attributes can hold any data type, but we need to make sure the type does not change as we create more attributes.

In this example we change the type of the attribute from string to Mash, and Chef throws the error:

FATAL: IndexError: string not matched

# ['level1'] is a string type and contains the string 'value1'
default['level1'] = 'value1'

# The type of ['level1'] changed to a Mash and contains the nested Mash ['name2'] 
default['level1']['name2'] = 'value2'

The solution is, keep the number of levels the same

# ['level1'] is a Mash type and contains the nested Mash ['name1']
default['level1']['name1'] = 'value1'

# ['level1'] is till a Mash type and contains the nested Mash ['name2'] 
default['level1']['name2'] = 'value2'

Get a refund for DMV vehicle registration renewal late payment penalty

If you have never received the vehicle registration renewal notice from the DMV and you have to pay a penalty

aws: command not found

When we want to execute AWS CLI commands to create tags, add AWS keys on AWS instances with the AWS Chef cookbook, first, we need to install the AWS CLI.

On Linux the following lines complete the installation

  bash "install_aws_cli" do
    code <<-EOF
      curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
      unzip -o awscliv2.zip
      # Install AWS CLI and create a symbolic link to it at /usr/bin, otherwise the rest of the AWS CLI calls fail.
      sudo ./aws/install -b /usr/bin --update
    EOF
    not_if 'which aws'
  end

Make sure you use the -b /usr/bin option to instruct the installer to create a symbolic link at /usr/bin

The Amazon recommended -b /usr/local/bin location only works on Amazon Linux and Ubuntu. On CentOS 7 and Red Hat 7 (RHEL7) we get the error message when the aws cookbook is executed

aws: command not found

Change or reset the user password if you cannot logon

I have found an interesting article by Raymond on how to reset the password of your Windows computer even if you cannot log in.

Change Or Reset User Password If You Cannot Logon

For the last method, you will need a bootable USB drive to start your computer. See my article Install Windows 10 from a USB drive on how to create the bootable USB media.

Another suggestion using the bootable media is at I cannot login after Windows 10 update, says “password is incorrect”