Skip to content

Instantly share code, notes, and snippets.

View strongjz's full-sized avatar

James Strong strongjz

View GitHub Profile
@strongjz
strongjz / gist:f7d30e9f495126d2d0da
Created October 16, 2014 17:56
sample init script for connecting ec2 phpmyadmin to rds instance
#!/bin/bash
# User Data Script for Bootstrapping Lab - Architecting on AWS : Advanced Concepts
# Enable EPEL Repo
# This step is using sed, a standard Linux stream editor, to change the value of one line in a configuration file
# Reference: http://www.gnu.org/software/sed/manual/sed.html
/bin/sed -i '0,/enabled\=0/{s/0/1/}' /etc/yum.repos.d/epel.repo
# Install PHPMyAdmin
# This step is using yum, the Amazon Linux package manager, to install PHPMyAdmin and all of its components
@strongjz
strongjz / pie.coffee
Last active August 29, 2015 14:08 — forked from stevenleeg/pie.coffee
class Dashing.Pie extends Dashing.Widget
@accessor 'value'
onData: (data) ->
@render(data.value)
render: (data) ->
if(!data)
data = @get("value")
if(!data)
@strongjz
strongjz / gist:042516b1844c8abea147
Created March 10, 2015 21:40
load errors with ruby, bunny and honeybadger class
irb(main):001:0> require 'bunny'
=> true
irb(main):002:0> c = Bunny.new
=> #<Bunny::Session:0x007f7074461e00 @default_hosts_shuffle_strategy=#<Proc:0x007f7074461ce8@/usr/local/lib/ruby/gems/2.0.0/gems/bunny-1.7.0/lib/bunny/session.rb:137>, @opts={}, @hosts=["127.0.0.1"], @host_index=1, @port=5672, @user="guest", @pass="guest", @vhost="/", @logfile=#<IO:<STDOUT>>, @threaded=true, @logger=#<Logger:0x007f7074461b30 @progname="#<Bunny::Session:70060481908480 guest@127.0.0.1:5672, vhost=/, hosts=[127.0.0.1]>", @level=2, @default_formatter=#<Logger::Formatter:0x007f7074461a90 @datetime_format=nil>, @formatter=nil, @logdev=#<Logger::LogDevice:0x007f7074461a18 @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<IO:<STDOUT>>, @mutex=#<Logger::LogDevice::LogDeviceMutex:0x007f70744619f0 @mon_owner=nil, @mon_count=0, @mon_mutex=#<Mutex:0x007f7074461978>>>>, @automatically_recover=true, @network_recovery_interval=5.0, @recover_from_connection_close=false, @continuation_timeout=4000, @status=:not_connected, @blocked=fal

Keybase proof

I hereby claim:

  • I am strongjz on github.
  • I am strongjz (https://keybase.io/strongjz) on keybase.
  • I have a public key whose fingerprint is 955E 384E 8B36 BF5B 02E3 D2A4 08D1 1276 8A12 9699

To claim this, I am signing this object:

#!/bin/bash
# Use whichever region you're working in
export AWS_DEFAULT_REGION=eu-west-1
# Make ec2-user's home dir the install to make it easier to navigate when subsequently ssh-ing in to instances
su ec2-user -
cd /home/ec2-user
echo Working dir is `pwd`
@strongjz
strongjz / README.md
Created May 22, 2017 17:53 — forked from magnetikonline/README.md
AWS Elastic Beanstalk deploy user restricted IAM policy.

AWS Elastic Beanstalk deploy user restricted IAM policy

An IAM user policy document to give minimal rights for deploying an Elastic Beanstalk application.

Where:

  • REGION: AWS region.
  • ACCOUNT_ID: AWS account ID.
  • APPLICATION_NAME: Desired target Elastic Beanstalk application name(space).
  • IAM_INSTANCE_PROFILE_ROLE: The instance profile (IAM role) Elastic Beanstalk EC2 instaces will run under.
@strongjz
strongjz / zookeeper-solr-cloud.md
Created May 24, 2017 20:23 — forked from kalharbi/zookeeper-solr-cloud.md
Setting up an external Zookeeper Solr Cluster

Setting up an external Zookeeper Solr Cluster

This is a step by step instruction on how to create a cluster that has three Solr nodes running in cloud mode. These instructions should work on both a local cluster (for testing) and a remote cluster where each server runs in its own physical machine. This was tested on Solr version 5.4.1 and Zookeeper version 3.4.6

Installing Solr and Zookeeper

  • Download and extract Solr:
    • curl -O http://archive.apache.org/dist/lucene/solr/5.5.3/solr-5.5.3.tgz
    • mkdir /opt/solr
@strongjz
strongjz / install_jenkins_plugin.sh
Created August 6, 2017 22:11 — forked from micw/install_jenkins_plugin.sh
Script to install one or more jenkins plugins including dependencies while jenkins is offline
#!/bin/bash
set -e
if [ $# -eq 0 ]; then
echo "USAGE: $0 plugin1 plugin2 ..."
exit 1
fi
plugin_dir=/var/lib/jenkins/plugins