Skip to content

Instantly share code, notes, and snippets.

'use strict';
const modelList = [ 'oneModel',
'anotherModel' ]
let modelClasses = modelList.map((c,i,a) => require(`../models/${c}`))
// let datetime = require('../lib/graphQl-dateTime')
const graphql = require('graphql').graphql
const graphQlBuilder = require('objection-graphql').builder
@jancorg
jancorg / bash-rails-stack.sh
Last active April 30, 2020 13:33
install a rails 4 stack (ruby + nginx + unicorn + mysql) just using bash and system packages. not the best way, but just for fun
#!/usr/bin/env bash
set -e
#### Adding everything INLINE just for sending you an unique gist
## Test: Run an amazon ubuntu 14.04 image, copy and run the script.
## Run `wget localhost` or connect to aws server IP for getting your greeting :)
#source config.variables
RUBY_PACKAGE="ruby2.0"
require 'net/http'
require 'json'
domain = 'domain.com'
uri = URI("http://#{domain}/challenge")
response = ''
begin
uri['challenge'] = 'challenge.json'
response = Net::HTTP.get_response uri
@jancorg
jancorg / Hubot-Dockerfile
Last active October 2, 2017 07:34
Hubot + slack + scripts Dockerfile
FROM dockerfile/nodejs
MAINTAINER Marvin
WORKDIR /root
RUN npm install -g yo generator-hubot
RUN useradd -ms /bin/bash marvin
ENV HOME /home/marvin
#Place here variables needed by hubot scripts
ADD env-vars.sh /home/marvin/.profile