Subscribe to Technology

Multiple SSH proxying in Drush and Capistrano

TL;DR in this article I show how to use SSH's ProxyCommand option in Drush 's aliases and in Capistrano 's host options in order to easily access hosts that are NAT-ed (multiple times). What are Drush and Capistrano? At Twinbit we use a customized version of Capistrano (V2) in order to deploy our projects. Furthermore, when the project is based on Drupal we also leverage the power of Drush . Drush is a very useful commandline tool that can operate on different Drupal installations. The operations that Drush can do are many and varied, and 90% of the time those operations are run at development time against your local Drupal installation, but sometimes it's useful to easily leverage Drush's power on another (remote) installation, be it another dev environment, staging or production. Drush lets you do this by using the concept of aliases. Simply stated, drush aliases are collection of options for a (possibly remote) Drupal installation; some of these options let you specify how exactly the host should be reached using SSH. You can get all the information you need regarding aliases running drush aliases docs-aliases ; from there you can see that drush is very customizable, to the...

Multiple SSH proxying in Drush and Capistrano

TL;DR in this article I show how to use SSH's ProxyCommand option in Drush 's aliases and in Capistrano 's host options in order to easily access hosts that are NAT-ed (multiple times). What are Drush and Capistrano? At Twinbit we use a customized version of Capistrano (V2) in order to deploy our projects. Furthermore, when the project is based on Drupal we also leverage the power of Drush . Drush is a very useful commandline tool that can operate on different Drupal installations. The operations that Drush can do are many and varied, and 90% of the time those operations are run at development time against your local Drupal installation, but sometimes it's useful to easily leverage Drush's power on another (remote) installation, be it another dev environment, staging or production. Drush lets you do this by using the concept of aliases. Simply stated, drush aliases are collection of options for a (possibly remote) Drupal installation; some of these options let you specify how exactly the host should be reached using SSH. You can get all the information you need regarding aliases running drush aliases docs-aliases ; from there you can see that drush is very customizable, to the...

Storing sensitive data in a git repository using git-crypt

TL;DR in this article I show how to use git crypt to store sensitive data in a git repo. I describe the steps using the context of my dotfiles repository but the same thing can be done to store any other kind of sensitive data inside any other git repository. The context In my previous article I showed how to use a git repository to store your dotfiles. Someone in the comments pointed out the fact that you should pay attention not to commit sensitive data inside your dotfiles repo. Indeed, dotfiles usually end up containing several pieces of sensitive data related to your company or your clients. Examples of this are ssh private keys , aws certificates , api credentials , ... The list goes on, inside your personal dotfiles repo you may also want to store personal data like your password wallet data. In this article I will describe how to store sensitive data in your dotfiles git repo, but this is just an example, you can use the approach outlined here to store any other kind of sensitive data inside any other git repository. The way I solved this issue in the past was to use another "private" repository, nested inside the main one as a submodule. As you can see from this old blob...

Storing sensitive data in a git repository using git-crypt

TL;DR in this article I show how to use git crypt to store sensitive data in a git repo. I describe the steps using the context of my dotfiles repository but the same thing can be done to store any other kind of sensitive data inside any other git repository. The context In my previous article I showed how to use a git repository to store your dotfiles. Someone in the comments pointed out the fact that you should pay attention not to commit sensitive data inside your dotfiles repo. Indeed, dotfiles usually end up containing several pieces of sensitive data related to your company or your clients. Examples of this are ssh private keys , aws certificates , api credentials , ... The list goes on, inside your personal dotfiles repo you may also want to store personal data like your password wallet data. In this article I will describe how to store sensitive data in your dotfiles git repo, but this is just an example, you can use the approach outlined here to store any other kind of sensitive data inside any other git repository. The way I solved this issue in the past was to use another "private" repository, nested inside the main one as a submodule. As you can see from this old blob...

Your dotfiles and you

TL;DR this is an introductory article describing what dotfiles are and why you should treat them as a life long software project.

What's a dotfile anyway? Using the words of Zach Holman , "Dotfiles" are the funky little files in your *nix-based home directory that allow you to customize your nerdery: change how your prompt looks, set up your $PATH, adjust settings for Ruby's IRB, completely change everything about Vim, and about a billion and a half other things. They're fun. We're usually talking about files like .bashrc , .zshrc , .gitconfig , .vimrc and the .vim/ directory, .inputrc , .ssh/config , .tmux.conf , ... but really every configuration file that is being read during initialization is a dotfile (also called rc files). Sublime Text has its set of dotfiles, for example. Ok, so what? The assumption that I'm making in this article is that there is value in editing your dotfiles, altering the default behaviour of the programs you use in your day to day basis so that you can be more productive. After all if you are reading this article you might very well be a developer or a technology professional of some kind, and what we do on a daily basis is providing value by automating things, streamlining processes, making things more efficient. So customizing your dotfiles really is applying to your...

Your dotfiles and you

TL;DR this is an introductory article describing what dotfiles are and why you should treat them as a life long software project.

What's a dotfile anyway? Using the words of Zach Holman , "Dotfiles" are the funky little files in your *nix-based home directory that allow you to customize your nerdery: change how your prompt looks, set up your $PATH, adjust settings for Ruby's IRB, completely change everything about Vim, and about a billion and a half other things. They're fun. We're usually talking about files like .bashrc , .zshrc , .gitconfig , .vimrc and the .vim/ directory, .inputrc , .ssh/config , .tmux.conf , ... but really every configuration file that is being read during initialization is a dotfile (also called rc files). Sublime Text has its set of dotfiles, for example. Ok, so what? The assumption that I'm making in this article is that there is value in editing your dotfiles, altering the default behaviour of the programs you use in your day to day basis so that you can be more productive. After all if you are reading this article you might very well be a developer or a technology professional of some kind, and what we do on a daily basis is providing value by automating things, streamlining processes, making things more efficient. So customizing your dotfiles really is applying to your...