Skip to content

Instantly share code, notes, and snippets.

View scottcreynolds's full-sized avatar

Scott C Reynolds scottcreynolds

View GitHub Profile
@scottcreynolds
scottcreynolds / get-weave-ip-address-for-csv1-containers
Created March 15, 2018 15:41
A simple tool to show the IP address of each container on a server
for i in $(docker ps | awk '{print $1 ":" $2}')
do
container_id=$(echo $i | awk -F ':' '{print $1}')
container_service=$(echo $i | awk -F ':' '{print $2}')
container_ip_address=$(weave ps | grep $container_id | awk '{print $NF}')
echo "${container_service} : ${container_ip_address}"
done
@scottcreynolds
scottcreynolds / dj_objects.txt
Created October 11, 2017 20:58 — forked from EBashkoff/dj_objects.txt
Get Objects from Delayed Job
Get a deserialized object from a delayed job:
1. Get the delayed_job record using the id: dj = DelayedJob.find(<id>)
2. Get the handler field from dj: dj.handler
3. Convert it from YAML: YAML.parse(dj.handler)
4. You can get the ruby objects that the delayed job was built with by converting that to_ruby and calling the object:
YAML.parse(dj.handler).to_ruby.user
YAML.parse(dj.handler).to_ruby.prospect
YAML.parse(dj.handler).to_ruby.agent
etc.
staging:
rails:
configuration:
asset_pipeline_precompile: false