The Blog of Tom Webster

Chronic Ranter, Reviewer, and Developer. I speak only for myself, opinions are my own.

Movie Theater Popcorn

  2013-05-01 03:03:00 PDT

Aside from all the tech, I can cook occasionally. I get fixated on projects and absolutely must perfect them. I had previously posted this on Google+ and gotten a fair amount of praise for it, but I felt like this needed a more permanent home.

Full Disclosure: If you use the links on this page to buy the ingredients on Amazon, I will (hopefully) make a small bit of cash from it.

Tom's Popcorn Recipes

Movie Theater Popcorn

Ingredients:

1 Whirly-Pop Stovetop Popcorn Maker

¼ Teaspoon Box Flavicol Popcorn Seasoning Salt

1 Squirt Bottle of Yellow-Colored Coconut Oil

½ Cup of Yellow Corn Kernels

Directions:

Set Whirly pop on the stove (don't turn on heat just yet...)
Fill squirt bottle with coconut oil
It will most likely be solidified at this point, so just spoon it into the bottle
Microwave the squirt bottle for 25 seconds to liquify the oil
Put ½ cup of corn into popper
Add ¼ Teaspoon Flavicol Seasoning Salt to popper
Add 3 tablespoons of oil into the popper from the squirt bottle
Turn stove on medium heat, no more!
Continuously stir!
Do this for about 5-8 minutes until popping reaches a rapid pitch, then slows to about 1-2 pops per second
Remove popper from heat
Pour popcorn into large serving bowl
Using squirt bottle, add extra coconut oil to popcorn in bowl
This is what the movie theaters use for their butter topping, I like to give the corn a nice even coat.
For a more consistent experience, put half of the popcorn into the bowl, add extra oil, then add the rest of the popcorn, then add more oil.
Let the popcorn sit for about 3-4 minutes while oil soaks into the popcorn
Enjoy!

Protip: You don't need to clean out the popper each time you make movie theater popcorn, think of the popper kind of like a fryer, the extra bits add seasoning. You can leave it uncleaned as long as you are making a single recipe (don't mix caramel and movie theater without cleaning, for instance).

Fresh Caramel Corn

Ingredients:

1 Whirly-Pop Stovetop Popcorn Maker

½ Cup of Yellow Corn Kernels

6 tablespoons of Canola Oil

½ Cup of Glaze Pop Caramel Corn Popcorn Flavoring

Directions:

Set Whirly pop on the stove (don't turn on heat just yet...)
Put ½ cup of corn into popper
Put ½ cup of caramel corn flavoring into the popper
Put 6 tablespoons of canola oil into the popper
Turn stove on medium-low heat, no more!
Continuously stir!
Do this for about 5-8 minutes until popping reaches a rapid pitch, then slows to about 1-2 pops per second
Remove popper from heat
Pour popcorn into large serving bowl
You may have to shake and gyrate the serving bowl to keep popcorn from clumping
Enjoy!

Protip: No matter how much to shake the bowl, the caramel corn will always clump somewhat.

As always, you can send suggestions and improvements to me directly or in the comments.

Virtual Web Server: Part 4 - Apache Web Server

  2013-04-28 04:06:00 PDT

Now that you have a server, a domain name, and automatic security updates, we can finally start to host web pages.

The very first thing we need to do is set our DNS records for our host. Head over to Hover, click on your doamin, then click DNS. Now, head to Rackspace and get the IP address of your server. You'll need three records for your domain on Hover:

Host: @
Record: A
Detail: YOUR RACKSPACE IP HERE

Host: *
Record: A
Detail: YOUR RACKSPACE IP HERE

Host: www
Record: CNAME
Detail: example.com

Check out the screenshots below to look at my setup:

Next, lets get apache installed with apt-get install apache2. Once this is installed, we will need to disable the default hosting profile, as it will mess up our configuration later on. Do this with a2dissite default.

Ok, now we'll enable the re-write module with a2enmod rewrite. We're doing this because we want our naked domain example.com to point to www.example.com automatically. Believe it or not, example.com is an entirely different site than www.example.com. We'll set up a rewrite rule now to make that happen.

Use nano /var/www/.htaccess to get into a text editor. Here's how I've set up my re-write rule, just copy/paste and modify it to fit your site:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]

Next, lets make a directory for our website with mkdir /var/www/www.example.com. After that, go ahead and put in a test file in that directory: nano /var/www/www.example.com/index.html. Just put any text you want into it, its just a test site for now.

Now, we'll need to make an apache configuration file for our site, so Apache knows what to do with it. Use nano /etc/apache2/sites-available/www.example.com to start writing it up. Apache config files aren't terribly difficult, but here's a template I use for my sites. You will need to change the siteroot and sitename.example.com at the very least.

<VirtualHost *:80>
        ServerAdmin webmaster@email.com
        ServerName sitename.example.com

        DocumentRoot /var/www/siteroot
        <Directory />
                Options FollowSymLinks
                AllowOverride All
        </Directory>
        <Directory /var/www/siteroot>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride All
                Order allow,deny
                allow from all
        </Directory>

        <Directory "/usr/lib/cgi-bin">
                AllowOverride None
                Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all
        </Directory>

        ErrorLog ${APACHE_LOG_DIR}/error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        CustomLog ${APACHE_LOG_DIR}/access.log combined

    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>

</VirtualHost>

Next, we have to tell Apache that we want to enable our site. We can do this with a2ensite www.example.com. Next, we'll have to either restart or reload the server configuration, I'm just going to restart it with service apache2 restart. Next up, head over to your domain, you should see your site up and running!

