Sean Reiser

Hi I'm Seán Reiser, this is my Personal Blog

#NewYorker #DrupalDeveloper #InfoSec #Photographer #GEEK #Whovian #MYSTie #LetsGoYankees #LongSufferingJetsFan #NAKnight #Quinquagenarian #CommitAwesome

Hack

I’ve commented on this blog about the trend recruiters have where they ask for the last 4 digits of a candidate’s SSN in their first contact email (Along with name, dob, location and other PII).  I thought I’d consolidate my thoughts on a post.

Let me explain the format of a SSN:

The first 3 digits are tied to the state where the applicant applied for their SSN.  Since most people in the US are born, live and die within a 50 mile radius this becomes guessable.

The next 2 are a group number and can be tied to the year the applicant applied for their SSN.  States only issue from a few group numbers a year.  Most Americans are issued their SSN in the first couple of years of their life.   Where a recruiter doesn’t know a candidate’s age / year of birth, it can estimated  from info on a candidate’s resume (graduation year or when the candidate entered the workforce).

The last 4 are assigned in sequence while isn’t really derivable from a candidate’s information.

So for a large portion of candidates, someone can whittle SSNs down to 1-100 possible options.  You can see when I am concerned that this could be a fishing attack.  Someone I don’t know asking for information that can lead to identity theft.  Also the thought that you’re submitting the info via email which is insecure by design which adds another vector for possible theft..

I understand that firms are using Candidate Tracking Systems where the last 4 digits of a SSN are used to ensure candidates don’t get double submitted, but there are risks involved that I think many people are unaware of.

Image
I'm confused, why does Puerto Rico have it's own Olympic Team?
Image

Simple Pork Ratatouille

*no animated rodents were harmed in the production of this recipe.

Anne and I have been blessed with a lot of zucchini out of the garden this summer.  We have sliced it grilled it, roasted it, spiralized and sautéed it.  Anne made some kick ass zucchini fritters.  I wanted to do something different so I've been playing with a one pot ratatouille.  This was a third attempt.

If you don't know, ratatouille is really just a summer stew.  It can be served hot or cold.  Sometimes it's served in very ornate platters with uniformly sliced vegetables by a rodent, mine is diced in a light broth, and served warm / hot like traditional stews. No rats in my kitchen.

It's still a bit of a work in progress, but some friends asked for a copy of the recipe and it's far enough along that I'm comfortable sharing it.  There may be changes in the future. 

