Support NASA – The Plan

Anyone who knows me and has ever been around when the topic of space has come up knows that I’m a little obsessed with space and NASA. I know I’m not the only one. So once this idea stuck in my head, it’s stuck.

The Problem

The NASA Administrator is authorized by 42 U.S.C. 2473(b) to accept unconditional gifts or donations of services, money and property. However they are not allowed to solicit donations. Because of that, until now, the best way to donate to NASA has been through here.

That is inconvenient and we are sure deters many people from sending in checks or money orders.

The Plan

An simple organization whose sole purpose is to collect those monies and donate them to NASA. (I may have an accountant to help me set this up.)

A simple landing page (SupportNASA.org – yes I own it) that enables people to donate to NASA. Money will be collected via online payment form and donated to NASA on a regular basis. Of course,

Org will be run completely off donated time and services. If money is needed that will be raised separately. Due to the simplicity of the plan I don’t think there are many administrative costs aside from money fees.

Bonus: Volunteer designers and developers will build a new donate page monthly… Because it’s cool. (Already have the launch landing page lined up. If you’re interested in grabbing a month, let me know.)

Questions:

  • Does anyone see any issues with this plan? (legal, practical…)

  • Will NASA be okay with this? Will they take our money?

Why?

If you want to build a ship, don’t drum up people to collect wood and don’t assign them tasks and work, but rather teach them to long for the endless immensity of the sea.

- Antoine de Saint-Exupery

In depth, in the words of Neil deGrasse Tyson. 

