# 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
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 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 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 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