Skip to content

Instantly share code, notes, and snippets.

View brayhoward's full-sized avatar

Brandon R. Howard brayhoward

View GitHub Profile
@brayhoward
brayhoward / Correct_GnuPG_Permission.sh
Created July 28, 2020 22:51 — forked from oseme-techguy/Correct_GnuPG_Permission.sh
This fixes the " gpg: WARNING: unsafe permissions on homedir '/home/path/to/user/.gnupg' " error while using Gnupg .
#!/usr/bin/env bash
# To fix the " gpg: WARNING: unsafe permissions on homedir '/home/path/to/user/.gnupg' " error
# Make sure that the .gnupg directory and its contents is accessibile by your user.
chown -R $(whoami) ~/.gnupg/
# Also correct the permissions and access rights on the directory
chmod 600 ~/.gnupg/*
chmod 700 ~/.gnupg
@brayhoward
brayhoward / iterm2.md
Created June 5, 2018 14:18 — forked from squarism/iterm2.md
iterm2 cheatsheet

Tabs and Windows

Function Shortcut
Fullscreen + Enter
Previous Tab + Left Arrow
Next Tab + Right Arrow
Go to Tab + Number
Go to Window + Option + Number
Go to Split Pane by Direction + Option + Arrow
@brayhoward
brayhoward / MySQL_macOS_Sierra.md
Created February 26, 2018 16:42 — forked from nrollr/MySQL_macOS_Sierra.md
Install MySQL on Sierra using Homebrew

Install MySQL on macOS Sierra

This procedure explains how to install MySQL using Homebrew on macOS Sierra 10.12

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.

Install MySQL

At this time of writing, Homebrew has MySQL version 5.7.15 as default formulae in its main repository :

@brayhoward
brayhoward / osx_bootstrap.sh
Created January 17, 2018 01:32 — forked from codeinthehole/osx_bootstrap.sh
Script to install stuff I want on a new OSX machine
#!/usr/bin/env bash
#
# Bootstrap script for setting up a new OSX machine
#
# This should be idempotent so it can be run multiple times.
#
# Some apps don't have a cask and so still need to be installed by hand. These
# include:
#
# - Twitter (app store)
@brayhoward
brayhoward / README.md
Created September 18, 2017 15:58 — forked from rafmagana/README.md
This is a way to call the Heroku command-line utility adding the name of the Heroku App automatically.

Heroku command-line wrapper with app name

This is a kind of second version of https://gist.github.com/4208338, but in this version you don't need to call projectName_production or projecName_staging only production or staging.

How to make it work

If you have git remotes called production, staging and development already, then then the only thing you have to do is to source heroku_command_line_wrapper_with_app_name.sh in your .bash_profile or .bashrc:

source /path/to/heroku_command_line_wrapper_with_app_name.sh
@brayhoward
brayhoward / mixin-fluid-typography.scss
Created September 11, 2017 21:57 — forked from italodr/mixin-fluid-typography.scss
A mixin for Mike Riethmuller fluid typography
@mixin fluid-type($min-font-size, $max-font-size, $min-vw: 480px, $max-vw: 1200px) {
$u1: unit($min-vw);
$u2: unit($max-vw);
$u3: unit($min-font-size);
$u4: unit($max-font-size);
@if $u1 == $u2 and $u1 == $u3 and $u1 == $u4 {
font-size: $min-font-size;
@if $min-vw != $max-vw {
@brayhoward
brayhoward / tts.js
Created August 4, 2017 12:55 — forked from dotproto/tts.js
ES2015 Text to Speech bookmarklet (Ctrl+S). Set up: Copy and paste the contents of this gist into a new bookmark. Use: Select some text and click the bookmarklet to start speaking. Once activated on a page, you can use Ctrl+S to speak the selected text. Speech Synthesis API Info: https://developers.google.com/web/updates/2014/01/Web-apps-that-ta…
javascript: {
/* Adjust voice speed. Default = 1 */
var speed = 2.5;
if (window.runTTS === undefined) {
/* Text to Speech function. Adjust the value of msg.rate to increase/decrease the playback speed. */
window.runTTS = () => {
const text = window.getSelection().toString();
body {
color: #212121;
font-family: "Helvetica Neue", "Calibri Light", Roboto, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
letter-spacing: 0.02em;
}
@brayhoward
brayhoward / restful_routes.md
Created October 30, 2016 22:48 — forked from alexpchin/restful_routes.md
7 Restful Routes
URL HTTP Verb Action
/photos/ GET index
/photos/new GET new
/photos POST create
/photos/:id GET show
/photos/:id/edit GET edit
/photos/:id PATCH/PUT update
/photos/:id DELETE destroy
@brayhoward
brayhoward / Brunch-Phoenix-npm.README
Last active June 16, 2016 19:52 — forked from scrogson/README
Use bootstrap-sass npm package with Phoenix's brunch
1) install npm packages
2) update brunch-config.js
3) remove Bootstrap from web/static/css/app.css
4) rename web/static/css/app.css to web/static/css/app.scss
5) update web/static/css/app.scss