Skip to content

Instantly share code, notes, and snippets.

View yuhonas's full-sized avatar

Clint Plummer yuhonas

View GitHub Profile
#!/usr/bin/env bash
# Bash3 Boilerplate. Copyright (c) 2014, kvz.io
# See https://kvz.io/blog/2013/11/21/bash-best-practices/
set -o errexit
set -o pipefail
set -o nounset
# set -o xtrace
@yuhonas
yuhonas / mysql2-gem-installation
Last active April 12, 2018 00:32
Failed to build gem native extension error when installing the mysql2 ruby gem on mac with brew installed mysql
# ensure we have xcode commandline tools installed as we'll be compiling
xcode-select --install
# we can either install the gem manually eg.
# where '0.3.21' is the version of the gem you wish to install
#
# gem install mysql2 -v '0.3.21' -- \
# --with-mysql-config=$(brew --prefix mysql)/bin/mysql_config
@yuhonas
yuhonas / install-yarn.sh
Created February 5, 2018 03:50
Install node & yarn on amazon linux
#!/usr/bin/env bash
# References
# -------------
# https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/setting-up-node-on-ec2-instance.html#w2ab1c23b7c10
# https://gist.github.com/sealocal/0cd468ba4f12cdada436aebe534b40da
set -xe
NODE_VERSION=v9.3.0

Keybase proof

I hereby claim:

  • I am yuhonas on github.
  • I am yuhonas (https://keybase.io/yuhonas) on keybase.
  • I have a public key ASC5W8h2Rz9fYXMTJlvefOuylYBOktRmXLet6xSE6UztyAo

To claim this, I am signing this object:

@yuhonas
yuhonas / gist:5530727
Created May 7, 2013 06:57
Bootstrap Rails dialable phone number view helper
def dialable_phone_number(number)
content_tag(:a,
number,
:class => 'visible-phone',
:href => "tel:#{number}"
) + content_tag(:span, number, :class => 'visible-desktop')
end
@yuhonas
yuhonas / gist:4324830
Created December 18, 2012 03:48
GIT Pre-Commit hook to prevent silly commits of binding.pry/debugger
#!/bin/sh
# GIT Pre-Commit hook to prevent silly commits of binding.pry/debugger
# Based off http://mark-story.com/posts/view/using-git-commit-hooks-to-prevent-stupid-mistakes
if git rev-parse --verify HEAD >/dev/null 2>&1
then
AGAINST=HEAD
else
# Initial commit: diff AGAINST an empty tree object
@yuhonas
yuhonas / gist:4122118
Created November 21, 2012 00:00
iTerm / Sublime AppleScript
tell application "System Events"
# create an iTerm session if we dont have one
if not (exists (processes where name is "iTerm")) then
tell application "iTerm" to (make new terminal)
end if
tell application "iTerm"
activate
tell the current terminal
set SublimeSessionName to "sublime"