Chili Garlic Tofu with Broccoli

Ingredients

  • 2 14 oz packages of extra firm tofu
  • 2 TB olive oil
  • Salt & pepper, to taste
  • 4 garlic cloves, minced
  • 1 lb. broccoli florets
  • 2 TB Sambal Olek or chili paste
  • 4 TB honey
  • 1 TB low sodium soy sauce
  • 4 sheets roasted seaweed
  • 1 TB sesame seeds
  • 1.5 cups basmati rice

Directions

  1. Blot tofu with paper towels while pressing down slightly to release water. Slice into 1/2 inch thick pieces and blot again with paper towels.
  2. Sauce: In a small bowl whisk together 2 TB Samba Olek, 4 TB honey, and 1 TB soy sauce, set aside.
  3. Cut seaweed sheets into thin strips to use as a garnish, set aside.
  4. Basmati Rice: Rinse the basmati rice in cold water to remove excess starch. Combine rice with 2 1/4 cups water, 1 TB olive oil and a pinch of salt in a medium sized pot. Stir once and bring to a boil over high heat. Cover, reduce heat to low and simmer for 10 minutes. Remove pan from heat and leave covered for 5 minutes. Remove lid and fluff with fork before serving.
  5. Place broccoli florets in a microwavable bowl with 1/4 cup water. Cover and microwave 4 minutes.
  6. Heat 2 TB olive oil in a large non-stick skillet over medium heat. Add the 4 cloves smashed garlic and sauté for 1-2 minutes. Place slices of tofu in pan and sear over medium heat, about 5 minutes per side. Do not fiddle with tofu, let it develop a crust so it does not stick to pan.
  7. Remove tofu from pan to a serving plate. Transfer steamed broccoli to the skillet and toss to coat in the garlic infused oil. Sprinkle with the sesame seeds, toss to combine and cook for 1 minute. Transfer to serving plates.
  8. Drizzle tofu with the chili sauce from Step 2 and garnish with seaweed stands.

Vegetarian Beef Tips and Asparagus Stir Fry

Ingredients

  • 2 bags Gardein Be’f Tips1
  • 1 1/4 cup soy sauce
  • 4 tablespoons vegetable oil
  • 3 cloves garlic, minced
  • 1 tablespoon ginger, minced
  • 1 teaspoon brown sugar
  • 1/2 red onion, chopped
  • 1 red bell pepper, chopped
  • approx 1 1/2 lbs of asparagus cut into 2 inch pieces
  • 2 tablespoons balsamic vinegar
  • 1 cup chicken broth
  • 2 teaspoons cornstarch
  • 4 cups cooked rice

Directions

  1. In a small bowl, combine soy sauce, and brown sugar and set aside
  2. Heat a skillet to medium-high and cook the beef tips in 2 tablespoons of oil. Put them in frozen and stir them every few minutes. Cook about 8 – 10 minutes until they are browned and then put them in a bowl and cover.
  3. In the same skillet, heat the remaining 2 tablespoons of oil. Once hot add the garlic and ginger and stir. Immediately add the onion and turn the heat to medium. Cook until onions are soft.
  4. Add asparagus and cook about 8 minutes
  5. Add the peppers and cook about 5 minutes
  6. Add the sauce and cook about 3 minutes
  7. In a separate bowl, combine vinegar, broth, and cornstarch. Dissolve cornstarch. Add to skillet. Bring to a boil. Reduce heat and simmer for 2 – 3 minutes
  8. Serve over rice

How to set up a locally hosted git server and create new repositories

You may have code and configurations that are required to stay on premise. As a result, you will need to setup your own git server and create and manage repositories locally. Following is an overview of how to set that up.

We will leave aside server setup, configuration, and networking and assume that we have a machine on which we will host the repos, git-server, and machines that will clone, pull, and push updates, clients.

Setting up the git-server

On the git-server add git-shell to the list of valid shells.

echo $(which git-shell) >> /etc/shells

Add a git user with a specific shell and setup the directory in which all of the repos will be stored.