As always, if you feel something could be better or fixed up, let me know.

Other posts in this series:

  1. Getting a Server
  2. Getting a Domain Name
  3. Automatic Updates
  4. Apache2 Setup - You are here
  5. PHP and MySQL Setup
  6. ProFTPd Setup
  7. WordPress Setup
  8. RVM Setup
  9. Git Setup
  10. OctoPress Setup
  11. Rackspace Backups

New Blog Pages

  2013-04-26 10:27:00 PDT

Just in case you weren't paying attention to the sidebar, I've added some great new content to my blog over the past few weeks.

In the mean time, I'll be continuing writing other posts and finding cool tricks and tips to share.

AD Unlocker: Unlock Active Directory User Batch Scripts

  2013-04-24 09:52:00 PDT

In a typical day at work, I run into a lot of locked user accounts, mostly because of mistyped passwords or misbehaving applications, and using ADUC (Active Directory Users and Computers) was getting to be a hassle. ADUC is a very powerful tool, but often it takes a long time to get started, and if the network conditions are less-than-ideal, you can run into major issues with lag and commands not completing. I needed a better way.

Scripting! The savior of us all. I decided to write two versions of this script, one that operates with PowerShell (and Active Directory module), and one that does not. The PowerShell version is much easier to use, as you only need your own admin account details and the other person's username. If you use the PowerShell-less version, you will need the full User Distinguished Name, which most of us don't have laying around. Use whichever you feel most comfortable with, and if you think they can be improved, please, be my guest.

Here are the two files:

AD Unlocker - No PowerShell Needed

@echo off

REM ABOUT: This file will unlock a user account that you specify the DN of.
REM REQUIREMENTS: Active Directory Account with Unlock permissions; DN of user you would like to unlock.

SET /P ADDomain=Your domain name:
SET /P AdminUser=Your admin username:
SET /P UserDN=Full User DN you would like unlocked:

echo "This file will unlock a user who's DN you specify."

runas /noprofile /user:%ADDomain%\%AdminUser% "dsmod user \"%UserDN%\" -disabled no"
pause

AD Unlocker - Easier to Use

@echo off

REM ABOUT: This file will unlock a user account that you specify on the command line.
REM REQUIREMENTS: Powershell with ActiveDirectory Module; Active Directory Account with Unlock permissions.

echo "This file will unlock a user who's username (sAMAccountName) you specify."

SET /P ADDomain=Your domain name:
SET /P AdminUser=Your admin username:
SET /P UserToUnlock=Username you would like unlocked:

runas /noprofile /user:%ADDomain%\%AdminUser% "%windir%\system32\WindowsPowerShell\v1.0\powershell.exe -command import-module ActiveDirectory; Unlock-ADAccount -Identity %UserToUnlock%"

pause

Virtual Web Server: Part 3 - Automatic Updates in Debian

  2013-04-23 17:33:00 PDT

The next thing you should do is enable automatic security updates. No sense in having your server get hacked because you were too busy to update it. Luckily, in most systems, this is pretty easy.

First, install unattended-upgrades like this: apt-get install unattended-upgrades Then configure your settings with nano /etc/apt/apt.conf.d/50unattended-upgrades. Depending on the system, I usually only enable automatic security updates, but on development systems, its nice to have everything update as well. Debian Stable doesn't change all that much, but there's always the risk of breaking things. The configuration file below only has security updates enabled.

APT::Periodic::Enable "1";
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::AutocleanInterval "7";
APT::Periodic::Unattended-Upgrade "1";

// Automatically upgrade packages from these (origin, archive) pairs
Unattended-Upgrade::Allowed-Origins {
        "${distro_id} stable";
        "${distro_id} ${distro_codename}-security";
//      "${distro_id} ${distro_codename}-updates";
//      "${distro_id} ${distro_codename}-proposed-updates";
};

// List of packages to not update
Unattended-Upgrade::Package-Blacklist {
//      "vim";
//      "libc6";
//      "libc6-dev";
//      "libc6-i686";
};

// Send email to this address for problems or packages upgrades
// If empty or unset then no email is sent, make sure that you
// have a working mail setup on your system. The package 'mailx'
// must be installed or anything that provides /usr/bin/mail.
//Unattended-Upgrade::Mail "root@localhost";

// Do automatic removal of new unused dependencies after the upgrade
// (equivalent to apt-get autoremove)
//Unattended-Upgrade::Remove-Unused-Dependencies "false";

// Automatically reboot *WITHOUT CONFIRMATION* if a
// the file /var/run/reboot-required is found after the upgrade
//Unattended-Upgrade::Automatic-Reboot "false";


// Use apt bandwidth limit feature, this example limits the download
// speed to 70kb/sec
//Acquire::http::Dl-Limit "70";

Go ahead and run apt-get update and apt-get upgrade to bring your system completely up to date as of this moment. So far, we've just done some system maintainence tasks, nothing really fun, don't have much to show for our work, until next time. In the next article, I'll walk you through Apache configuration and we'll get to hosting real websites.

Other posts in this series:

  1. Getting a Server
  2. Getting a Domain Name
  3. Automatic Updates - You are here
  4. Apache2 Setup
  5. PHP and MySQL Setup
  6. ProFTPd Setup
  7. WordPress Setup
  8. RVM Setup
  9. Git Setup
  10. OctoPress Setup
  11. Rackspace Backups
Page: 14 of 31