All Posts

HighEdWeb Michigan 2016

Had a chance to present at HighWEdWeb Michigan again this year. I had a great time, if you work in Higher Education, I would definitely try to find a regional conference like that to check out.  To be honest, I was dragging my feet about presenting this year, but afterwords I was really glad I did it. I always have a great time, and my presentation turned into a pretty good conversation with a lot of smart developers – can’t complain about that. My slides are below, and it you are looking for a link to the tools I talked about, you can find them on my github page.

 

Jumping Into Local Development

I realize that I am probably at least a few years behind the curve, but my office is finally switching from working directly on a development server to working locally and using git for version control. The last couple of weeks have been fun, and I am finally able to do some of the things that I have wanted to for a while. I thought I might share a few of things that have been most useful, mostly so my coworkers would have a place to find it all.

iTerm

I develop on a MacBook Pro and decided to use the iTerm terminal replacement program. It certainly isn’t necessary, but the biggest reason I like it is I can open split panes, new tabs, or new windows with ease. This lets me keep my commands and ssh sessions organized, which can be really helpful. You can use Cmd+d to open a new vertical tab,  or Cmd+Shift+d to open a horizontal one. The other feature I  have come to like is copy on select. Regardless of whether you use iTerm or the built in terminal, there are a few other things below you can do to make your command line life a little easier.

.bash_profile

Aliases

The first thing I did add some aliases. If you are not familiar with what an alias is or how they work, there are is a good article here.

The first thing I did was upgrade the “ls” command a little bit:

  •  –G enables colors (This might be platform specific, on my MacBook it was –G but on our server it was –color)
  • -F adds symbols to characterize file types. The most obvious is directories with have a trailing / after them, but it will also mark symbolic links, executable files, and a few  others.
  • -h is probably my favorite, it formats file sizes as human readable, so instead of ‘576’ it will read ‘4.5K’ when displaying file types.

So all together the alias is: alias ls=’ls -GFh’

Sublime provides a fairly robust command line tool called ‘subl’ to make it easier to launch files in sublime, so make that a little shorter I created the following alias:

alias st=’/Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl’

I also created some aliases to restart, stop and start my local servers. This saves time if you do something wrong that requires a server reboot. It will vary by your local setup, but for example this restarts my apache and Coldfusion servers:

alias serverrestart='sudo apachectl restart && /Applications/ColdFusion10/cfusion/bin/coldfusion restart'

Git Command Completion

Add this to your .bash_profile to enable git command completion on tab.
source /usr/local/git/contrib/completion/git-completion.bash

Display the git branch and commit status in the command Prompt

#include required libraries
source /usr/local/git/contrib/completion/git-prompt.sh
source /usr/local/git/contrib/completion/git-completion.bash

#enable the commit status
GIT_PS1_SHOWDIRTYSTATE=true
#Display the branch and status to the right of the working directory
export PS1='local: /\W\[\e[0;30m\]$(__git_ps1)\[\e[m\]]\$ '

Do you see the \[\e[0;30m\]? That’s how you see colors in the command prompt, it can be really useful, like setting your remote server to be red so you don’t accidentally delete files from the wrong server. You can learn more here and here.

Adding Some More Color

Git

Based on this excellent article, I added the following to my git config, which makes git color coded and easier to read:

[color]
ui = true
[color]
branch = auto
diff = auto
status = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
[color "status"]
added = yellow
changed = green
untracked = cyan

Vim

Even if you don’t want to, you will probably end up in vim sooner or later, might as well make it pretty!

Sublime Text 2

After watching  Ben Alman live code at jQuery conference last year, I was very intrigued by sublime text. There are a lot of nice features, but so far I have enjoyed the command line integration and the extensibility the most.

Packages

The first thing to do is set up the excellent package control plug-in. After that, adding new plug-ins is as easy as hitting Cmd+Shift+P. The packages I have found useful, in no particular order:

  • BracketHighlighter
  • Coldfusion
  • Enhanced HTML and Coldfusion
  • HTMLAttributes
  • jQuery
  • SublimeLinter

*A quick note about Coldfusion code completion, it didn’t have camelCasing so I fixed that, you can learn more here.

Multiple Cursors

  • Cmd+Click will add a cursor
  • Cmd+double-click with add entire word as highlighted
  • Cmd+Ctrl+G will select all instances of a word in a document

Snippets

I haven’t had a lot of time to plan with these, but I have found the clips2snippets library useful. It takes exported coda clips and translates them into snippets, although it does seem to be more then a little buggy.

SSH

Switching from the excellent  Coda2, one of the biggies I lost was not having the close terminal integration with the remote server, to fix that I have a few tips:

  1. Set up ssh keys to allow password-less logins
  2. Set up a ssh alias to your test server, that way you don’t have to type the long, and usually obscure, name every time.
  3. Update your remote .bash_profile to mimic your local one, nothing is more frustrating then typing an alias on your local machine only to have it yell at you.
  4. Set a color on the remote server’s command prompt so you always know where to go.

Well I think that’s about it for now, I’m sure as I continue to develop locally I will have more resources, so I will try to update the page as I go along.

Bootstrap Icon Search Update

So my  site bootstrapicons.com has been up for a little while, and like all things, there have been some things that I have noticed that could be improved. I also have received some great feedback (Thank you!) that I wanted to incorporate into the system. So, I have been working really hard on it lately (okay so maybe “really hard” is relative, but I spent a few night drinking red wine and tinkering with it) and have a new release. Feel free to head over to http://bootstrapicons.com  and check out the changes.

Here is a little list of the new features:

  • Added support for bootstrap 3.0.2 icons
  • Added support for font awesome 4.0.3 icons
  • Updated the search to use tabs that allow all sets to be search without reentering the search terms
  • Added a tag index page
  • Smoothed out some of the design
  • Did some housekeeping on the tag approval/admin side

November: 6:00 AM Wakeup

The return of the monthly challenges!

So this month I decided, somewhat randomly, to try a monthly challenge again. I’m not sure what brought it about, but I decided to try getting up at 6:00 every morning. Now, this may not seem like it is that challenging, but to a night owl like me, it was a serious shift in habit. I usually would roll out of bed around 7 and then get ready during the week, but the weekends were fair game for a 9:00 am wake up call. So this month, I will try and get up at 6:00 every morning.

Update: 12/3/2013

Well this has been a busy month, and a few times, I cursed myself for deciding to do this whole challenge thing this month. Overall though, after the first few days it wasn’t so bad. There were a few mornings I didn’t quite make it; usually on the weekend if I was out late, but other than that it went pretty smooth. Will I keep doing it? Maybe, I just bought a house so I have been busy and getting up that early has helped me still get to the gym, but we will see how long that lasts!