• Follow Me on Twitter Follow Me on Twitter
  • Follow me on Flickr Follow me on Flickr
  • Follow Me on Pinterest Follow Me on Pinterest
  • My Music on Soundcloud My Music on Soundcloud
  • Find Me on Facebook Find Me on Facebook
  • About.me About.me
  • My Company - Dopamine My Company - Dopamine

Ghost Tx

Transmissions from the Ether

    • Home
    • Blog
    • About Me
    • My Music
  • Archives

  • Recent Tweets

    • Amazing song! Thanks Giovanni! ♫ When That Head Splits – Esben and the Witch spoti.fi/Y8c8Mm #NowPlaying 1 day ago
    • The immense #patterns library @subtlepatterns fed directly into your #photoshop – always in sync! plugin.subtlepatterns.com #plugin #comingsoon 1 day ago
    • I just backed Ghost: Just a Blogging Platform on @Kickstarter kck.st/ZKpHXr 1 day ago
    • @skione I doubt it - just a slow ass server. 2 days ago
    • @paularmstrong Love your template benchmarking suite! Oh, and your personal website is down. 2 days ago
  • RSS

    RSS Feed RSS - Posts

    RSS Feed RSS - Comments

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Blog

  • View Archive

How To Easily Build a Fast, Reliable Production Rails 3.2 Web Server with Ubuntu 12.10 / Nginx / Passenger

Bonus: This server will work with multiple virtual hosts!!

Just one note before we start. This took MANY, MANY tries to get right. I just went all the way through it myself from start to finish and it worked. There were a few issues with my test app itself that I had to troubleshoot, but I finally got them worked out. See the “Deploy Source Code” section for some problem solving tips.

Before You Start

  1. Set up a fresh Virtual Machine, ready for OS Install (or Ubuntu 12.10 pre-installed).
  2. Download latest Ubuntu Server install .iso (if not pre-installed).
  3. Sign in to your Github account in a browser window.
  4. Create a fresh document to keep notes (Use Evernote or a Google Doc so you can always refer back to it).
  5. Write down the following information: Your hostname and hostname.domain.com, and your IP address(es). Be sure to make notes of each password you use, and any deviations you make from the basic instructions here.

