I hereby claim:
- I am prepor on github.
- I am prepor (https://keybase.io/prepor) on keybase.
- I have a public key ASCAbQNQu9q1W0a75dB2O1UARIqBG9XPE2PnDwnXmXZB5wo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| (ns project.sqs | |
| (:require [cheshire.core :as json]) | |
| (:import [com.amazonaws.services.sqs | |
| AmazonSQS | |
| AmazonSQSClientBuilder] | |
| [com.amazonaws.auth | |
| BasicAWSCredentials |
| curl -I -X OPTIONS \ | |
| -H "Origin: http://EXAMPLE.COM" \ | |
| -H 'Access-Control-Request-Method: GET' \ | |
| http://EXAMPLE.COM/SOMETHING 2>&1 | grep 'Access-Control-Allow-Origin' |
When Babel 6 came out, it was hard for a lot of packages to upgrade because it was essentially an entirely different category of thing than Babel 5. So what happened was that some packages upgraded, and some didn't — at least not straight away.
Some projects took the prima facie enlightened view that packages should expose untranspiled code, so that the consumers of that code could determine for themselves what needed to get transpiled based on the environments they supported.
That was a costly decision. If I was the author of an app that was using Babel 6, I couldn't import a library that was still using Babel 5 and shipping untranspiled code (because the configs were completely incompatible), and vice versa. Frankly, it was a bloody nuisance. We are bad at anticipating these sorts of issues. It will happen again at some point.
Adding a few extra bytes to pkg.main or pkg.module is a small price to pay for things just working. As well as avoiding the aforementioned headaches, it means that your
A list of commonly asked questions, design decisions, reasons why Clojure is the way it is as they were answered directly by Rich (even when from many years ago, those answers are pretty much valid today!). Feel free to point friends and colleagues here next time they ask (again). Answers are pasted verbatim (I've made small adjustments for readibility, but never changed a sentence) from mailing lists, articles, chats.
How to use:
The goal of this cheatsheet is to make it easy to add hand-rolled authentication to any rails app in a series of layers.
First the simplest/core layers, then optional layers depending on which features/functionality you want.
Specs |
|
|---|---|
| AUTHOR | Ira Herman |
| LANGUAGE/STACK | Ruby on Rails Version 4, 5, or 6 |
| import cats.data.{ EitherT, State } | |
| import cats.implicits._ | |
| import cats.{ Monad, ~> } | |
| import io.aecor.liberator.macros.free | |
| import io.aecor.liberator.syntax._ | |
| import io.aecor.liberator.{ ProductKK, Term } | |
| @free | |
| trait Api[F[_]] { | |
| def doThing(aThing: String, params: Map[String, String]): F[Either[String, String]] |
| # `ERROR: Error installing nokogiri: | |
| # ERROR: Failed to build gem native extension. | |
| # | |
| # current directory: /usr/local/var/rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/nokogiri-1.7.0/ext/nokogiri | |
| # /usr/local/var/rbenv/versions/2.3.1/bin/ruby -r ./siteconf20170103-68488-r71c9j.rb extconf.rb --with-xml=/usr/local/Cellar/libxml2/ --use-system-libraries | |
| # checking if the C compiler accepts ... yes | |
| # checking if the C compiler accepts -Wno-error=unused-command-line-argument-hard-error-in-future... no | |
| # Building nokogiri using system libraries. | |
| # ERROR: cannot discover where libxml2 is located on your system. please make sure `pkg-config` is installed. | |
| # *** extconf.rb failed *** |