Some notes
  • Eggplant is common in ratatouille and usually the main ingredient, however I seem to be developing an allergy to it (itchy throat, etc) so I cut it out of my diet.  Add it if you want.
  • I was adapting from a recipe that called for 1/2 cup of white wine.  I often substitute chicken stock for white wine.  My quinquagenarian eyes saw 2 cups so I used that.  It made a nice, light broth, especially when I added the tomato paste. We liked so that's what I've been using ever since.  But if there is too much broth for you, scale it back.
  •  I know the meat to veggie ratio is off (in favor of the veggies).  That's intentional  We like having left over veggies when I make dishes like this for a quick lunch or side dish.  I'd estimate 4-6 pork chops depending  on if you're serving a starch with the meal.
  • It's a stew and to me a big part of stew is to use veggies is what we have too much of, or what's on the edge of spoiling.  That's how the corn got in there, we had two ears that were "use it or lose it".
  • Anne has a large, deep skillet that I used for this.  A stock pot or dutch oven would also work well.  (Anne's pan won out because it would fit well in the dishwasher).
Ingredients 
  • 3 slices pork loin
  • salt, to taste
  • pepper, to taste
  • 4 tablespoons olive oil, separated
  • 1 clove garlic, minced
  • 2 large zucchini, diced
  • 1 yellow onion, diced
  • 3 tomatoes, diced
  • 1/2 cauliflower
  • 1 red bell pepper, diced
  • 1 yellow bell pepper, diced
  • 1 green bell pepper, diced
  • corn from 2 cobs, removed
  • 2 cups chicken stock
  • 4oz tomato paste
  • 1/2 teaspoon salt
  • 1/2 teaspoon pepper
  • Rosemary
  • Thyme
Steps
  1. Season the pork chops on both sides to taste with rosemary, thyme, salt and pepper.
  2. Pour olive oil into pan, then fry pork chops on both sides until cooked through. Set aside.
  3. Add olive oil and garlic. Stir until fragrant.
  4. Combine zucchini, onion, tomato, cauliflower, corn and bell peppers.
  5. Add chicken stock, tomato paste, salt, and pepper. Bring to a boil. Simmer 20 minutes.
  6. Add the pork chops on the top of the vegetable mixture. Cook for 10 minutes, flip the chops 1/2 through.
  7. Experiment, Be Bold, Share, Enjoy and  Commit Awesome!

I’ve been upset by the evolution of outdoor dining first a table on the street, then a tarp over it. Followed by 3 plywood walls and a tarp. Next we have plywood buildings w/ windows (some glass, some plexiglass), a door, heating and a/c.

Now we’re building multilevel structures with rooftop alfresco dining. I wonder if they’ll be an elevator for ADA compliance.

This is not outdoor dining.

Edit:  I'm sure these "buildings' are being built by bus boys and fry cooks and predict someone will die when one of these things collapse in the next year.

Image

Really folks, talk to your Doctor about getting vaccinated.

As a libertarian,I believe that you have a right not to take any vaccine.

As a libertarian, I believe you are responsible for your own actions and if you choose not to take a free-to-you vaccine, you understand that society has no responsiblity to take care of you if you get ill. This is not punishment nor cruel, we can't allow the hospitals to become overcrrowed again and jeopardize the care of patients with other conditions due to your stupodity.

(Of couuse this doesn't apply to folka who can't take a vaccine for medical reasons).

 

This site has a linkblog and I thought I'd do a quick writeup on how I capture the links and their metadata.  You'll notice the the links are displayed in cards, similar to what you see on social media sites such as Facebook and Twitter.

This writeup will cover:

  1. The conten type to store a link and its metadata,
  2. Creating a bookmarklet so you can easily add a story to your site as you surf the web.
  3. Scraping metadata on a webpage to get the image, site name, title and description.

This writeup assumes that you have some basic understanding of Drupal on a site builder level.  I'm assuming you understand basic administration tasks such as creating content types, and fields as well as how to create a module,.  

Although I wrote the code for Drupal 9, as I review it, I see no reason that it won't work for Drupal 8.   Since support is ending for Drupal 8, you should be upgrading to Drupal 9, but that's a different matter.

Creating The Content Type

You'll need a content type to house the links.  On this site I'm using my generic note type which I use for most of my blog posts (this allows me to add a link to any post).  But I assume you want to use a separate content type, let's create a content type named link.  In addition to the standard title and body fields you want to give it the following fields::

Label

Field Name

Field Type

Link

field_link

Link

OG Link Description

field_og_link_description

Text (plain, long)

OG Link Image Url

field_og_link_image_url

Text (plain, long)

OG Link Site Name

field_og_link_site_name

Text (plain)

OG Link Title

field_og_link_title

Text (plain)

OG Link URL

field_og_link_url

Text (plain, long

HTTP Status Code

field_http_status_code

Text (plain, long)

 

Of course you can just add these fields to an existing content type as I did, you'll just need to adjust the code as you go forward.

Building the Bookmarklet

Simply put, a bookmarklet is a browser bookmark that contains JavaScript.  We're going to create one that will open a node add form with the url of the current page already prepopulated into the link field.  This saves you the effort of copying the current URL, opening your site, navigating to the node add form and pasting in the url of the page you want to blog.  There are 2 things we need ti do to make this work:

First we'll  get Drupal to accept a parameter on the node add form's URL and prepopulate the link field.  We either need to create a new module or use a module that you already use for glue code and use hook_form_alter.


This code basically says, "when loading the node add page for the link content type, look to see if there is a 'link' query string, and if there is, put the contents of the query string into field_link."

Next we need to get the query string into the URL .... that's where the bookmarket comes into play.  Here's a little javascript


You need to replace "example.com" with your site's URL.  Just add a bookmark in your browser, call it something like "Add Link To My Site" and paste the javascript in as the link.  Add the bookmark to the favorites bar and when you're on a page that you want to blog about, click on the button, add any commentary in the body field and rock and roll.

There is a contributed module, Prepopulate which accomplishes the sane thing (and more) but is a little more overhead than the couple of lines of code I wrote here.  Plus, if we use contrib for the easy things, we'll never learn anything.

Fetching Metadata

Next we need to fetch the image url, site name, title and description.   You can either scrape the content for metadata server side at save or client side at when rendering the page.  I prefer doing it at save since doing it  doing it at client side will slow down page loads.  Of course, since you're caching the information, if the site changes any of the metadata, your site will be out of date.

Instead of writing code to parse out the metadata, I took advantage of opengraph.php, a library that does the heavy lifting,  Very simply, I used hook_ENTITY_TYPE_presave to populate the appropriate fields.  You can put this in the same module from above:


This loads the open graph library, loads the page info a variable and pass the page to the library to find the  metadata and then add it to the node before it's saved.

 

Job recruiters are asking for the last 4 digits of your SSN as an identifier.  This concens me, because the first 5 are easily guessable with your location and year of birth (which can be inferred from other info on your resume).  

Am I thie only Doctor Who  fan who finds it funny that Richard Branson Took off from Truth or Consequences, NM?  #BransonIsAZygon