Install Ubuntu 12.10 Server and create user deployer

  1. Install Ubuntu as normal. If you can, set up your user account as “deployer” – we will need to use it later.
  2. Select to install only the OpenSSH Server feature – we will install all the necessary software as we proceed. If you could install OpenSSH as the server was initially set up, do it now.
    1
    sudo apt-get install openssh-server
  3. (Secret tip here – if you’re using VMWare Virtualization and get repeated characters when typing in the console, follow these simple steps to fix it).
  4. Using the console, edit the hostname, if necessary.
    1
    sudo nano /etc/hostname
  5. Using the console, edit or add your IP Address(es), if necessary.
    1
    2
    sudo nano /etc/network/interfaces
    sudo restart networking
  6. If you are using VMWare, you can take a convenient snapshot  of the VM at this point, to allow you to quickly roll back to this point in the process at any time. Shut down, Take a Snapshot, then power the VM back on.
    1
    sudo poweroff
  7. You should now be able to ssh into the Virtual Machine from your local system.
    1
    ssh deployer@hostname.domain.com
  8. Use my guide to Install VMWare Tools, if you’re using VMWare Virtualization like me.
  9. Update the system.
    1
    2
    sudo apt-get -y update
    sudo apt-get -y upgrade
  10. Make sure you install all the software on the apt-get install line here (scroll to the right in the box below). It will all be needed.
    1
    2
    sudo apt-get -y install linux-headers-server build-essential ntp ntpdate git-core g++ curl libcurl4-openssl-dev libssl-dev zlib1g-dev libreadline-dev libyaml-dev libxslt1-dev htop apache2-utils python make make-doc software-properties-common
    sudo reboot
  11. If you haven’t already, set up the deployer account and group that will own the site code.
    1
    2
    3
    4
    5
    6
    7
    sudo useradd -s /bin/bash -m deployer (if it doesn't already exist)
    sudo passwd deployer (if it doesn't already exist)
    sudo usermod -a -G sudo deployer (you will already be in the group sudo if you set the user up during initial Ubuntu install)
    sudo groupadd wwwadmins
    sudo usermod -a -G wwwadmins deployer
    su deployer (or just ssh into the server as deployer)
    cd ~
  12. Create a directory for the site files.
    1
    sudo mkdir -p /var/www/production
  13. Give deployer ownership over these directories.
    1
    sudo chown deployer:wwwadmins /var/www/production
  14. Edit the GRUB configuration to prevent the server going to sleep. Setting ACPI off means that Ubuntu will not attempt to use ACPI features like Power Saving, Standby, and Hibernate among others.
    1
    sudo nano /etc/default/grub
  15. On the line GRUB_CMDLINE_LINUX_DEFAULT=”…”, add acpi=off and save the file.
    1
    GRUB_CMDLINE_LINUX_DEFAULT="acpi=off"
  16. Update GRUB.
    1
    sudo update-grub
  17. Note: After I updated GRUB, my system booted into the GRUB console boot screen on the next reboot. I had to select “Ubuntu” and then it booted fine every time after that.

Set up SSH

  1. Generate your public ssh key (accept default location ~/.ssh folder and leave passwords blank).
    1
    ssh-keygen
  2. Print the key to the screen, copy into your clipboard, and make a note of it in your working document.
    1
    cat .ssh/id_rsa.pub
  3. Speed up SSH by telling it not to use DNS lookups.
    1
    sudo nano /etc/ssh/sshd_config
  4. At the end of the file, add this line, then save
    1
    UseDNS no
  5. Optional: If you’re using Github, sign in now, Edit your Profile, click on SSH Keys, Add SSH Key (paste in the public key from ~/.ssh/id_rsa.pub and give it the name of your server).

Install NodeJS

  1. Install Latest NodeJS for use with the rails asset pipeline.
    1
    2
    3
    sudo add-apt-repository ppa:chris-lea/node.js
    sudo apt-get -y update
    sudo apt-get -y install nodejs
  2. Install Node Package Manager (npm).
    1
    curl https://npmjs.org/install.sh | sudo sh

Install Ruby

  1. Become deployer.
    1
    2
    su deployer
    cd ~
  2. Install rbenv. You can copy and paste this whole block into your terminal session at once. This step may take a while (10 minutes or so) and you may need to hit enter one last time to accept the last command (I did).
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    cd ~
    git clone git://github.com/sstephenson/rbenv.git .rbenv
    echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
    echo 'eval "$(rbenv init -)"' >> ~/.bashrc
    exec $SHELL # Restart the shell
    mkdir -p ~/.rbenv/plugins
    cd ~/.rbenv/plugins
    git clone git://github.com/sstephenson/ruby-build.git
    git clone git://github.com/sstephenson/rbenv-gem-rehash.git
    rbenv install 1.9.3-p385
    rbenv rehash
    rbenv global 1.9.3-p385
  3. Edit .bashrc
    1
    nano ~/.bashrc
  4. Add this block at the top of the file BEFORE “# If not running interactively, don’t do anything”
    1
    2
    3
    4
    5
    export RBENV_ROOT="${HOME}/.rbenv"
    if [ -d "${RBENV_ROOT}" ]; then
        export PATH="${RBENV_ROOT}/bin:${PATH}"
        eval "$(rbenv init -)"
    fi
  5. Reload .bashrc (careful here – this command starts with a dot . ).
    1
    . ~/.bashrc
  6. Check that the ruby version is the one you just installed.
    1
    ruby -v
  7. Go home.
    1
    cd ~
  8. Install rails.
    1
    gem install rails --no-ri --no-rdoc
  9. Install bundler.
    1
    gem install bundler --no-ri --no-rdoc
  10. Rehash.
    1
    rbenv rehash
  11. Dump out your gem environment and copy into your doc for safekeeping. It could be useful for troubleshooting later.
    1
    gem env

Install Passenger and Configure NGINX

  1. Install the passenger gem
    1
    gem install passenger --no-ri --no-rdoc
  2. Find the full path to this gem you just installed.
    1
    which passenger-install-nginx-module
  3. Use passenger to install NGINX – you must use the full path.
    1
    sudo /home/deployer/.rbenv/shims/passenger-install-nginx-module
  4. Follow the prompts. Select 1. Yes: download, compile and install Nginx for me. (recommended)
  5. Write down your nginx path, by default it’s /opt/nginx
  6. Create virtual hosts directory structure
    1
    sudo mkdir -p /opt/nginx/conf/sites-available /opt/nginx/conf/sites-enabled
  7. Manually create an upstart script for NGINX
    1
    sudo nano /etc/init/nginx.conf
     
    1
    2
    3
    4
    5
    6
    7
    8
    description "Nginx HTTP Server" 
     
    start on filesystem
    stop on runlevel [!2345]
     
    respawn
     
    exec /opt/nginx/sbin/nginx -g "daemon off;"
  8. Edit NGINX config
    1
    sudo nano /opt/nginx/conf/nginx.conf
  9. Add this line just below the server { } block (just above “# HTTPS server”)
    1
    include /opt/nginx/conf/sites-enabled/*;
  10. Enable GZIP compression like this in the nginx.conf file.
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    # Enable Gzip:
        gzip on;
        gzip_http_version 1.0;
        gzip_comp_level 7;
        gzip_min_length 512;
        gzip_buffers 16 8k;
        gzip_proxied any;
        gzip_types
          # text/html is always compressed by HttpGzipModule
          text/css
          text/plain
          text/x-component
          application/javascript
          application/json
          application/xml
          application/xhtml+xml
          application/x-font-ttf
          application/x-font-opentype
          application/vnd.ms-fontobject
          image/svg+xml
          image/x-icon;
     
        # This should be turned on if you are going to have pre-compressed copies (.gz) of
        # static files available. If not it should be left off as it will cause extra I/O
        # for the check. It would be better to enable this in a location {} block for
        # a specific directory:
        # gzip_static on;
     
        gzip_disable "msie6";
        gzip_vary on;
  11. Start NGINX
    1
    sudo service nginx start
  12. You may want to tune NGINX using the HTML5 Boilerplate Server Configs. Also, do yourself a favor and check out this amazing page about NGINX server configs, along with actually good explanations of all the configuration settings in plain English.

Install your Database Server (if necessary)

  1. We’ll use MySQL.
    1
    sudo apt-get -y install libmysqlclient-dev mysql-server

    Enter root password twice when prompted.
  2. Secure the installation.
    1
    mysql_secure_installation

    Change the root password? [Y/n] n
    Remove anonymous users? [Y/n] Y
    Disallow root login remotely? [Y/n] Y
    Remove test database and access to it? [Y/n] Y
    Reload privilege tables now? [Y/n] Y
  3. Log in to mysql
    1
    mysql -uroot -pyourpassword
  4. Create a database. Make sure the database name doesn’t have any dashes in it.
    1
    CREATE DATABASE appname_production;
  5. Create a production user with all privileges.
    1
    2
    GRANT ALL PRIVILEGES ON *.* TO 'deployer'@'localhost' IDENTIFIED BY 'some_pass' WITH GRANT OPTION;
    FLUSH PRIVILEGES;
  6. Exit the mysql session.
    1
    exit
  7. Update the production block in your source code /config/database.yml to use deployer, the correct password, and the correct socket for Ubuntu.
    1
    2
    3
    4
    5
    database: appname_production
    pool: 5
    username: deployer
    password: some_pass
    socket: /var/run/mysqld/mysqld.sock
  8. Important: Commit and Push your source code changes to github.
    1
    2
    3
    git add .
    git commit -am "Updated database.yml for production deployment with Capistrano."
    git push origin master

Create your nginx Config File

  1. Use nano to edit and save the file.
    1
    sudo nano /opt/nginx/conf/sites-available/sitename
  2. Adapt and save this config file with your settings.
  3. Enable the site.
    1
    sudo ln -s /opt/nginx/conf/sites-available/sitename /opt/nginx/conf/sites-enabled/sitename
  4. Stop and start NGINX.
    1
    2
    sudo service nginx stop
    sudo service nginx start

(Option 1 – My Choice) Deploy Source Code with Capistrano

  1. Uncomment gem ‘capistrano’ in your source code and run the bundle command.
  2. Initialize Capistrano.
    1
    2
    cd /path/to/your/source
    capify .
  3. Edit your brand new /Capfile and uncomment load ‘deploy/assets’.
  4. Edit your config/deploy.rb, filling in the correct information on each line:
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    require "bundler/capistrano"
    #load 'lib/deploy/seed' #include if you need to load seed data with cap deploy:seed 
     
    server "hostname.domain.com", :app, :web, :db, :primary => true
    set :user, "deployer" # The server's user for deploys
    set :scm_passphrase, "yourpassword" # The deploy user's password
     
    set :application, "appname.com"
     
    set :use_sudo, false
     
    default_environment["GEM_PATH"] ="/home/deployer/.rbenv/versions/1.9.3-p385/lib/ruby/gems/1.9.1:/home/deployer/.rbenv/shims/ruby"
    default_environment["PATH"] = "$HOME/.rbenv/shims:$HOME/.rbenv/bin:$HOME/.rbenv/versions/1.9.3-p385/lib/ruby/gems/1.9.1:$PATH"
     
    set :deploy_to, "/var/www/production/appname"
    set :deploy_via, :remote_cache
     
    after "deploy", "deploy:cleanup" # keep only the last 5 releases
     
    set :scm, "git"
    set :scm_verbose, true
    set :repository, "git@github.com:githubusername/repositoryname.git"
    set :branch, "master"
     
    default_run_options[:pty] = true # Must be set for the password prompt from git to work
    ssh_options[:forward_agent] = true
     
    namespace :deploy do
    # If you need to load seed data. Syntax: cap deploy:seed
      desc "Reload the database with seed data"
      task :seed do
        run "cd #{current_path}; bundle exec rake db:seed RAILS_ENV=#{rails_env}"
      end
     
      task :start do ; end
      task :stop do ; end
     
      task :restart, :roles => :app, :except => { :no_release => true } do
        run "#{try_sudo} touch #{File.join(current_path,'tmp','restart.txt')}" #restarts nginx
      end
    end
  5. Validate your Capistrano Recipe. You’ll need to supply your deployer password.
    1
    cap deploy:setup
  6. Check that everything is set up correctly.
    1
    cap deploy:check
  7. Cold Deploy.
    1
    cap deploy:cold
  8. I had to do an additional regular/everyday deployment to get the assets to precompile.
    1
    cap deploy
  9. Seed the database (optional).
    1
    cap deploy:seed

(Option 2) Non-Capistrano Deploy: Install your Site Source Code

  1. Become deployer 
    1
    su deployer
  2. Change Directory
    1
    cd /var/www/production
  3. Clone your app’s git repository
    1
    git clone https://github.com/github_username/repository_name.git
  4. Run bundler
    1
    bundle
  5. Create and migrate your database
    1
    RAILS_ENV=production rake db:create db:schema:load

Hit the Production URL and Troubleshoot any problems

  1. Open the Production URL in your browser.
    1
    http://hostname.domain.com/
  2. If NGINX doesn’t show your site, look in the NGINX log and try to fix whatever problem it shows.
    1
    tail -n50 /opt/nginx/logs/error.log
  3. If the app doesn’t start up properly, check and/or watch the production log as you work through the problems.
    1
    2
    cd /var/www/production/appname/current/log
    tail -f -n50 production.log
  4. For me, I had the server complain about some files not being precompiled in the production.log file. If you have manual javascripts or css that need precompilation, edit your /config/environments/production.rb file and uncomment/modify the following line to include your custom assets.
    1
    config.assets.precompile += ['modernizr.js']
  5. For future Capistrano deploys, just run this command from your app directory.
    1
    cap deploy

Install Monit (Optional)

I find this serves two purposes: It helps me monitor the server, and it keeps the server more responsive and less apt to fall asleep.

  1. Follow my guide to installing Monit, except use this config file – make changes where necessary. I know it’s long, but look for and modify for your configuration the blocks that are NOT commented out, and search for “pa$$word”.
  2. This configuration does not monitor Passenger. If you’d like to attempt it, try the passenger_monit gem.

Last Word

If anybody has improvements to these steps, PLEASE leave notes in the comments.

I would love to keep this as efficient and straightforward as possible, as well as up to date as new bits are released.

Let me know if this worked for you!

Also, please follow me on Twitter: @justinschier

  • February 24, 2013
  • 0
  • 0

Justin’s Story – My Double Coming Out

I am gay.

I came out of the closet fairly late among my friends, at age 32, about seven years ago.

I don’t regret coming out for one microsecond, and I truly love my life now. I am happier than I’ve ever been and my life really is filled with joy every single day. If you know me, you know I’m someone who savors life and has huge love in my heart for the people around me.

But let me tell you, coming out was a massive heartbreak as well, I’m not going to lie. In fact I’m about to tell more truth than I think I ever have in one sitting. I’ve never told this full story before, and my aim is to let you peer deep into my heart, if you’re willing to look. Come on, it’s not THAT long.

My family converted to Christianity just before I was a teenager, and I accepted Christ and became born again around age 10 or 11. We lived in Southern California, and went to a very large church. I was a true believer, studied my bible cover to cover, prayed, everything.

I made some very close, lifelong friends through that church through my late teens and early twenties, who I love dearly to this day.

I became very heavily involved in playing music at that church with these lifelong friends, all of whom are true believers. Have you heard the theory that if you put ten thousand hours into something, you become an expert at it? I put in that many hours to music and Christianity, maybe even twice that between 17 and 32.

Fifteen years of playing music at church, and I truly loved every second of it. I wasn’t phoning it in. I poured my creativity into it and got good at it after a few years of playing at church and in bands.

If you’re not a musician, I hate to say it but I’m sorry for you. The feeling of playing music, especially with the caliber of people I was playing with, is indescribably rapturous. Your brain fires on all cylinders and an unspeakable happiness wells up in you. When it’s going right, your heart actually beats together with the rhythms, and at the same time it wants to burst right out of your chest.

It was that rapture and that desire to keep playing better and better music, along with fear of rejection and losing my friends was what kept me in the closet for so long.

I know, and I have always known that I was lying to everyone. But this is the honest truth – I always believed God could change me into a straight man. I begged and pleaded for years and years and years and years. I thought if I had a girlfriend, maybe I would come around.

I tried that a few times when it naturally occurred, but my nature never changed.

I even had sex with a few of them, but that didn’t work either. In my mid twenties, I made a decision to live with my condition and just never come out. I would keep my mouth shut, have a celibate life, and the price for that is I could never apologize to all the friends and girlfriends I had lied to for so long. At least I had my music and my friends and a pretty great life.

Thing is – I was so insulated that I didn’t really even know what it was to come out. I certainly didn’t have anybody encouraging me. It wasn’t because I feared for my soul – I had slowly stopped believing that part what I heard from the church pulpit in my mid twenties.

My friend Lance told me once that being a Christian is only about how you treat people. That powerful thought radically transformed me, although now I’d change “Christian” to “good person”.

This isn’t what you usually hear in church on Sunday. If they got this through everybody’s head, I don’t think there would be anything left to say the next Sunday.

I don’t know what happened around age 32, but something started to become clear – I couldn’t go on like this.

My youth was slipping away from me, and I was tired of lying and pretending I was straight. I also slowly realized that I needed to have real love in my life, and that some of the words I’d been hearing in church just never had the ring of truth, especially about gays, no matter how hard I tried to force them to in my mind.

One night in LA, thinking hard about moving there from Orange County, I met Brian at a music show through my close friend David Larring. He was a complete sweetheart, and a fast new friend. This was in the days of MySpace, and I looked him up when I got home. He was gay, and a Christian. Oh my God. My heart started beating fast, I remember the moment so clearly. How does this work?!

I went out on a limb and asked Brian if he’d help me with apartment hunting with me the following Saturday and we had a long, fun April day driving all over LA with the windows down and music blasting.

That evening, I suggested we tell each other our life stories, which we did. After watching a DVD that night, Brian said to me, “Is there anything you left out of your life story?”

This was it. The moment. I had about three seconds to pull the trigger or miss this opportunity. I vividly remember the dryness in my throat as I said for the first time to another human being, “I’m gay.”

It was so quiet, that he made me repeat it, a little louder the second time. What a crystal clear moment that I’ll never forget as long as I live. Wow. Life Pivot.

He immediately gave me a huge hug, as I waited for the realization to sink in that along with a new life of freedom and happiness, I would probably lose my friends and my music. I spilled my guts over the next hour, and to his credit, Brian asked me if I needed a mentor or a lover. I said both.

He told me he had come out a little late too. He had even been married for a little while, being a good midwestern boy, before he had to end it and come out to his family. I was glad I never lied to myself quite THAT much.

I had never fallen in love, but I did that day. He convinced me that if I was going to come out, I had to come out. I had to figure out how to tell my friends and family, even as I prepared to move to LA.

I told David Larring first, who said he knew something was up, and that he’d always be my brother. Well, I thought, that went well, even though it was tough. I told a few others in my circle. One of them, inexplicably went and told the music leader at my church before I could, who promptly fired me after playing on the main stage for seven years.

Okay, saw that one coming, mostly, and I was prepared to stop playing. After that, word spread pretty fast. I’ve never heard another word from 95% of the people I knew there.

A few of my closest friends, Eli and Beth, and both Joshes told me they loved me no matter what, and I know they do to this day.

But this is where the heartbreak started to set in. The people who still talked to me did love me, but loved me in SPITE of being gay. I knew this was a radical new experience for them with someone who was always damned from the pulpit, to a special place in hell for disgusting freaks. I hoped they would come around eventually. I was just figuring everything out too.

I made a concerted effort to tell the rest of my group of friends – I owed them that much, although I know I missed directly telling a few to my discredit.

A few responded that they suspected for a long time, but loved me anyway. I got a few that said they loved me but couldn’t condone my lifestyle. Some people just never responded. Some just unfriended me.

But I didn’t get any that said, “and?”, “so what?”, or “how does that change anything?”. Ok I take it back, this was my amazing sister’s reaction, but nobody else’s.

When I’d run into people around LA, I’d introduce Brian and there would be a few moments of super awkward introductions and smalltalk, then an excuse to get away from us. As time went on, I realized most of my friendships were gone forever.

This was what put my belief in God to the test. If God’s love was as everlasting as they’d always said, surely some friends would come back and say they were wrong, that my gayness didn’t matter to them at all.

That never happened. Over the next couple years I got some heartfelt apologies, from Jenah, Kirsten, Carolee, and some efforts to reconnect. But the heartbreak of losing so many people never went away, not even close.

I have moved on in my life as one does. But within the first year of coming out, I moved on from my belief in God as well. When I needed love and acceptance, I got almost unilateral abandonment.

I know I lied to these people for years about my sexuality. It was despicable and I don’t expect forgiveness for that. But wait – isn’t forgiveness at the center of Christianity? Doesn’t it make sense that God’s forgiveness would flow back to me through at least some of them? Yes, but it didn’t.

Seven years and two long term relationships later, I’m just now trying to put my relationship with my Mom back together. She is as true believer as there ever was upon the earth. She said she’s known I was out since 2006, but we have never spoken about it until a few months ago.

She loves me unconditionally I know, but I can tell she still just tolerates me being gay – she doesn’t accept me.

I’ve told her many times that my partner Andy is part of the family now and that I love him with my whole heart. I’ve told her I need her acceptance, and that means her asking about him once in a while. She could even start by mentioning his name. Once.

We’ll see what happens, but not one “How’s Andy” yet.

For the record, my Dad has been amazing, even though the first few weeks after I came out were filled with silence. My Aunt Eve has gone a million billion light years out of her way to make up for some of the damage. She never misses an opportunity to ask about Andy, and to let me know I’m 100% loved and accepted without question in her book.

Ultimately, staying in the closet so long and thereby lying to everyone was the defining moral failing of my life, and I still feel regret about it.

Being gay is not a moral failing, however. It is not something we choose anymore than straight people choose to be straight.

Why would anyone choose to be a homo anyway? Completely shunned by most of society, rejected by just about everyone as disgusting? No thanks.

No, we love who we love. Preachers who say we’re choosing to be gay are all speculating, not speaking any kind of Truth.

Morailty and sex have nothing to do with each other. And preachers who go on and on about it know it deep down.

I realized that Christianity’s greatest strength was in shaming people about their everyday sexuality, straight or gay, and preachers know that too, and they abuse that strength.

That’s the fatal flaw.

I realized church leaders wield this power in terrible ways to keep people in pews.

That meant a the great effort they spent preaching about sexual immorality only served to turn people’s innermost desires against them.

And that meant none of it was good.

And that meant it was being used for evil.

And that meant none of it was real.

And that meant I no longer believed. In anything supernatural. I just don’t think there could possibly be a God at all, and there never was. My entire life has borne that out, and I have thankfully been a godless atheist since 2007. The good qualities I talk about – love, respect, acceptance, and charity don’t come from God at all – they come from people.

What I do believe is back to what Lance said so long ago. Being a good person comes down to how you treat other people, not whether you believe in God, and I will keep saying that until my dying breath.

What I will do is continue to treat people the way I want to be treated, which is pretty well. With pure love, and true acceptance. With empathy and respect. I hope anybody who knows me or used to, will be honest enough with themselves to see these qualities in me, because they are integral parts of my character.

Since I moved to New York in 2009 I have had the joy of making countless friends who have the same outlook as I do. They are good people because of how they treat others. I love so much being able to throw parties and have people come over to my house to laugh with until we make snorting sounds, friends who would do anything for me.

I wrote this on January 12, 2013 after reading an open letter to the LGBTQ community from Mike Erre, posted on my friend Josh Thomson’s Facebook wall. It was an apology on behalf of the church for its treatment of gays in modern times. It was sparked after a preacher came under fire for some old remarks about gays, and voluntarily withdrew from participating in President Obama’s second inauguration.

In the comments, most people agreed with his main message. This is amazing to me, because I don’t think the reactions would have been the same even five years ago.

I just want to say a couple things about that letter, then I’m done. I appreciate the sentiment, and I think it’s real. Unfortunately, the writer can’t let go of his power to shame. Why should he? He’s a preacher and that’s what preachers do. It’s why I can’t bring myself to believe in any of the Christianity he’s preaching.

He says “I do think transformation is possible”, meaning he’s sorry for how we’ve been treated, but we can still become straight. What about the reverse? Is it possible he could ever transform into a homo? Oh, I guess that’s not what he meant. What nonsense. That kind of thinking just has no basis in reality.

He specifically asks for forgiveness, and I can’t say it that part doesn’t make me respect him a lot for being one of the first. It’s definitely a step in the right direction. We have been wronged, rejected and abused, but we aren’t unfeeling perverts. We’re just normal people who fall asleep on each others’ shoulders at night like everybody else during good times and bad.

My biggest issue with the letter is it’s still entirely based around telling people what morality is, as if they needed to hear it from him. Good people, of which there are a lot in this world, don’t. They know as I do that morality is how you treat other people, and has nothing to do with all the Jesus-y stuff he’s going on about. It has nothing to do with sitting in a pew and listening to some music and preaching, or praying, or reading the Bible. It has nothing to do with church at all or even following Jesus. Nothing.

I hope by my words I’ve shown that I’m not a bitter person, just somebody who wants to try and bring a little love and honesty back into the world.

I hope I’ve shown that I haven’t come to any decisions in my life lightly. I’ve done my best to act on major revelations as they have come to me, much later in life than most people.

To any old friends who read this, I miss you. If you do accept me in the way I talked about above, but haven’t ever told me that, please send me a message.

Thank you for reading.
Justin Schier

 

  • January 12, 2013
  • 1
  • 3

New Website I built for the best sister in the world – Elizabeth & Elijah

Elizabeth and ElijahI just wanted to give a big shout out to my sister — I’m so proud of her!!!

She had a vision to create a line of baby essentials with a modern, design-forward feel, and ultra-soft fabrics. Baby blankets, burp cloths, diaper changing accessories and pads, really cool bibs, even dresses.

Everything is handmade in the USA and comes with a money back guarantee.

She’s calling the company Elizabeth & Elijah after her two youngest kids’ middle names.

The website is http://ElizabethAndElijah.com

Please take a look and keep it in mind next time you need a great gift for someone else, or maybe even yourself.

Elizabeth and Elijah - The Line

 

 

  • October 5, 2012
  • 0
  • 0

Pie Crust Hack – Cutting cold butter into quarter inch cubes in 15 seconds flat

Making pie crust from scratch is so easy.

20120528-174556.jpg

20120528-174611.jpg

20120528-174618.jpg

20120528-174627.jpg

20120528-174639.jpg

20120528-174646.jpg

  • May 28, 2012
  • 0
  • 0

Gaming the System – Split or Steal Style

by Justin Schier, Chief Creative Officer Dopamine Inc. @justinschier
Originally Published on the Gamification Co. Blog

If you’ve never experienced the British TV phenomenon phenomenon known as Golden Balls, it’s worth watching a bit, even for kitsch value. Even though it went off the air in 2009, there are hours of it available on YouTube. It was basically a just-as-shlocky, slightly more sophisticated version of Deal or No Deal.

Most TV game shows cleverly combine chance and skill to create compelling entertainment, such as The Price is Right, Wheel of Fortune, and even Jeopardy. The first rounds of Golden Balls are pure lottery-style chance, but the interesting part comes when the game is whittled down to just two players and a large amount of money is on the table.

The finalists face each other in a variation of the Prisoner’s Dilemma, named by Albert Tucker in his 1950′s game theory writings. They must either trust each other in order to split the pot, or attempt betrayal and try to run away with the entire amount. But if BOTH attempt betrayal, both walk away with nothing.

Watch this and you’ll get it.

My favorite parts:

  1. When Ibrahim calls Nick an idiot over and over.
  2. When it becomes apparent that Nick is far from an idiot.
  3. The host calls £13,600 “wealth”, but that’s beside the point.

I’m certain Nick had it all figured out long before his appearance on the show. Ibrahim falls into the trap set by the game’s creators, but Nick figures out a brilliantly simple combination of psychology and logic that will ensure a “Split” outcome. When the final moment arrives, Ibrahim is almost mind-controlled into choosing “Split”, which Nick does as well, as he planned from the beginning. Each walks away with £6,800, and all is well.

Nick is obviously a good person, and truly did game the system. He had such control over the situation that he could have easily double-crossed Ibrahim at the very end and walked away with all the money, but he didn’t. Try and name another game show where there are two winners instead of one.

Is this an inherent weakness in this particular game’s design? Yes and no. This kind of trick probably wouldn’t work repeatedly on subsequent pairs of contestants, since they would still be just as likely to betray each other. However, Nick did create a unique, first time hack that just took a little bit of clever but honest convincing. Well, honesty wrapped up in a big lie that is.

To bring all this a little closer to home, are there things you can do to make your gamified experience hack-proof? Of course you can come close by thinking like a hack and a cheat, and closing loopholes as best you can. But on the other hand, in a situation like a game show, doesn’t it add to the fun when a perfectly legitimate hack like this is possible? Cheers to Nick for figuring it out, and stealing the show’s biggest secret.

If that kind of “wealth” was on the line, would you Split, or Steal?

PS – I had thought Simon Pegg’s career was going so well, but I guess he has to host TV game shows to make ends meet. He’s looking a bit old, too.

Also, please follow me on Twitter: @justinschier

  • May 4, 2012
  • 0
  • 0

Lifehack – Kill Sore Throats Dead with Heinous But Effective Yellow Listerine

Ok, this one is kind of gross. But try it out and you will thank me.

Ever wake up with a sore throat, and just suffer through the morning until it either goes away or turns more sinister?

Not any more.

If and only if you can handle the burn, try this:

  1. Buy a bottle of Yellow Listerine. It must be the yellow kind – the others do not work.
  2. Take a small amount, swish it around for 2 seconds, then tilt your head back.
  3. Gargle, gargle, and gargle some more until you can’t stand it anymore, about 30 seconds. Make loud noises, make your voice go up and down, feel the burn.
  4. Now spit it out into the sink, and you will see  some gross brown globules in the sink. That’s the hurt leaving your body.
  5. At least part of your throat should start feeling better instantaneously. Miraculously. Immediately.
  6. Repeat steps 2-5 a few more times, until you can’t get any more brown globs.

I’ve known about this trick for about four years, and this method has never failed to completely eliminate my sore throat.

Try it any time, day or night, or even at 4 AM. Let me know how you fare.

Also, please follow me on Twitter: @justinschier

  • May 3, 2012
  • 0
  • 0

Crowdhack – Easily Get Through Any Territorial Concert Crowd

Have you ever held it far too long instead of going to pee, simply because you didn’t want to lose your spot in a crowded concert venue?

People are very territorial and don’t want to let anybody in front of them for any reason. “Nobody gets closer to the stage than me, even if they already had a spot up there!”

This hack only works if there is a way to get to the front SOMEwhere, such as the very side.

This hack works by reversing the crowd’s natural drive not to let anyone in front of them (getting them slightly closer to the stage) — or so they think.

So here it is: Get as close as you can to the stage on one extreme side, either audience left or audience right, but preferably the side closer to where you want to end up. Then just start walking slightly sideways and slightly backwards through the crowd. Say “excuse me” a lot and “my sister is back there” and act like what you’re doing is the most natural thing in the world. People don’t want to see siblings separated. You will be amazed how little resistance you feel compared to struggling forward from the very back!

Try it — never fails for me!

  • April 23, 2012
  • 0
  • 0

How To Install Node.js and Node Version Manager (nvm) and Node Package Manager (npm) on Ubuntu 12.04 LTS Server

Some quick notes to remember how to use the wonderful Node Version Manager by Tim Caswell / creationix to install Node.js, then Node Package Manager (npm).

Note: This setup is best for development directly on Ubuntu Server, which is a setup my situation requires. I plan to write another post on creating a production Node server very soon. If it’s something you need right away, ping me in the comments below and light a fire under me!

  1. Update your system and install prerequisites.
    1
    2
    3
    sudo apt-get update
    sudo apt-get upgrade
    sudo apt-get install openssl libssl-dev
  2. If you haven’t already, install Node Version Manager. We will install specific versions of node with nvm lower down.
    1
    2
    3
    cd ~
    git clone git://github.com/creationix/nvm.git ~/nvm
    . ~/nvm/nvm.sh
  3. Add the last line above line to your .bash_login file. (create if necessary)
    1
    2
    cd ~
    nano .bash_login

    1
    . ~/nvm/nvm.sh
  4. Sign out and back in and you will now be able to execute the nvm command and see the usage options.
    1
    nvm
  5. Check the NodeJS website to see what the latest stable version is.
  6. Install a specific version of node – (beware: this takes several minutes).
    1
    nvm install v0.6.18

    NOTE: If you have problems, and attempt to install Node a second time, something could get botched and you might get an error like “HTTP server doesn’t seem to support byte ranges. Cannot resume.”. The solution is to remove the source files (BE CAREFUL), then try again:
    1
    rm -Rf ~/nvm/src/*
  7. Make the newly installed version your default.
    1
    nvm alias default 0.6.18
  8. Install npm with one line from your home directory(!)
    1
    curl https://npmjs.org/install.sh | sh
  9. If you’re developing in Node, I highly recommend the wonderful nodemon by Remy Sharp for automatically restarting your server when files change.
    1
    npm install nodemon -g
  10. If you’re using the high performance redis adapter, make sure to recompile.
    1
    2
    cd /project/folder
    npm install hiredis

    or alternatively,
    1
    npm rebuild
  11. Test the new version with your code.
  12. See what old Node versions you have installed.
    1
    nvm ls
  13. Uninstall old versions if desired.
    1
    nvm uninstall v0.6.16
  • April 13, 2012
  • 2
  • 5

How To Connect to a Remote MongoDB Server with MongoHub for Mac

There are three parts to this process: Changing the MongoDB Config to accept connections from remote hosts, Allowing port 27017 through your Firewall, and Configuring MongoHub.

 

Written: March 16, 2012
Applies to: Ubuntu 11.10, Mac OS X Lion

Here’s what you need to get started:

  1. Install MongoDB on your Server. There are a million tutorials out there, but here’s the one I used at mongodb.org.
    If you installed with apt-get install mongodb instead of  apt-get install mongodb-10gen here’s how to UNINSTALL the older version after shutting down gracefully so you don’t wind up with an infuriating mongod.lock file.
    1
    2
    3
    4
    5
    6
    mongo
    use admin
    db.shutdownServer()
    sudo apt-get remove mongodb
    sudo apt-get autoremove
    sudo reboot

    Then go ahead and install the mongodb-10gen (latest stable) version.
  2. Download and install MongoHub for Mac OS X.

 

Secure MongoDB.

  1. Start the shell and add an administrative user for the server.
    1
    2
    3
    $ ./mongo
    use admin
    db.addUser("mongoadmin", "anadminpassword")

    Note: On my system, typing ./mongo doesn’t work, but plain mongo does.
  2. Authenticate, still in the shell.
    1
    db.auth("mongoadmin", "anadminpassword")
  3. Configure a specific user for another database.
    1
    2
    use projectx
    db.addUser("joe", "passwordForJoe")
  4. Exit the MongoDB shell.
    1
    exit
  5. Edit the mongodb.conf file to enable authentication.
    1
    sudo nano /etc/mongodb.conf

  6. Uncomment this line.
    1
    auth=true
  7. Restart MongoDB
    1
    sudo /etc/init.d/mongodb restart

Open up Port 27017 on your Firewall

This will be different for everyone. As an alternative, you can run MongoDB on a different port, maybe something that’s already open on your firewall. You can change the port by editing the mongodb.conf file and restarting the server.

Configure MongoHub

  1. Fire up MongoHub.
  2. Click the plus icon in the lower left to add a database.
  3. Fill out the information about your database.

 

That’s it! You can now browse your secure database!

 

References

  • http://www.mongodb.org/display/DOCS/Security+and+Authentication
  • http://blog.aeonmedia.eu/2011/04/mongodb-setup-config-to-connect-by-remote-hosts-debian/
  • http://net.tutsplus.com/tutorials/databases/getting-started-with-mongodb/

 

  • March 16, 2012
  • 0
  • 0

Video: New Google Play

Google’s videos and long-form ads are always excellent, and this is no exception.

A hand crank puts the ad in motion, and archaic gadgets spring to life and connect music, books and movies between all your devices.

  • March 14, 2012
  • 0
  • 0

Load More

Copyright © 2013 Ghost Tx. Powered by WordPress.

  • Twitter
  • Flickr
Back To Top