On some projects we have a mixture of OSX and Windows development machines. Normally, this isn’t a problem because we develop inside a VM so we don’t need to worry about inconstancies between our development environments and production. The issue is that OSX machines do much better if you’re using nfs instead of the virtualbox provider. Unfortunately, Windows doesn’t support NFS natively so we need to have some way to determine if the machine is running on an OSX host.
Read MoreOne of the great things about Sublime Text is that it’s intelligent enough to look at the file you’ve opened and provide context sensitive.
Read MoreThe other day I rebuilt a VM that we’re managing using Ansible and when we tried to have Ansible reset it’s configuration we received the following error:
Ansible doesn’t provide a good explanation of how to fix this but the issue resolves around the fact that the IP address stayed the same but when the server was rebuilt the SSH keys changed and there’s a conflict in the known_hosts file.
If you attempt to SSH into the box as that user SSH will help you fix the problem:
Then running the ssh-keygen
command removes the bad entry:
And finally we can now run Ansible and it will connect!
I received an interesting error a couple days ago when I tried to push to GitHub:
It turns out that I accidentally committed a MySQL dump file that I grabbed from our development server. GitHub only allows for 100 MB file which is totally understandable but now I'm stuck with a 118 MB file in my repo with no way to push it to GitHub. It turns out with some command line fu you can remove a file completely from a repo:
At which point you can push the file to GitHub.
So I added a new file to a repo today and it turns out GitHub changed from 100 MB to 50 MB. I've updated the title and included this so hopefully people will find it.
The user settings are a powerful tool for overriding some of Sublime’s default settings with ones that make it easier for you to work.
Read MoreWhen we’re on boarding new programmers we always institute a code review process where at least one programmer experienced with the project reviews the work of the new programmer. We use GitHub’s Pull Request feature to help us do this. Most of the changes are easy for us to review and then approve or tell the programmer they need to make changes. Every so often we run into a file where GitHub lets us down (really I don’t know what else they would do here :-)):
The issue was that this particular file had it’s line endings changes on the master branch but not the pull request branch it was messing up the whole system. To try and make sense of all the changes we had to resort to using the command line:
git diff "pr/#" master -w -- file\path\here > temp.txt
This command is calculating the differences in the file (“file\path\here”) between the pull request branch (“pr/#”) and the master branch but it’s ignore all whitespace when comparing the two (“-w”).
This produced a much shorter (20 lines) list of changes which we then had to manually merge in but at least the programmer didn’t loose all their work.
This Programming Thing is a labor of love but it costs money to host the site. If you would like to help us offset some of our costs and you need a virtual server from DigitalOcean please use the link below.
I know what you’re thinking. How can right clicking make me more efficient in Sublime Text.
Read MoreAs knowledge workers, there’s a huge benefit to us knowing how to do things are quickly as possible in our environments of choice. It doesn’t mater if that’s an IDE or Excel every second saved can really add up.
I use Sublime Text every day at work and some days when I’m not working (today I’m off work but I’m working on this post using Sublime Text) so I thought it would be a good place to start. The goal is to release short posts every week so instead of having to digest a HUGE article with tips you can learn a few and them apply those to your daily work. Some of my examples will be geared towards PHP developers specifically but I think most will be applicable to anyone using Sublime Text.
If you feel like I’ve forgotten something or want something added please feel free to leave a comment on this page and we’ll add it.
subscribe via RSS