Skip to content

Instantly share code, notes, and snippets.

View MicahBrown's full-sized avatar

Micah Brown MicahBrown

  • Manhattan, KS
  • 07:44 (UTC -05:00)
View GitHub Profile
# this scrubs emoji sequences from a string - i think it covers all of them
def strip_emoji ( str )
str = str.force_encoding('utf-8').encode
clean_text = ""
# emoticons 1F601 - 1F64F
regex = /[\u{1f600}-\u{1f64f}]/
clean_text = str.gsub regex, ''
@rsutphin
rsutphin / tag_and_push_tag.cap
Last active April 18, 2018 13:08
A capistrano 3 task to tag the repo after every deploy
# Requires Capistrano 3.2 or later
namespace :deploy do
after :finishing, :tag_and_push_tag do
on roles(:app) do
within release_path do
set(:current_revision, capture(:cat, 'REVISION'))
# release path may be resolved already or not
resolved_release_path = capture(:pwd, "-P")