Skip to content

Instantly share code, notes, and snippets.

View jimmygoogle's full-sized avatar
🏠
Working from home

jimmygoogle

🏠
Working from home
View GitHub Profile
version: '3'
services:
web:
restart: always
build: .
command: python ./app.py
ports:
- 5000:5000
volumes:
- .:/app
@jimmygoogle
jimmygoogle / flatten.rb
Created August 31, 2018 00:48
Ruby code to flatten a nested array
## I am most comfortable doing something like this in Perl but I decided to go outside my comfort zone,
## learn something new and see if I could make it work.
class Flatten
# Checks the input and iterates over the items in the array recursively
# and flattens the array(s) into a single array that is returned
def flatten(args)
data = args['data'] || Array.new