useradd --shell $(which git-shell) --home-dir /home/git git
mkdir -p /home/git/.ssh
chown -R git: /home/git/.ssh
touch /home/git/.ssh/authorized_keys
chown -R git: /home/git/.ssh
chmod 600 /home/git/.ssh/authorized_keys
chmod 700 /home/git/.ssh
mkdir -p /var/lib/git_repo
chown git: /var/lib/git_repo
chmod 700 /var/lib/git_repo

Adding a new user

To add a new user that can commit to and pull repos via ssh concatenate their public ssh key to /home/git/.ssh/authorized_keys.

Creating a new repository

As root on the git-server

export GIT_REPO=<new-repo-name>.git
sudo -u git mkdir /var/lib/git_repo/$GIT_REPO
cd /var/lib/git_repo/$GIT_REPO && sudo -u git git init --bare

As an authorized git user on the client machine

mkdir example && cd example
git init
echo "# README" >> README.md
git add README.md
git commit -m 'Initial commit'
git remote add origin git@hpdl01:/var/lib/git_repo/<new-repo-name>.git
git push origin master

Now you can clone with

git clone git@hpdl01:/var/lib/git_repo/example.git

Setting up software RAID on Debian with mdadm

Software RAID has come a long way. Unless you have some very high-rate, high-volume, I/O workloads with SLAs that will otherwise cost you money, for the most part a software RAID will perform just fine. One of the primary benefits of using software RAID is the portability of your disks/data. If a box on which you have a software RAID dies somehow and at least some (depending on your RAID configuration) of drives survive, you can easily resurrect the RAID on another machine without having a duplicate RAID card on hand.

Following is an example of how to setup a RAID 1 array using mdadm on Debian. I have two 2TB drives, /dev/sdb and /dev/sdc.

Install mdadm

apt-get install mdadm

Create the array

mdadm --create --verbose /dev/md0 --level=1 --raid-devices=2 /dev/sdb /dev/sdc

Once you create the RAID device, you can check on the mirroring process (Not sure what it is syncing with a blank disk…)

# cat /proc/mdstat
Personalities : [raid1]
md0 : active raid1 sdc[1] sdb[0]
1953382464 blocks super 1.2 [2/2] [UU]
[>....................] resync = 1.0% (20516736/1953382464) finish=190.1min speed=169401K/sec
bitmap: 15/15 pages [60KB], 65536KB chunk

Create a filesystem

mkfs.xfs /dev/md0

Create a mount point and mount the filesystem

mkdir /data
mount /dev/md0 /data

Ensure that the array is reassembled on boot by adding it to /etc/mdadm/mdadm.conf. We do this by scanning the active array and appending it’s details to the config file.

mdadm --detail --scan /dev/md0 >> /etc/mdadm/mdadm.conf

Upate the initramfs so that the array will be available on boot

update-initramfs -u

Add an entry to /etc/fstab

/dev/md0 /data               xfs     defaults,nofail,discard  0 0

Do a test reboot and make sure that it is mounted and the data accessible.

Enable and disable delivery to additional email addresses for sent and received messages with a Google Workspace account

I have a Google Workspace account for my domain and sometimes it is useful to have messages sent from or sent too other addresses in my domain also delivered to my address.

To set it up, login to your Google Admin console, then in the left-hand navigation click on Google Workspace, and then Gmail.

Look for Routing and click on it to enter the routing configurations.

You can then add, modify, delete, enable, or disable routing rules for different organizational units in your domain.

[SOLVED] debsig-verify for Failed verification error, “signatures using the SHA1 algorithm are rejected” and “Can’t check signature: Invalid digest algorithm”

If you are using debsig-verify for the verification of a downloaded .deb file and are unable to verify it, run it with the -d option to get more information. If you see the following two lines

gpg: Note: signatures using the SHA1 algorithm are rejected
gpg: Can't check signature: Invalid digest algorithm

It is likely that the PGP signature used to sign the package uses the SHA1 algorithm which has been deprecated in most of the recent Linux distros. If you can generate another PGP key with a different algorithm. If you are a consumer of this deb package and cannot get the maintainer to update their public key you can add a gpg configuration that will enable gpg to use the PGP signature

echo "allow-weak-digest-algos" >> /etc/gnupg/gpg.conf

And then retry with debsig-verify.