TDD Scaffold
November 25, 2016

At some point you’ll probably need to create new Classes or Modules in Ruby. You might even string these Objects together into an MVC.

And if you’re using a Test Driven Development workflow, you would most likely be using a testing suite like the wonderful RSpec.

I originally wrote an executable Ruby script to scaffold Ruby objects and their related RSpec tests. This project has now been published as a Ruby Gem. And of course, the code is available on GitHub.

$ gem install tdd_scaffold

Text Editors and IDEs
November 22, 2016

I’ll show you some of the differentiating features of some of the popular text editors being used by web developers these days: Sublime Text, Atom, and Visual Studio Code.

Sublime Text

Spell Check

There are a couple of ways to enable spell check in Sublime.

Syncing Sublime Text with Dropbox

$ mkdir ~/Dropbox/Shared/Sublime
$ mv ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/User ~/Dropbox/Shared/Sublime
$ ln -s ~/Dropbox/Shared/Sublime/User ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/User

Sublime syncing reference

Preferences.sublime-settings - User

{
    "auto_complete_delay": 35,
    "font_size": 14,
    "binary_file_patterns":
    [
        "*.gzip",
        "*.tbz2",
        "bower_components/*",
        "build/*",
        "dist/*",
        "generated/*",
        "node_modules/*",
        "tmp/*",
        "i18n/*"
    ],
    "bold_folder_labels": true,
    "caret_style": "phase",
    "color_scheme": "Packages/User/Color Highlighter/themes/Monokai (SL).tmTheme",
    "fade_fold_buttons": false,
    "highlight_line": true,
    "highlight_modified_tabs": true,
    "ignored_packages":
    [
        "Markdown",
        "Vintage"
    ],
    "line_padding_bottom": 1,
    "line_padding_top": 1,
    "rulers":
    [
        80
    ],
    "save_on_focus_lost": true,
    "spell_check": true,
    "tab_size": 2,
    "theme": "Soda Dark 3.sublime-theme",
    "translate_tabs_to_spaces": true,
    "trim_trailing_white_space_on_save": true
}

Atom

Auto Indenting

To enable auto indenting in Atom, add to the Atom Keymap at Atom > Keymap...

'atom-text-editor':
  'ctrl-cmd-]': 'editor:auto-indent'

Then use Ctrl + Cmd + ] to auto indent.

Syncing Atom with Dropbox

To sync text editor settings across machines, it’s possible to move the app settings directory to Dropbox then symbolically link to where the settings file used to be.

$ mkdir ~/Dropbox/Shared/Atom
$ mv ~/.atom ~/Dropbox/Shared/Atom
$ ln -s ~/Dropbox/Shared/Atom ~/.atom

Atom syncing reference

Visual Studio Code

Syncing Visual Studio Code with Dropbox

$ mkdir ~/Dropbox/Shared/Code/User
$ mkdir ~/Dropbox/Shared/Code/.vscode/extensions
$ mv ~/Library/Application\ Support/Code/User ~/Dropbox/Shared/Code
$ ln -s ~/Dropbox/Shared/Code/User ~/Library/Application\ Support/Code/User
$ mv ~/.vscode/extensions ~/Dropbox/Shared/Code/.vscode
$ ln -s ~/Dropbox/Shared/Code/.vscode/extensions ~/.vscode/extensions

Visual Studio Code syncing blog post

settings.json - User

{
    "workbench.iconTheme": "vscode-icons",
    "atomKeymap.promptV3Features": true,
    "editor.multiCursorModifier": "ctrlCmd",
    "editor.formatOnPaste": true,
    "editor.tabSize": 2,
    "editor.fontSize": 14,
    "files.autoSave": "onFocusChange",
    "search.exclude": {
        "**/build": true,
        "**/generated": true,
        "**/dist": true,
        "**/public": true,
        "**/.public": true,
        "**/tmp": true,
        "**/logs": true,
        "**/node_modules": true,
        "**/bower_components": true
    },
    "files.exclude": {
        "**/.git": true,
        "**/.svn": true,
        "**/.hg": true,
        "**/CVS": true,
        "**/.DS_Store": true,
        "**/._.DS_Store": true,
        "**/node_modules": true,
        "**/bower_components": true,
        "**/build": true,
        "**/dist": true,
        "**/public": true,
        "**/.public": true,
        "**/target": true,
        "**/tmp": true,
        "**/logs": true,
        "**/.eyeglass*": true,
        "**/.gradle": true
    }
}

Kodi Add-ons
September 21, 2016

Kodi is a thriving, open-source media center which allows users to watch Movies, TV Shows and other content, free of charge.

Amazon’s Fire TV is one of the least expensive Kodi streaming devices. You can find step-by-step guides for installing Kodi on YouTube.

Kodi is updated periodically, to track the status of Kodi versions, see the releases page.

Movies & TV Shows

The most reliable add-ons that I have found for streaming Movies and TV Shows are Exodus and Phoenix.

Both Exodus and Phoenix can be installed via Fusion Installer.

You may also consider Super Repo for an additional centralized list of add-ons.

Live Sports

For Live Sports, the most reliable add-on that I have tried is SportsDevil.

Kodi can be a bit confusing at first, so explore and give it a little time! If you have questions or suggestions, please send them my way.

Django Geographic Models
March 27, 2016

Many projects will at some point require Country or Language lookup. I created a reusable Django app as a quick way to include this functionality. Below are the Models and related Fixtures.

Full version: django-atlas