Apple MacBook Pro M1, 32 GB, Ventura 13.2
Documentation based on comments in this Github Elasticsearch issue.
Install Homebrew
Apple MacBook Pro M1, 32 GB, Ventura 13.2
Documentation based on comments in this Github Elasticsearch issue.
Unfinished features & unaddressed issues:
# app/models/concerns/multiparameter_attribute_assignment.rb | |
module MultiparameterAttributeAssignment | |
include ActiveModel::ForbiddenAttributesProtection | |
def initialize(params = {}) | |
assign_attributes(params) | |
end | |
def assign_attributes(new_attributes) |
import express from "express"; | |
import { renderToString } from "react-dom/server"; | |
import { StaticRouter } from "react-router-dom"; | |
import routes from "./routes"; | |
const app = express(); | |
app.use((req, res) => { | |
const context = {}; |
I hereby claim:
To claim this, I am signing this object:
import _ from "lodash"; | |
import { graphql } from "react-apollo"; | |
import { compose, setDisplayName, wrapDisplayName } from "recompose"; | |
const isServer = typeof window !== "object"; | |
const DEFAULT_OPTIONS = { | |
fetchPolicy: isServer ? "network-first" : "cache-and-network" | |
}; |
class ApplicationController < ActionController::Base | |
before_filter :authenticate_user_from_token! | |
private | |
def authenticate_user_from_token! | |
authenticate_or_request_with_http_token do |token, options| | |
user = User.find_by_authentication_token(token) | |
if user && Devise.secure_compare(user.authentication_token, token) |
# Taken from: https://blockexplorer.com/api/status?q=getDifficulty | |
DIFFICULTY = 595921917085.416 | |
digest = Bitcoin::Digest.new | |
proof = Bitcoin::ProofOfWork.new(digest) | |
input = "Hello, world!" | |
nonce = proof.prove(input, DIFFICULTY) # => some int | |
hash = digest.hexdigest(input, nonce) # => some hash string |
# spec/support/helpers/controller_helpers.rb | |
module ControllerHelpers | |
extend ActiveSupport::Concern | |
included do | |
routes { ProfileApi::Engine.routes } | |
end | |
end |
source 'https://rubygems.org' | |
gem 'prawn' | |
gem 'gruff' |