Skip to content

Instantly share code, notes, and snippets.

View dennisfoconnor's full-sized avatar

Dennis O'Connor dennisfoconnor

View GitHub Profile
@dennisfoconnor
dennisfoconnor / Application-List.md
Created November 3, 2018 14:28
Mac OSX Mojave Development Environment Setup

Required Applications to Download and Install

  1. iTerm
  2. Karabiner
  3. XCode command line tools
@dennisfoconnor
dennisfoconnor / gist:b4f1fdac39a3ecf723d7
Created September 29, 2015 18:35
Install node js on ubuntu
$ apt-get install -y nodejs nodejs-legacy npm
@dennisfoconnor
dennisfoconnor / Openssl Generate CSR
Last active August 28, 2015 18:35
Openssl commands
#Generate Key
openssl genrsa -out mydomain.key 2048
#Generate CSR
openssl req -new -sha256 -key mydomain.key -out mydomain.csr
#Verify CSR
openssl req -noout -text -in mydomain.csr
@dennisfoconnor
dennisfoconnor / list_secgroups.py
Last active March 15, 2018 05:36
Unused Amazon Security groups
import boto
ec2 = boto.connect_ec2()
sgs = ec2.get_all_security_groups()
total_unused = 0
for sg in sgs:
instances = len(sg.instances())
if instances < 1:
total_unused += 1
print sg.id + ',' + sg.name + ',' + sg.description
### Keybase proof
I hereby claim:
* I am dennisfoconnor on github.
* I am dennisfoconnor (https://keybase.io/dennisfoconnor) on keybase.
* I have a public key whose fingerprint is D52E 850A 0922 8BE5 7D52 3A20 0FC7 0DA6 5A7B E504
To claim this, I am signing this object:
@dennisfoconnor
dennisfoconnor / init.sls
Last active August 29, 2015 14:10
SaltStack File Append trailing line
/path/to/file.sh:
file.append:
- text: |+
export TEMP=foobar
# The trailing line on line 5 will appear in file.sh
@dennisfoconnor
dennisfoconnor / settings.json
Created July 12, 2014 19:58
Alfred Git Repos Workflow Settings File
//Settings File for Dean Jackson's Git Repos Alfred Workflow
{
"app_1": "iTerm",
"app_2": "RubyMine",
"app_3": "PhpStorm",
"app_4": "WebStorm",
"app_5": "Sublime Text",
"app_6": "Finder",
"global_exclude_patterns": [],
"search_dirs": [
@dennisfoconnor
dennisfoconnor / Vagrantfile
Last active August 29, 2015 14:01
Vagrant Lamp Ubuntu 14.04
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
@dennisfoconnor
dennisfoconnor / git-prompt.bash
Created April 1, 2013 14:25
This is a prompt for showing the git branch. The original code came from this blog post: https://techcommons.stanford.edu/topics/git/show-git-branch-bash-prompt
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
function proml {
local BLUE="\[\033[0;34m\]"