Skip to content

Instantly share code, notes, and snippets.

View grocky's full-sized avatar

Rocky Gray grocky

View GitHub Profile
@grocky
grocky / post-commit
Last active November 19, 2017 13:40
gitshots slack avatar
#!/usr/bin/env bash
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
logDir=${HOME}/log
[ ! -d ${logDir} ] && mkdir -p ${logDir}
logFile=${logDir}/git-post-commit.log
[ ! -f ${logFile} ] && touch ${logFile}
# set the command prefix to `
set -g prefix "`"
unbind-key C-b
bind-key "`" send-prefix
set -g default-shell /bin/bash
set -g default-command bash
set -g status-fg white
set -g status-bg black
@grocky
grocky / locateme-json.sh
Last active June 13, 2017 23:58
Get GeoLocation for OSX machine with JSON output
#!/usr/bin/env bash
# Requires LocateMe executable (brew install locateme)
LocateMe -f '{"latitude":{LAT}, "longitude":{LON}, "altitude": {ALT}, "speed": {SPD}, "direction": {DIR}, "horizontalAccuracy": {HAC}, "verticalAccuracy": {VAC}, "time": "{TIME}", "host": "{HOST}"}'
@grocky
grocky / keybase.md
Created September 6, 2016 21:54
keybase.md

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@grocky
grocky / docker-for-mac-migration.md
Last active March 26, 2018 14:26
migrating from docker toolbox to docker for mac

Overview

Docker for Mac is the next step toward bringing native Docker to OSX. We've built some tooling around boot2docker and docker-machine that now is no longer needed! This guide will help you migrate from the Docker toolbox to Docker for Mac.

Docker toolbox

docker toolbox image

The docker toolbox provides a virtual machine that runs the docker engine and allows a local docker client to interact with the docker ecosystem (images, containers, etc.).

Docker for mac

@grocky
grocky / upsource-aws-setup.md
Created April 24, 2016 20:25
Setting up Jebrains Upsource on AWS

Installing and configuring Upsource on AWS with SSL

Upsource is a tool that brings Jetbrains IDE's code insights to code reviews. Upsource's integration with Jetbrains IDEs and GitHub are some of the most attractive features for us at VideoBlocks since we're heavy users of them both. We currently have over 50 private repos and use IntelliJ, PHPStorm and WebStorm to build our core products. All of our infrastructure is hosted on AWS now, so I decided to get this up and running there for quick evaluation.

Launch an EC2 Instance

This step is straight forward and there are already some good resources for setting up an EC2 instance. I won't go into detail here, but I chose an Ubuntu AMI at a size of M3.large (which is the minimum instance size Jetbrains recommends). We're configuring our security group with the standard HTTP ports (80 and 443) and exposing the standard SSH port 22.

'use strict';
require('coffee-script').register();
var HubotTestHelper = require('hubot-test-helper');
var helper = null;
var RoomUtils = (function() {
function RoomUtils(room) {
this.room = room;
@grocky
grocky / dash.sh
Created December 2, 2015 23:43
Search documentation in Dash in the terminal
dash () {
open dash://${1}
}
@grocky
grocky / gist:01f58a4ca616ab9932a6
Last active August 29, 2015 14:25
Install ffmpeg
git clone git://source.ffmpeg.org/ffmpeg.git \
&& cd ffmpeg \
&& ./configure \
--disable-debug \
--enable-small \
--extra-libs=-ldl \
--enable-gpl \
--enable-libass \
--enable-libtheora \
--enable-libvorbis \
@grocky
grocky / idea
Last active May 28, 2020 19:13 — forked from chrisdarroch/idea
Open IDEA applications based on project type from the command line!
#!/usr/bin/env bash
IDEA=''
PROJECT_DIR=''
function main() {
openIdea "$@"
}
function openIdea() {