Skip to content

Instantly share code, notes, and snippets.

View bradherman's full-sized avatar

Bradley Herman bradherman

View GitHub Profile
@bradherman
bradherman / blur.rb
Created August 10, 2016 05:04 — forked from christianroman/blur.rb
Blurring images in Rails with Paperclip custom processor
module Paperclip
class Blur < Processor
def initialize file, options = {}, attachment = nil
super
@format = File.extname(@file.path)
@basename = File.basename(@file.path, @format)
end
# OSX for Hackers (Mavericks/Yosemite)
#
# Source: https://gist.github.com/brandonb927/3195465
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Ask for the administrator password upfront
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
green='\033[0;32m'