# docker/webapp/Dockerfile
FROM ruby:2.6.6
SHELL ["/bin/bash", "-c"]
RUN apt-get update -qq && apt-get install -y postgresql-client memcached tzdata nano
# Install node 12, yarn
RUN curl -sL https://deb.nodesource.com/setup_12.x | bash -
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Example Request | |
| # My Devise model is named Merchant | |
| # Key lines to note are 16, 21, 27, 28, 29 | |
| require 'rails_helper' | |
| RSpec.describe 'POST /api/v2/customer_groups', type: :request do | |
| let(:merchant) { FactoryGirl.create(:merchant) } | |
| let(:user) { FactoryGirl.create(:user) } | |
| let(:customer) { merchant.customers.create(user_id: user.id)} | |
| let(:params) {{ |
Questions:
- Can we avoid installing Discourse as root? Cf. https://meta.discourse.org/t/install-issues-when-not-root/16538/17
Discourse is very clear that they do not support anything else than their official install instructions, which more or less requires a dedicated server.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'openssl' | |
| def verify_sign(key, signature, data) | |
| # Verifies with a public key that the data was signed with their private key | |
| pubkey = key.public_key | |
| if pubkey.verify(OpenSSL::Digest::SHA256.new, signature, data) | |
| puts 'the signature is valid' | |
| else | |
| puts 'the signature is invalid' | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'openssl' | |
| def verify_sign(key, signature, data) | |
| # Verifies with a public key that the data was signed with their private key | |
| pubkey = key.public_key | |
| if pubkey.verify(OpenSSL::Digest::SHA256.new, signature, data) | |
| puts 'the signature is valid' | |
| else | |
| puts 'the signature is invalid' | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const hoverTime = 400 | |
| const fetchers = {} | |
| const doc = document.implementation.createHTMLDocument('prefetch') | |
| function fetchPage (url, success) { | |
| const xhr = new XMLHttpRequest() | |
| xhr.open('GET', url) | |
| xhr.setRequestHeader('VND.PREFETCH', 'true') | |
| xhr.setRequestHeader('Accept', 'text/html') | |
| xhr.onreadystatechange = () => { |
Instructions to obtain ZSH on a windows environment, without the input funny business presented by some other attempted solutions.
The final result is ZSH running on a mintty terminal, emulated by cygwin, and being handled by the popular cmder.
For the benefit of myself and others. I've already followed these instructions twice. It took me hours to figure all this out, maybe someone else can save a few.
- Installing and setting up cmder
NewerOlder