Brain trust: Feedback please!


    Dear NASA

    I just emailed NASA. If anyone knows anyone who works there, please put me in touch. This HAS to happen, doesn’t need to be me…  But this HAS to happen.

    To whom it may concern,

    I am a space enthusiast and web developer. I manage a team of developers and have been building websites for over 10 years now.

    I saw the video here http://www.penny4nasa.org and was inspired, but also frustrated. It’s a beautiful campaign, but the monies do not go directly to you. I’m sure what they’re doing is important, but I know people would prefer to donate directly.

    I truly believe that most americans would happily donate $1/yr and many $1/mo just to see NASA do all it wants to do.

    I was upset to discover that the only way to donate directly is via this form: http://nodis3.gsfc.nasa.gov/displayDir.cfm?Internal_ID=N_PD_1210_001G_&page_name=main

    How are people supposed to do that? Countless dollars have gone into researching the best ways to remove all boundaries from people who want to donate/pay with their money.

    Is there no legal way to bring this into a simple online form?

    I would be happy to set up a simple page through which all the money would go directly to you. I would be happy to do this gratis, only for my love of NASA and all NASA has done and does. I believe that simple metrics on that page showing a goal and how far we are from there would be all that’s needed to inspire.

    Please let me do this for you!!!

    If you are interested in considering just let me know and I’ll mock up a design.

    Best wishes,

    Jack Reichert


      Using JSONP in WordPress Development. The Quick-and-Dirty QuickStart Guide

      What IS JSONP and why should I care?

      There’s been a lot of debate lately about whether to move your site to SLL (https) or not. It’s clear, though, that all your forms, at least the ones that handle sensitive data like logins, should go over a secure connection.

      If your whole site is SSL then you won’t have any issues with making AJAX calls; however, if you DO go hybrid then Javascript will consider all the pages that are SSL as a separate domain and will block AJAX calls to them.

      Use case: You want to secure your admin area and you add define(‘FORCE_SSL_ADMIN’, true) to your wp-config.php file. You’ll remember that to make AJAX calls in WordPress you need to call: “/wp-admin/admin-ajax.php.” But that will now be an SSL connection and violates Javascript’s “same-origin policy“.

      This is where JSONP comes into the picture. As you probably know, you CAN include scripts from other sites using a script tag, that ability is the foundation of CDNs. JSONP takes advantage of that functionality.

      Basically, instead of including a static script on your site hosted on a  CDN, you’re sending a GET request to the domain of choice, and asking it to send back a callback method including within it a JSON object with the data you want. In essence, you’re spoofing your browser to think that it’s not actually doing a cross-domain ajax call, but in practice, you are.

      There’s a great discussion on StackOverflow about JSONP for further exploration.

      How do I do it?

      Below you’ll find two files, upload them to a folder in your WordPress plugins directory and activate. Note: you should probably run this on a test site. It won’t do anything bad to your site, but it’s never a good idea to play around on your production site.

      To test it add the following to any page:

      <input name="title" type="text" /> <input name="titleSubmit" type="button" />

      The javascript looks for an input button, on ANY page of your site, with the name “titleSubmit” and does the JSONP call with the content of an input text field on that page with the name of “title”.

      The most important pieces in the example that you’ll need to get your code running are:

      In the js file:

      Clearly without any of the code it won’t work properly; however, the above settings are not typical of most of your standard AJAX calls.

      type: GET: By it’s very nature a JSONP call cannot be POST. You’re essentially embedding a script tag on your page with GET variables in the URL of the script.

      cache: false: Removing this will not break your code, but for testing it’s best if you your browser doesn’t cache the responses.

      dataType: “jsonp”: You’re telling jQuery that it’s a JSONP call. Duh.

      crossDomain: true: Perhaps with the dataType set to JSONP you’d think the that this would be enabled, that’s the whole point, but you still need to set this.

      In the PHP file:

      content-type: text/javascript: You’re setting the response type being sent, application/javascript will work as well.

      access-control-allow-origin: *: This is another security check, you need to enable any origin for JSONP to work.

      $_GET[‘callback’]: Without the callback wrapping your JSON response jQuery will not recognize this as a valid response. It is set in place as a security measure similar to NONCEs.

      Conclusion

      Once you have the right recipe, JSONP with WordPress is not all that difficult. Use it well.

      As always, questions? comments? Don’t hesitate to do so below.


        Tech and Academia

        I’m frustrated by the tech scene ragging on academia. Yes. The system is ripe for disruption. Specifically here in the US, where the expense of higher education is rising and has put my generation and younger into ridiculous debts.

        However, that doesn’t mean that academia itself is bad.

        No, it’s not for everyone. But it is invaluable.

        I have a degree in philosophy. I did not expect to get a job in that field. I hustled through college to support myself — a tour guide, translator, I worked in sales, as a tutor, and in marketing — and I hustled afterwards until I discovered my calling as a developer and taught myself to code.

        From my degree I gained a depth and perspective on the world that follows me wherever I go, and influences every line of code I write.

        There are plenty of fields that require academia, even tech fields. There wouldn’t be any biology startups without it. We wouldn’t have lawyers to set up our C-Corps or doctors to treat us when we get sick.

        Let’s not forget that without our academic institutions we won’t foster our next generation of philosophers and we won’t recognize the value of the next Whitman without knowing who he is, nor will we be able to contextualize what happens across the world in the greater story of mankind.

        It’s easy to focus on how drastically and powerfully the entrepreneurial community has changed the world, and forget the value that more traditional paths still retain.

        Living here in the US it’s easy to forget how easy and inexpensive it is to get a top quality advanced education in many countries in Europe. The system here may be broken, but shouldn’t be discarded.

        It also doesn’t need to be the only way. Treehouse, Lynda, and Udemy have their place. If there are better ways to train for a profession, we need to embrace that. We don’t need to require degrees to provide jobs.

        But let us not forget the value of knowledge for the sake of itself as well. That is a huge aspect of what makes us human.


          Why I went to the cloud…

          I was asked to write a blogpost about my server setup. Specifically, about “the best fixes for wrangling all of those crazy cables.” To which I responded: “Oh, I just use the cloud. Never used anything else.”

          Why don’t I host my own physical server? Cold hard cash. For the level of scale I need, a few hundred hits a day, it would be overkill to buy my own.

          That question got me thinking about why I do wrangle my own server, albeit in the cloud, instead of relying on hosted solutions. So here goes…

          I’ve used many of the popular shared, and not shared, hosting solutions. But I’ve always come across the same issues. As my development skills improve, I find that I can only do less and less with what I have, when I rely on others for the environment in which I run my site.

          Let’s say I need to increase the upload limit in your php.ini? NOPE!

          Do I want to install git? Wait, I can just install that from the command line?! What else does my unix user have permissions to do? …or other users for that matter…

          Wait, you aren’t running PHP 5? Ok, I get that it’s complicated to upgrade PHP for existing users because you don’t want to break their sites, but, c’mon! I’m a new user!!!

          Through a mixture of horror and frustration I decided to look into alternatives. But, to be honest, I was afraid of running and configuring a server of my very own.

          For my first attempt I tried SUSE linux; because that’s what was being used at the office at time. But I really couldn’t keep it running. It just kept restarting. I didn’t know enough then to be able to say even now why that happened.

          But I persisted experimenting, and with some shameless begging, we switched to CentOS in the office. I took that opportunity to build my own development environment locally. Around the time I started feeling comfortable with playing around with server configuration I discovered DigitalOcean.

          After playing with AWS for a bit, moving to DO felt like moving to Apple from Windows XP. I had to give up a few controls that I didn’t feel too strong about, in exchange I didn’t have to think too much about settings I don’t care about. The server just worked. No extra services were needed and I knew the cost.

          So to answer the question of why I wrangle my own server?

          First, I like understanding the technologies upon which I am relying. The more you understand, the better performance you can pull out of something — “full-stack development” should include the Linux/Apache (or Nginx) part of the stack.

          Second, I you’re building an plugin or theme for distribution you need to make sure it will be compatible, and you can’t really rely on the masses to be running any advanced server setups. So don’t bother with anonymous PHP functions. But if you’re building something for yourself, you should be able to enjoy the benefits of PHP 5.5 and more.

          I’m currently working on version 3 of my server. I just moved from CentOS with a traditional Apache, PHP setup to Ubuntu with Nginx and PHP-FPM.

          Why?

          Well, first of all, all the cool kids are doing it.

          More importantly, Apache slows down under heavy load, because of the need to spawn new processes, while Nginx was designed specifically to handle high traffic sites. In addition, PHP-FPM runs along side the webserver, instead of on top — like a traditional setup with apache — which reduces the recourses available.

          This is a great example of the first reason I stated above. I saw a relatively easy way to improve my site’s performance. Since I’m in control, I can do it.


            Setting up an Ubuntu Desktop LAMP development server

            So you’ve inherited a WordPress site and you want to start developing for it. But you don’t want to go commando on the production site. Smart.

            How do you set up a local development environment?

            In this tutorial I’ll walk you through setting up a simple dev environment on Ubuntu desktop.

            WordPress typically runs off a LAMP stack. Not always, but most sites do. So that’s what we’ll set up.

            LAMP stands for:
            L inux – the operating system. In this case Ubuntu.
            A pache – the web server. Sometimes Nginx is used.
            M ySQL – the database.
            P HP – the server-side scripting language.

            The first step is to make sure you’re completely up to date.

            So let’s open up the terminal and run:

            sudo apt-get update

            Now we install the lamp server, run:

            sudo apt-get install lamp-server^

            Since Ubuntu 10 there’s this. Pretty easy, right?

            Type your password. Agree to the packages it’ll install. This will install ALL of the modules and packages you’ll need to run a web server locally.

            You’ll get a prompt to set a password for the root user for MySQL. Even though this is local, it’s best to keep to best practices, so don’t just press enter.

            That was ridiculously easy. Let’s test that by going to http://localhost/ in the browser. You should get a success apache screen.

            Let’s test PHP:

            sudo touch /var/www/html/info.php

            sudo nano /var/www/html/info.php

            type:

            &lt;?php phpinfo();

            Ctrl C to exit.

            Then navigate to: http://localhost/info.php

            You should see the phpinfo screen.

            Also to keep with best practices, once that’s done run:

            sudo /usr/bin/mysql_secure_installation

            Remember that password we just set? You’ll need it now.
            No, you don’t need to change the password you just set.
            Say yes to the rest.

            Next we’ll need a database for WordPress to use. So type:

            mysql -u root -p

            Enter the password you set for root.

            Then create the database:

            create database wordpress;

            Then: exit

            Now we’re almost ready to install WordPress, we just have to deal with some permissions, so we can code comfortably.

            First, we’ll need to grant apache access to the html directory:

            sudo chown -R www-data:www-data /var/www/.

            Then we need to add ourselves to apache’s group:

            sudo usermod -a -G www-data YOURUSERNAME

            In order for that to take effect, you’ll have to log out and log back in.

            Now, we still can’t do anything in the html directory. That’s because we need to grant read/write/execute permissions for the apache group.

            sudo chmod -R 775 /var/www/.

            And Viola! WordPress time!

            Download: http://wordpress.org/latest.zip

            Let’s extract that to: /var/www/html/

            If you go to http://localhost/wordpress in your browser you should see the installation wizard.

            Click “Create a Configuration File” then “Let’s go!”

            The “Database Name” keep as ‘wordpress’, we just created that.
            “User Name” is ‘root’.
            “Password” is whatever you set for that.
            “Database Host” keep as ‘localhost’.

            Usually it’s not a good practice to keep the root user for running your applications, but for expediency we’ll keep it for now.

            “Submit”

            Aaannnd this: “Sorry, but I can’t write the wp-config.php file.”

            No problem. Click back in your browser, and go back to the terminal. Run:

            sudo chown -R www-data:www-data /var/www/.

            Again, and we’ll resubmit. Because we copied the WordPress files apache didn’t own that directory. You should be good to go now.

            “Run the Install”

            Fill out the form. And we can log in now!

            Congratulations! You now have your own development server running off your Ubuntu desktop.

            Let’s test that out… Yup, all seems to be working just fine.

            This site you can now develop for and break with impunity.


              Announcing IlanaCMyer.com

              ilanacmyer.com

              I’m proud to announce the launch of the author site of my talented wife: Ilana C. Myer.

              The art is by the very talented Galen Dara; the site design and development is my own. I wanted to take a few words and go a bit into my thoughts behind that design.

              The design: The primary purpose of the site is for Ilana to share updates and insights about her upcoming book.

              Towards that goal, it was important for me was to have a beautiful readable type. I used Calluna. It has an elegant feel. What struck me about it was the elegance of the serifs, and how it balanced that detail with a clean reading experience. 

              To balance out the serif body type I used Lato I believe that it was intended to be used as a thinner sans-serif. However, for contrast I used it’s thickest weight. I think it still works nicely.

              For Ilana’s name, at the top, we used Neue Hammer Unziale. It’s Celtic look was apropos due to the influences of the book. (You’ll just have to read it to find out more.)

              Having commissioned the art, we wanted to put it front-and-center. I felt it would immediately place the visitor into the world of the book. Thankfully, the visual trend now is leaning towards full screen hero images.

              The transparent heading before the posts on the homepage is to keep the visitor inside that world, always reminding them of the art. The art can be seen in full by scrolling all the way to the bottom.

              The page heading recluses itself as the visitor scrolls down to bring the visitor into the text, reducing the distraction of the art.

              The tech: I used underscores as a base theme and set up a grunt watch to compile my LESS and JS files. Nothing too fancy; not much needed for a blog.


                We Choose

                Today 45 years ago one of our species landing on another world. For a moment all mankind were bound together by accomplishment and ingenuity. We looked up at the heavens and for the first time, we knew one of us was looking back. Oh the force of the human spirit.

                “There is no strife, no prejudice, no national conflict in outer space as yet. Its hazards are hostile to us all. Its conquest deserves the best of all mankind, and its opportunity for peaceful cooperation may never come again. But why, some say, the moon? Why choose this as our goal? And they may well ask why climb the highest mountain? Why, 35 years ago, fly the Atlantic? Why does Rice play Texas?

                We choose to go to the moon. We choose to go to the moon… we choose to go to the moon in this decade and do the other things, not because they are easy, but because they are hard, because that goal will serve to organize and measure the best of our energies and skills, because that challenge is one that we are willing to accept, one we are unwilling to postpone, and one which we intend to win, and the others, too.”

                When something seems too hard, I look up at the sky and think of these words. We have so many challenges ahead of us, but the force of that idea.

                This is who we are.

                We set foot on the Moon.

                Goddammit. We can find a way to live with respect for one another and stop killing each other. Goddammit. We can find a way to conquer poverty and plague. Goddammit. We can find a way to live with all the comforts of modern society without burning away our future and our fellow inhabitants of this beautiful planet that gave birth to us.

                We set foot on the Moon.


                  Demystifying the WordPress Plugin

                  I asked one of the guys on my team to build a WordPress plugin, he balked. I realized that he just didn’t get how easy it is. So I thought I’d dedicate some time to dispelling the myth that plugins are complicated to write. “Plugin” sounds formidable. But really, a plugin is a file in the plugins directory with a comment. That’s it. To build your first plugin create a file, name it whatever you like, and place the following code at the top:

                  <?php
                  /**
                  * Plugin Name: Name Of The Plugin
                  * Plugin URI: http://URI_Of_Page_Describing_Plugin_and_Updates
                  * Description: A brief description of the Plugin.
                  * Version: The Plugin's Version Number, e.g.: 1.0
                  * Author: Name Of The Plugin Author
                  * Author URI: http://URI_Of_The_Plugin_Author
                  * License: A "Slug" license name e.g. GPL2
                  */
                  

                  Upload that file to "YOUR-SITE-ROOT/wp-content/plugins/" and voilà!

                  Screenshot 2014-06-29 15.55.47

                  Go to your plugins menu and you’ll see your shiny new plugin there.

                  What do you put in there besides the comment? Typically, anything you’d put in your theme’s functions.php file. Unlike with the functions.php file which runs everything you put in it, where plugins are concerned you can decide whether to “activate” the code or not.

                  Here’s a great post with 25+ potential plugins. Let’s try #3 (Don’t forget to change the plugin’s name):

                  <?php
                  /**
                  * Plugin Name: Remove WordPress Version Number
                  * Plugin URI: http://URI_Of_Page_Describing_Plugin_and_Updates
                  * Description: A brief description of the Plugin.
                  * Version: The Plugin&#8217;s Version Number, e.g.: 1.0
                  * Author: Name Of The Plugin Author
                  * Author URI: http://URI_Of_The_Plugin_Author
                  * License: A &#8220;Slug&#8221; license name e.g. GPL2
                  */
                  function wpbeginner_remove_version() {
                    return &#8221;;
                  }
                  add_filter(&#8216;the_generator&#8217;, &#8216;wpbeginner_remove_version&#8217;);
                  

                  See! Wasn’t that easy?

                  Typically, you’ll want to add to your functions.php file code that is necessary for your theme to run, and make plugins for all functionality that is separate from the theme.

                  There’s a lot more to say about plugins, the example above is rather simple, but it should get you on your way.

                   


                    Labor Surplus is a Resource to be Tapped, Not a Liability to Mitigate

                    “While those ancestral Maori who first colonized the Chathams may have been farmers, Maori tropical crops could not grow in the Chathams’ cold climate, and the colonists had no alternative except to revert to being hunter-gatherers. Since as hunter-gatherers they did not produce crop surpluses available for redistribution or storage, they could not support and feed nonhunting craft specialists, armies, bureaucrats, and chiefs.”

                    - Diamond, Jared. “Guns Germs And Steel

                    Technology is such a blessing. As production becomes more efficient, fewer people need to work in order feed the rest.

                    While in the past, technology has created more jobs because of the efficiency it created, given Moore’s law, as the efficiency of our systems grow exponentially, I believe that it may threaten jobs, if we aren’t able to keep up with the progress.

                    But what this really is, is the opposite of the Chathams’ experience. There are “crop surpluses” which means that more people are available to discover, build, learn and develop.

                    All we need to do is invest in empowering people to profit from their creativity. If we invest intelligently in our future, we’re in for quite an exciting ride of creative invention and innovation beyond our wildest dreams.