Self-Hosting Git Repos and Installing GitList for a Web Interface

Hosting your git repositories yourself is as simple as git init --bare (or git clone --bare for existing repos) in a directory on your server, and then adding the remote to your local repo: git remote add myServer ssh://me@server.address/path/to/repo/project.git.

Having your repos on GitHub too makes for a nice redundancy (or on any other git server), and a remote on your server, on GitHub and a local copy makes for three redundancies. You can push to multiple remotes by adding a few lines in your project’s git config.

Continue reading Self-Hosting Git Repos and Installing GitList for a Web Interface

Game Development – Text-based Level Editing and Phaser JS

How I visually represent a level's layout through text (think ASCII art or Nethack) and use the Phaser JS game engine to render it to a canvas.

If you are familiar with roguelikes (turn-based dungeon crawlers) such as Nethack, then you are no doubt familiar with the idea of a game's elements being displayed entirely as ASCII characters.

Here I will explain how I use a similar approach to create the layout of rooms in a game I am working on and how I use Phaser (JS game engine) to render the rooms based on my layouts.

Continue reading Game Development – Text-based Level Editing and Phaser JS

Chromebook Linux – From Crouton to GalliumOS

How I finally got to use my Chromebook as a full-featured Linux machine.

I love my Chromebook; I bring it everywhere as it comes in handy for long commutes and, weighing in at around 3 pounds, isn’t the least bit cumbersome.

However, the restrictions ChromeOS placed on me had been noticeable since the beginning; and I knew I would be restricted to Chrome Apps, extensions, and Play store applications, but didn't count on how annoying this restriction would wind up being. Fortunately, there were workarounds.

Continue reading Chromebook Linux – From Crouton to GalliumOS

Enabling in-line PHP parsing with Nginx

My Environment

  • Nginx version
    • 1.10.0
  • PHP version
    • 7.0
  • FastCGI processor
    • php7.0-fpm
  • Kernel
    • Ubuntu 16.04

The First And More Obvious Step

To enable parsing of PHP in HTML files, editing a server block’s location block to include files with an HTML extension should be sufficient.
For example:

# /etc/nginx/sites-available/
location ~ \.(php|html)$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/run/php/php7.0-fpm.sock;

However, since I am working with PHP 7, whose full name is “php7.0” (which is usefully descriptive but makes things tricky when initially looking for related directories or daemons), I had an extra step in order to make this work. And apparently, all PHP versions, from late php5.* to php7.0, will require this extra step.

Continue reading Enabling in-line PHP parsing with Nginx

Chromebook Web Development

A breakdown of my current web development setup on my Samsung Chromebook 3.

Quick Rundown

  • Machine:
    • Samsung Chromebook 3
  • Environment:
    • ChromeOS for a GUI and native drivers
    • Lubuntu for server-side programs and scripts (treated as headless)
  • Text Editor/IDE

I recently purchased a Samsung Chromebook 3 so I could work on projects during my long commute or at my local coffee shop without worrying about losing or breaking my other more expensive portable machine. It’s really nice and light, and with a little configuration, makes for a great portable web development environemnt. After all, ChromeOS is itself a linux distro, but things are a little hidden in this environment as ChromeOS is meant to be easily accessible and to leave the user as little room as possible to screw things up.

Continue reading Chromebook Web Development

Quick and Custom AddThis Setup

Set up AddThis sharing with fully customized styles and capabilities to match your website’s design and content needs.

Getting AddThis sharing set up exactly how I wanted took some digging the first time around. Maybe, like me, you wanted AddThis's functionality but with your own styles, and not the AddThis brand buttons. Here's how I set it up, allowing for full customization.

Continue reading Quick and Custom AddThis Setup

Animating with GreenSock

Originally written for The Charles NYC.

I’ve recently been introduced to animating with the powerful JavaScript library GreenSock. It’s quite impressive, notably for how manageable its animations are. Unlike CSS3, which measures its animations with percentages, GreenSock uses seconds for timing. GreenSock is also capable of applying multiple animations to a single element, each running either consecutively or simultaneously, which is something CSS3 is not capable of either.

Continue reading Animating with GreenSock