Skip to content

Instantly share code, notes, and snippets.

View ericmwalsh's full-sized avatar
🚀

Eric Walsh ericmwalsh

🚀
View GitHub Profile

Keybase proof

I hereby claim:

  • I am ericmwalsh on github.
  • I am ericwalsh (https://keybase.io/ericwalsh) on keybase.
  • I have a public key ASBgml5L_gO4_lFv34K5bLua9e9dM_tJ2PpiJUZgjVFKrQo

To claim this, I am signing this object:

@ericmwalsh
ericmwalsh / sidekiq.config
Created February 17, 2018 07:14 — forked from maxdbn/sidekiq.config
Gracefully restarting Sidekiq on Elasticbeanstalk, only after it's done with the running jobs. Tested on: 64bit Amazon Linux 2016.09 v2.3.0 running Ruby 2.3 (Puma). Thanks to ssaunier for the original gist! https://gist.github.com/ssaunier/44bbebb9c0fa01953860
# Sidekiq interaction and startup script
commands:
create_post_dir:
command: "mkdir -p /opt/elasticbeanstalk/hooks/appdeploy/post"
ignoreErrors: true
files:
"/opt/elasticbeanstalk/hooks/appdeploy/post/50_restart_sidekiq.sh":
mode: "000755"
owner: root
group: root
@ericmwalsh
ericmwalsh / sidekiq.config
Created February 17, 2018 07:14 — forked from maxdbn/sidekiq.config
Gracefully restarting Sidekiq on Elasticbeanstalk, only after it's done with the running jobs. Tested on: 64bit Amazon Linux 2016.09 v2.3.0 running Ruby 2.3 (Puma). Thanks to ssaunier for the original gist! https://gist.github.com/ssaunier/44bbebb9c0fa01953860
# Sidekiq interaction and startup script
commands:
create_post_dir:
command: "mkdir -p /opt/elasticbeanstalk/hooks/appdeploy/post"
ignoreErrors: true
files:
"/opt/elasticbeanstalk/hooks/appdeploy/post/50_restart_sidekiq.sh":
mode: "000755"
owner: root
group: root
@ericmwalsh
ericmwalsh / learning-fuze.html
Created December 2, 2014 14:10
learning-fuze javascript test
<html>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css" rel="stylesheet">
<script src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
<script src=""></script>
<head>
<title>LearningFuze JavaScript Test</title>
<div style='text-align:center'><h1>LearningFuze</h1></div>
</head>
<body>
@ericmwalsh
ericmwalsh / haversine.lua
Created December 1, 2014 20:57
haversineFormula in LUA
function calcDist(lat1, lon1, lat2, lon2)
lat1= lat1*0.0174532925
lat2= lat2*0.0174532925
lon1= lon1*0.0174532925
lon2= lon2*0.0174532925
dlon = lon2-lon1
dlat = lat2-lat1
a = math.pow(math.sin(dlat/2),2) + math.cos(lat1) * math.cos(lat2) * math.pow(math.sin(dlon/2),2)