Monthly Archives: May 2013

I’ve been things and seen places

Link dump for May 2012. Some of these have been sitting on a browser tab for months and simply needed to be moved for posterity.

Time Management & Business Development

  • Momentum is a hell of a drug An amazing article by Zack Shapiro that points to the fact that success builds on success.
  • 26 Time Management Hacks Time management is one of the other major subjects I have been studying as I grow my own business. There are a couple good ideas in this slideshow, and a bunch of retread.
  • Spending Time Efficiently Ideas about how to better spend the time you are wasting. However, already remember that the time you ENJOY wasting is NOT wasting time!
  • Rainy Day Ideas for Growing Your Business Some suggestions on things to help grow your business when you find some extra time on your hands.
  • The $5 Guerrilla User Test Hallway usability tests are the basis for much design methodology for new tech startups. This is an improvement on that idea when you are needing to bring your testing to the next “level.”
  • Productivity Hacks for Startup Dads Some nice tips on being productive, a father, and a business founder… all at the same time.
  • The Power of Habit Adding to my already unfinishable reading list. Change your habits to change your life.
  • The Rands Test Evaluate how well your company communicates between management and their creators.

Technology

  • Building Handbrake on Fedora 18 I was going to write this tutorial myself, but then I found somebody already had. If you backup your DVD collection, Handbrake is the easiest of all the tools you can use.
  • The Fish Shell An interesting replacement for the Bourne Again Shell.
  • GitLab.org The software that I am in the process of replacing my old Git repository manamgement with.
  • Linux Web Media Players Quick overview on setting up Netflix, Hulu, and Amazon to use on a Linux Media Player (for example XMBC or LinuxMCE.)
  • Video Screencasting with Vokoscreen Screencasting tool for Linux. Currently in Beta.
  • Building a SIP/Raspberry Pi Phone Using Twilio, Asterisk, FreePBX, and the Obihai OBi100. The extendability options are endless (how many thousands of businesses run Linux based FreePBX/Asterisk without even knowing it.)
  • Shell Helpers Copy and paste from your command line directly to Klipper on KDE!

Application Development

  • ownCloud OpenSource Dropbox replacement that can be hosted on your own hardware. Includes a plugin interface that dramatically extends the functionality.
  • Big O Complexity A cheat sheet for search algorithm time complexity.
  • Statistical Formulas for Programmers Because to many developers think Excel SUM is sufficient for data reporting.
  • The RESTful CookBook It is scary how much of my development time is mixed between REST and JSON. This is a pretty good “Cookbook” style web document on REST implementation recipes.
  • GruntJS Task Stager Setup your build staging pipeline with a Node.js task runner. Helps with things like minifying, compiling CoffeeScript, and unit testing.
  • Pure, Responsive CSS Fairly new CSS framework for responsive web design.
  • Git Tips Git tips that can keep you from getting fired. Things like setting up git hooks and file level ignore. CHECK OUT THE COMMENTS, some of the tips are even better than the article.

Other Stuff

  • The Perfect Mojito I have never been a fan of Mojitos but we had the mint and decided to try one from scratch. WOW… Just WOW! They are amazing when you don’t use one of the store bought mixes… and good rum!

GitLab on Fedora 18

I am using a RackSpace cloud running Fedora 18 to install GitLab are a replacement for GroundWarp’s Gitolite server.  Here are some install instructions for getting it running on CentOS6/RHEL6 (the commerical systems based on Fedora.) iconv-devel

Dependency Installation:

Start by doing yum install/groupinstall the following packages and any dependencies they find.

  • yum install ruby mysql -server git redis ruby-devel
  • yum groupinstall “Development Tools”
  • yum install mysql libxslt-devel libyaml-devel libxml2-devel gdbm-devel libffi-develzlib-devel openssl-devel libyaml-develreadline-devel curl-devel openssl-devel pcre-develmemcached-devel valgrind-devel mysql-devel ImageMagick-devel ImageMagick libicu libicu-devel libffi-devel rubygem-bundler

Start your database servers and configure them to start on boot.

systemctl start redis.service
systemctl enable redis.service
systemctl start mysqld.service
systemctl enable mysqld.service

MySQL Server Setup:

Start by logging into the mysql shell:

mysql -u root

Then we create the database we will need, and create a user who can edit/manage that database.

create database gitlabdb;
grant usage on *.* to gitlabuser@localhost identified by “inventapasswordhere”;
grant all privileges on gitlabdb.* to gitlabuser@localhost;

Service User and SSH Configuration:

Create the user account that the GitLab service will be running under.  This will also be used to build some of the necessary dependancies. After creating the user switch to that user’s login.

useradd git
passwd git
su -l git

From here forward (unless otherwise specified) make sure you are logged in as the git user.  The remaining configuration is done as that user.

The next steps are required for setting up the SSH keys pairs for your user account (git uses SSH in the background for most of its tasks.)  Choose the defaults, but make sure to supply a paraphrase (not just a password) when prompted by ssh-keygen.

ssh-keygen
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys

GitLab Shell:

gitlab-shell needs to be installed built/installed for this user.  The following steps sets everything up and builds the packages directly from github (which is the easiest way honestly.)

cd ~
mkdir gitlab-shell
git clone https://github.com/gitlabhq/gitlab-shell.git gitlab-shell/
cd gitlab-shell
cp config.yml.example config.yml

Now you are going to want to use a text editor (nano,vim, etc…) to edit the following change to your config.yml file.

gitlab_url: “http://yourdomainforgitlab.com/”

Now run the gitlab-shell installer

./bin/install

Download & Configure GitLab:

Next we will setup our gitlab folders, download Gitlab, and begin configuring it to our set-up

cd ~
mkdir gitlab-satellites
mkdir gitlab
git clone https://github.com/gitlabhq/gitlabhq.git gitlab.
cd gitlab
git checkout 5-2-stable
mkdir tmp/pids/
mkdir public/uploads/
mkdir tmp/sockets/
chown -R git.git log/ tmp/
chmod -R u+rX log/ tmp/ public/uploads/
cp config/gitlab.yml.example config/gitlab.yml

Next you will need to make changes (again with your text editor) to the newly copied config/gitlab.yml file.

host: git.yourdomain.com
email_from: gitlab-noreply@git.yourdomain.com
support_email: you@yourdomain.com

Database Configuration:

Our next steps involve configuring the GitLab application database interfaces (remember there are two) and creating initial data entries.

cd ~/gitlab
cp config/puma.rb.example config/puma.rb
cp config/database.yml.mysql config/database.yml

Now configure your database file (the database.yml file you just copied) using your text editor and change the following settings under the production header. (Comment out all the lines under development and testing):

database: gitlabdb
username: gitlabuser
password: “YourSuperSecretPasswordFromTheDatabaseSetupAbove”

We need to install a couple Ruby gems and then  initialize the database.  You do this by running the following commands (note the “without” command tells the bundle to NOT install PostgreSQL gems.):

gem install charlock_holmes –version ‘0.6.9.4’
gem install thor –version ‘0.18.1’

gem install rb-inotify
bundle install –deployment –without development test postgres
bundle exec rake gitlab:setup RAILS_ENV=production

Git Environment Setup:

We need to setup a couple of environmental variables for our local git user. Simply type this:

git config –global user.name “GitLab”
git config –global user.email “gitlab-noreply@git.yourdomain.com”