Skip to content

Instantly share code, notes, and snippets.

@maxrice
Created May 23, 2012 18:32
Star You must be signed in to star a gist
Embed
What would you like to do?
US State Names & Abbreviations as PHP Arrays
<?php
/* From https://www.usps.com/send/official-abbreviations.htm */
$us_state_abbrevs_names = array(
'AL'=>'ALABAMA',
'AK'=>'ALASKA',
'AS'=>'AMERICAN SAMOA',
'AZ'=>'ARIZONA',
'AR'=>'ARKANSAS',
'CA'=>'CALIFORNIA',
'CO'=>'COLORADO',
'CT'=>'CONNECTICUT',
'DE'=>'DELAWARE',
'DC'=>'DISTRICT OF COLUMBIA',
'FM'=>'FEDERATED STATES OF MICRONESIA',
'FL'=>'FLORIDA',
'GA'=>'GEORGIA',
'GU'=>'GUAM GU',
'HI'=>'HAWAII',
'ID'=>'IDAHO',
'IL'=>'ILLINOIS',
'IN'=>'INDIANA',
'IA'=>'IOWA',
'KS'=>'KANSAS',
'KY'=>'KENTUCKY',
'LA'=>'LOUISIANA',
'ME'=>'MAINE',
'MH'=>'MARSHALL ISLANDS',
'MD'=>'MARYLAND',
'MA'=>'MASSACHUSETTS',
'MI'=>'MICHIGAN',
'MN'=>'MINNESOTA',
'MS'=>'MISSISSIPPI',
'MO'=>'MISSOURI',
'MT'=>'MONTANA',
'NE'=>'NEBRASKA',
'NV'=>'NEVADA',
'NH'=>'NEW HAMPSHIRE',
'NJ'=>'NEW JERSEY',
'NM'=>'NEW MEXICO',
'NY'=>'NEW YORK',
'NC'=>'NORTH CAROLINA',
'ND'=>'NORTH DAKOTA',
'MP'=>'NORTHERN MARIANA ISLANDS',
'OH'=>'OHIO',
'OK'=>'OKLAHOMA',
'OR'=>'OREGON',
'PW'=>'PALAU',
'PA'=>'PENNSYLVANIA',
'PR'=>'PUERTO RICO',
'RI'=>'RHODE ISLAND',
'SC'=>'SOUTH CAROLINA',
'SD'=>'SOUTH DAKOTA',
'TN'=>'TENNESSEE',
'TX'=>'TEXAS',
'UT'=>'UTAH',
'VT'=>'VERMONT',
'VI'=>'VIRGIN ISLANDS',
'VA'=>'VIRGINIA',
'WA'=>'WASHINGTON',
'WV'=>'WEST VIRGINIA',
'WI'=>'WISCONSIN',
'WY'=>'WYOMING',
'AE'=>'ARMED FORCES AFRICA \ CANADA \ EUROPE \ MIDDLE EAST',
'AA'=>'ARMED FORCES AMERICA (EXCEPT CANADA)',
'AP'=>'ARMED FORCES PACIFIC'
);
?>
@ianrodrigues
Copy link

This is a code launch an EC2 instance in AWS for each state on the list. Might be very useful.

locals {
  states = {
    "Alabama" = "AL"
    "Alaska" = "AK"
    "Arizona" = "AZ"
    "Arkansas" = "AR"
    "California" = "CA"
    "Colorado" = "CO"
    "Connecticut" = "CT"
    "Delaware" = "DE"
    "Florida" = "FL"
    "Georgia" = "GA"
    "Hawaii" = "HI"
    "Idaho" = "ID"
    "Illinois" = "IL"
    "Indiana" = "IN"
    "Iowa" = "IA"
    "Kansas" = "KS"
    "Kentucky" = "KY"
    "Louisiana" = "LA"
    "Maine" = "ME"
    "Maryland" = "MD"
    "Massachusetts" = "MA"
    "Michigan" = "MI"
    "Minnesota" = "MN"
    "Mississippi" = "MS"
    "Missouri" = "MO"
    "Montana" = "MT"
    "Nebraska" = "NE"
    "Nevada" = "NV"
    "New Hampshire" = "NH"
    "New Jersey" = "NJ"
    "New Mexico" = "NM"
    "New York" = "NY"
    "North Carolina" = "NC"
    "North Dakota" = "ND"
    "Ohio" = "OH"
    "Oklahoma" = "OK"
    "Oregon" = "OR"
    "Pennsylvania" = "PA"
    "Rhode Island" = "RI"
    "South Carolina" = "SC"
    "South Dakota" = "SD"
    "Tennessee" = "TN"
    "Texas" = "TX"
    "Utah" = "UT"
    "Vermont" = "VT"
    "Virginia" = "VA"
    "Washington" = "WA"
    "West Virginia" = "WV"
    "Wisconsin" = "WI"
    "Wyoming" = "WY"
  }
}

resource "aws_instance" "states_instance" {
  count = length(local.states)

  instance_type = "t2.micro"
  ami           = "ami-0c55b159cbfafe1f0"

  tags = {
    Name = keys(local.states)[count.index]
    Abbr = values(local.states)[count.index]
  }
}

@whoami15
Copy link

whoami15 commented Feb 5, 2023

  1. Whisk 2 large eggs, 2 tablespoons milk and a pinch of kosher salt in a medium bowl until very well combined.

  2. Meanwhile, preheat a small nonstick skillet over medium-high heat. Once the skillet warm, add 1 tablespoon of butter, then swirl the pan to distribute the butter as it melts. Once the butter stops sizzling and the foam subsides, add the eggs. Pause to the let the eggs heat slightly. Stir vigorously with a heat-proof rubber spatula, making sure to include the sides of the egg mixture so it cooks evenly.

  3. Once the omelet is almost set but still custardy, hold the skillet at a 45-degree angle to the stove and carefully fold the omelet like a business letter. The underside should not have any browning on it. Transfer to a warm plate serve with a pinch of salt and freshly chopped fine herbs, such as parsley, chives, chervil and/or tarragon.

@bluffdigital
Copy link

$states = ['Alaska', 'Alabama', 'Arkansas', 'Arizona', 'California', 'Colorado', 'Connecticut', 'Delaware', 'Florida', 'Georgia', 'Hawaii', 'Idaho', 'Illinois', 'Indiana', 'Iowa', 'Kentucky', 'Louisiana', 'Maine', 'Maryland', 'Massachusetts', 'Michigan', 'Minnesota', 'Mississippi', 'Missouri', 'Montana', 'Nebraska', 'Nevada', 'New Hampshire', 'New Jersey', 'New Mexico', 'New York', 'North Carolina', 'North Dakota', 'Ohio', 'Oklahoma', 'Oregon', 'Pennsylvania', 'Rhode Island', 'South Carolina', 'South Dakota', 'Tennessee', 'Texas', 'Utah', 'Vermont', 'Virginia', 'Washington', 'West Virginia', 'Wisconsin', 'Wyoming']

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment