Skip to content

Instantly share code, notes, and snippets.

View syncrou's full-sized avatar

Drew Bomhof syncrou

  • Red Hat
  • Holland MI
View GitHub Profile
Acting upon a sandwich
Umps instead of grassly convergence
Lighting cods at the earth connection
Enough steeds ate cardless boxes
Have we or this lived hump
Approximate heavy poxination
Thirteen hooves breaking curled approximations
@syncrou
syncrou / gist:df1dae2bba20cfa0a25d9826515753f8
Created December 5, 2017 21:17 — forked from trcarden/gist:3295935
Rails 3.2.7 SSL Localhost (no red warnings, no apache config)
# SSL self signed localhost for rails start to finish, no red warnings.
# 1) Create your private key (any password will do, we remove it below)
$ openssl genrsa -des3 -out server.orig.key 2048
# 2) Remove the password
$ openssl rsa -in server.orig.key -out server.key
@syncrou
syncrou / pre-commit
Created October 26, 2016 12:41
pre-commit.sh for RuboCop
#!/usr/bin/env ruby
# make sure you have gem 'rubocop-git' in your Gemfile
require 'readline'
def input(prompt="", newline=false)
prompt += "\n" if newline
Readline.readline(prompt, true).squeeze(" ").strip
end
@syncrou
syncrou / object_request.sh
Created October 25, 2016 15:51
object_request in MIQ
[dbomhof@syncrou ~/syncrou/manageiq (syncrou_master)]$ ack "object_request"
app/assets/javascripts/controllers/schedule/schedule_form_controller.js
74: $scope.scheduleModel.object_request = data.object_request;
216: $scope.scheduleModel.object_request = data.object_request;
app/controllers/application_controller/automate.rb
17: @sb[:attrs][:request] = @resolve[:new][:object_request] # Add the request attribute value entered by the user
54: @edit[:new][:object_request] = @resolve[:new][:object_request]
app/controllers/application_controller/buttons.rb
@syncrou
syncrou / gist:369680c7891c0615a57e0b2b79b67166
Last active August 3, 2016 19:30 — forked from minhajuddin/gist:1523881
gitopen - Open all files from a git diff or show command
#!/bin/bash
# This script will list all files from a git diff.
# My bash skills are a bit primitive so this can probably be done more intelligently
# Usage:
# gitopen -- opens all added files that have changed since HEAD
# gitopen diff HEAD -- these are the default parameters
# gitopen diff master -- opens files that have changed from master
@syncrou
syncrou / pivotal_hook.rb
Last active July 13, 2016 19:31
Pivotal Tracker Hook
#! /usr/bin/env ruby
require 'rubygems'
require 'net/https'
class PivotalHook
PT_API_KEY = raise "Please add PT API KEY"
def self.post
commit_log = `git log -1`