Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am mjquinlan2000 on github.
  • I am mjquinlan2000 (https://keybase.io/mjquinlan2000) on keybase.
  • I have a public key ASAyaO6assqqYm5tXg0gBZjPGt9VM32Vf79t7tIJCUGWSgo

To claim this, I am signing this object:

@mjquinlan2000
mjquinlan2000 / Dockerfile.build
Last active October 20, 2017 21:31
Dockerized Google App Deploy
FROM elixir:1.5.2
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - && \
apt-get install -y nodejs && \
mix local.hex --force && \
mix local.rebar --force
ENV MIX_ENV prod
CMD ["bin/bash"]
@mjquinlan2000
mjquinlan2000 / my_app.service
Last active May 17, 2017 16:04
This is for maintaining a process started by an erlang process (such as phoenix applications built with distillery and/or delivered with edeliver)
[Unit]
Description=my_app
After=network.target
[Service]
User=ubuntu
Group=ubuntu
Restart=on-failure
Type=forking
@mjquinlan2000
mjquinlan2000 / elasticsearch.rake
Last active August 29, 2015 14:11
Chewy/Rails: Unique index per ActiveRecord object
namespace :elasticsearch do
task import: :environment do
Organization.all.each do |organization|
organization.index.types.each do |type|
model = type.adapter.name.constantize
data = model.all_data_for organization
type.import data
end
@mjquinlan2000
mjquinlan2000 / Gemfile
Last active February 2, 2016 12:32
Proxy multipart/form-data requests through Rails controller to foreign API using Faraday and Dropzone
# Make sure to add this to your Gemfile
gem 'faraday'