Open Files in TextMate 2 with A Single Click
To open files with a single click from the file browser inside of TextMate 2 run this command from the terminal
defaults write com.macromates.TextMate.preview fileBrowserSingleClickToOpen -bool true
And to turn it off
defaults write com.macro...
Written by Sean Behan on 11/04/2013
How To Create Blurry Background Images Programmatically from the Command Line or with Ruby
Turn this
into this
You can use ImageMagick to make blurry images.
To install with Homebrew on OS X.
brew install imagemagick
After installing you can run from the command line
convert yourimage.png -channel RGBA -blu...
Written by Sean Behan on 08/24/2013
How to Flush or Erase Cache of Your XCode iOS or MacOS Cocoa App
If you're working with an XCode application, either iOS or MacOS, and want to do a completely clean build and delete the cache, it's simple.
Execute this command from the command line..
defaults delete your.apps.bundle.id
Where "your.apps.bundl...
Written by Sean Behan on 06/08/2018
How to Calculate Age with PHP
Calculate age in PHP
$your_birthday = '1982-08-29';
$difference = date_diff(date_create(), date_create($your_birthday));
$age = $difference->format('%Y');
// 35
Short and sweet
Written by Sean Behan on 11/11/2017
How To Use Rake to Run Your Test Suite with Sinatra
If you're using Sinatra and you want to use rake to run your test suite, you will need to create a Rakefile and put this in it.
require 'rake/testtask'
task :default do
ENV['RACK_ENV'] = 'test'
Rake::Task['test'].invoke
end
Rake::Test...
Written by Sean Behan on 08/22/2013