Skip to content

Instantly share code, notes, and snippets.

View nurhadimaulana2309's full-sized avatar

Nurhadi Maulana nurhadimaulana2309

View GitHub Profile
@nurhadimaulana2309
nurhadimaulana2309 / paddock.rb
Last active May 10, 2017 07:20
Paddock Equality
# In this example case when we create paddock objects we want them to be equal
# to each other if their name and area are the same and their lat/lng are "close
# enough" to each other. In our case we want "close enough" to mean the lat and
# lng match up to four decimal places.
#
# Download this file and the corresponding test case file tc_paddock.rb. Run the
# test case file like this `ruby tc_paddock.rb`. Currently all tests fail.
# Please make the changes you feel are necessary to make the tests pass, then
# make a gist with your version of paddock.rb and let us know.
1. INSTALL MONIT
sudo apt-get install monit
sudo nano /etc/monit/monitrc
monit
monit status
2. UNCOMMENT THIS SECTION FROM /etc/monit/monitrc
set httpd port 2812
use address 12.34.56.789 # only accept connection from localhost
allow 0.0.0.0/0.0.0.0 # allow localhost to connect to the server and