Skip to content

Instantly share code, notes, and snippets.

yuhonas / filco-media-keys.json
Created Aug 18, 2020
karabiner elements media control keys for keyboards that don't have them eg FILCO TKL
View filco-media-keys.json
"title": "Media Controls for keyboards that don't have it",
"rules": [{
"description": "Function media keys",
"manipulators": [{
"type": "basic",
"from": {
"key_code": "insert",
"modifiers": {
"mandatory": [
yuhonas /
Last active Aug 15, 2019 — forked from uarun/
Zsh Tips & Tricks

Zsh Tips and Tricks

CD'ing to frequently used directories

setopt auto_cd
cdpath=($HOME/<dir1> $HOME/<dir2>)

Now simply from any dir

yuhonas /
Last active Dec 13, 2018
Which TLD should you be using for development and how to use it

Using the right TLD & Tools for Development & Testing

First of all, what TLD’s should you use for development

At the time of writing the list of Reserved TLDs contains 4 different domains specifically for "Testing & Documentation Examples"

  • .test
  • .example
  • .invalid
  • .localhost
function reverse_history_search
history | fzf --no-sort | read -l command
if test $command
commandline -rb $command
bind \cr reverse_history_search
View bash3 boilerplate
#!/usr/bin/env bash
# Bash3 Boilerplate. Copyright (c) 2014,
# See
set -o errexit
set -o pipefail
set -o nounset
# set -o xtrace
yuhonas / mysql2-gem-installation
Last active Apr 12, 2018
Failed to build gem native extension error when installing the mysql2 ruby gem on mac with brew installed mysql
View mysql2-gem-installation
# 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 /
Created Feb 5, 2018
Install node & yarn on amazon linux
#!/usr/bin/env bash
# References
# -------------
set -xe

Keybase proof

I hereby claim:

  • I am yuhonas on github.
  • I am yuhonas ( on keybase.
  • I have a public key ASC5W8h2Rz9fYXMTJlvefOuylYBOktRmXLet6xSE6UztyAo

To claim this, I am signing this object:

yuhonas / gist:5530727
Created May 7, 2013
Bootstrap Rails dialable phone number view helper
View gist:5530727
def dialable_phone_number(number)
:class => 'visible-phone',
:href => "tel:#{number}"
) + content_tag(:span, number, :class => 'visible-desktop')
yuhonas / gist:4324830
Created Dec 18, 2012
GIT Pre-Commit hook to prevent silly commits of binding.pry/debugger
View gist:4324830
# GIT Pre-Commit hook to prevent silly commits of binding.pry/debugger
# Based off
if git rev-parse --verify HEAD >/dev/null 2>&1
# Initial commit: diff AGAINST an empty tree object