I hereby claim:
- I am scottserok on github.
- I am scottserok (https://keybase.io/scottserok) on keybase.
- I have a public key ASB0HHIWyjKG7Ttju5EvL7VpxLL1EMR4aKloaC8s3LN33Ao
To claim this, I am signing this object:
require 'benchmark' | |
# Found a couple of useful methods that make benchmarking my scripts easy | |
# Usage: | |
# print_gc_usage do | |
# print_memory_usage do | |
# print_time_spent do | |
# SomeClass.new | |
# end | |
# end |
# Disclaimer: This is untested | |
# | |
# Odoo.com ERP version 11 | |
# | |
# Local testing via "$ docker-compose up" and navigating to localhost:8069 | |
# | |
# Deploy to Google Cloud Platform's Kubernetes Engine to make use of available | |
# capacity in your existing GKE cluster (if you have it). | |
# | |
# 1. Create a GCP account at console.cloud.google.com, install "gcloud" and "kubectl" |
#0 0x00007f5559b3878f in __syscall4 (a4=<optimized out>, a3=<optimized out>, a2=<optimized out>, | |
a1=<optimized out>, n=<optimized out>) at ./arch/x86_64/syscall_arch.h:38 | |
#1 __restore_sigs (set=set@entry=0x559ecaf49a80) at src/signal/block.c:43 | |
#2 0x00007f5559b388a9 in raise (sig=sig@entry=6) at src/signal/raise.c:13 | |
#3 0x00007f5559b10f2e in abort () at src/exit/abort.c:9 | |
#4 0x00007f55596887e1 in die () at error.c:478 | |
#5 rb_bug_context (ctx=ctx@entry=0x559ecaf49c40, fmt=fmt@entry=0x7f5559837a82 "Segmentation fault at %p") | |
at error.c:508 | |
#6 0x00007f555977570e in sigsegv (sig=<optimized out>, info=0x559ecaf49d70, ctx=0x559ecaf49c40) at signal.c:907 | |
#7 <signal handler called> |
# config/initializers/001_secrets.rb | |
# Loads docker secrets into ENV | |
# Example docker-compose.yml: | |
# | |
# version: "3.4" | |
# services: | |
# web: | |
# image: myapp | |
# build: . |
I hereby claim:
To claim this, I am signing this object:
# Abstract Wizard to assist user with building a resource step by step. | |
# Include https://daneden.github.io/animate.css/ for animations. | |
# | |
# <div class="step"> are icons used to indicate which step the user is currently in | |
# | |
# <fieldset> are used to define what is displayed in each step of the form | |
# | |
# There should be equal number of .step elements as there are fieldset elements | |
# Create an instance of App.Wizard with the div ID of the modal | |
# 1 form per App.Wizard instance |
FROM amazonlinux | |
LABEL maintainer="scott@serok.us" | |
RUN yum install -y https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-7-x86_64/pgdg-redhat10-10-2.noarch.rpm | |
RUN sed -i "s/rhel-\$releasever-\$basearch/rhel-latest-x86_64/g" "/etc/yum.repos.d/pgdg-10-redhat.repo" | |
RUN yum install -y gcc openssl-devel libyaml-devel libffi-devel readline-devel zlib-devel gdbm-devel ncurses-devel ruby-devel gcc-c++ jq git patch which tar procps make glibc-devel postgresql10 postgresql-devel | |
RUN curl https://cache.ruby-lang.org/pub/ruby/2.5/ruby-2.5.3.tar.gz > ruby-2.5.3.tar.gz | |
RUN tar -xvzf ruby-2.5.3.tar.gz | |
RUN cd ruby-2.5.3 && ./configure && make && make install |
# frozen_string_literal: true | |
require 'mail' unless defined? Mail | |
require 'resolv' unless defined? Resolv | |
# == Summary | |
# This validator checks for a valid DNS MX resource | |
# for the given email address. The domain of the email | |
# address is extracted and used to perform a DNS lookup | |
# for an MX resource. A valid DNS MX resource does not |
# CsvBuilder configures a model to generate a resource. Inspired by ActiveAdmin. | |
# | |
# Usage example: | |
# | |
# csv_builder = CSVBuilder.new User, col_sep: ';' | |
# csv_builder.column :id | |
# csv_builder.column :email | |
# csv_builder.column("Name") { |resource| resource.display_name } | |
# csv_builder.headers %w[ID Email Name] | |
# csv_builder.scope { |scope| scope.where('created_at > ?', 7.days.ago) } # unavailable for POROs |
require 'bundler/inline' | |
gemfile do | |
source 'https://rubygems.org' | |
gem 'graphql' | |
gem 'rack' | |
gem 'webrick' | |
gem 'mail' | |
end | |
require 'json' |