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.
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" | |
}; |
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 = {}; |
Unfinished features & unaddressed issues:
# 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 |
How to setup Heroku Hostname SSL with GoDaddy SSL Certificate and Zerigo DNS | |
Heroku recently added an exciting new 'Hostname SSL' option. This option offers the broad compatibility of IP-based SSL, but at 1/5 the price ($20 / month at the time of this writing). | |
The following tutorial explains how to use Heroku's new 'Hostname SSL' option on your Heroku project. Before we begin, let's list what we're using here: | |
* Heroku Hostname SSL | |
* GoDaddy Standard SSL Certificate | |
* Zerigo DNS | |
Note: I am not using the Heroku Zerigo DNS add-on, instead I have a separate Zerigo account for my DNS needs. I do this because Zerigo offers 30 hosts on free direct accounts, versus only 10 hosts on the free Heroku add-on. |
/** @jsx React.DOM */ | |
var React = require('react'); | |
var Loader = require('../../lib/react-loader'); | |
var expect = require('chai').expect; | |
var loader, loaded; | |
describe('Loader', function () { | |
beforeEach(function () { |
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) |