Skip to content

Instantly share code, notes, and snippets.

(defun ross/xref-find-definitions-etags-fallback (identifier)
"Find the definition of the identifier at point.
With prefix argument or when there's no identifier at point,
prompt for it.
If the primary xref-backend fails, fall back to the etags backend."
(interactive (list (xref--read-identifier "Find definitions of: ")))
(condition-case nil
(xref-find-definitions identifier)
(user-error
(use-package direnv
:demand t
:config
(validate-setq direnv-always-show-summary nil)
(direnv-mode +1)
:general
(:prefix "C-c d e"
"" '(nil :wk "direnv")
"a" 'direnv-allow
"e" 'direnv-update-environment
@rossabaker
rossabaker / Moomin.scala
Last active July 11, 2020 15:54
Moomin middleware for Scala
/*
* Copyright 2013-2020 http4s.org
*
* SPDX-License-Identifier: Apache-2.0
*/
package org.http4s.server.middleware
import org.http4s._
import cats.Functor
import cats.effect._
import cats.implicits._
import javax.servlet._
import javax.servlet.annotation._
import java.util.concurrent._
import org.http4s._
import org.http4s.server._
import org.http4s.servlet._
import scala.concurrent.ExecutionContext.global
/*
* Copyright 2013-2020 http4s.org
*
* SPDX-License-Identifier: Apache-2.0
*/
import java.util.Calendar
import cats.effect._
import org.asynchttpclient._
import cats.effect._
import cats.effect.concurrent._
import org.http4s._
import org.http4s.client._
object Benash {
def permitResource[F[_]](sem: Semaphore[F])(implicit F: Bracket[F, Throwable]): Resource[F, Unit] =
Resource.make(sem.acquire)(_ => sem.release)
def limitedClient(sem: Semaphore[IO], client: Client[IO]): Client[IO] =
{config, pkgs, ...}:
{
imports = [
<nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-minimal-new-kernel.nix>
# Provide an initial copy of the NixOS channel so that the user
# doesn't need to run "nix-channel --update" first.
<nixpkgs/nixos/modules/installer/cd-dvd/channel.nix>
];
}
Oct 15 14:04:43 herbert i3lock[20285]: PAM (other) illegal module type: @include
Oct 15 14:04:43 herbert i3lock[20285]: PAM pam_parse: expecting return value; [...common-auth]
Oct 15 14:04:43 herbert i3lock[20285]: PAM (other) no module name supplied
Oct 15 14:04:43 herbert i3lock[20285]: PAM (other) illegal module type: @include
Oct 15 14:04:43 herbert i3lock[20285]: PAM pam_parse: expecting return value; [...common-account]
Oct 15 14:04:43 herbert i3lock[20285]: PAM (other) no module name supplied
Oct 15 14:04:43 herbert i3lock[20285]: PAM (other) illegal module type: @include
Oct 15 14:04:43 herbert i3lock[20285]: PAM pam_parse: expecting return value; [...common-password]
Oct 15 14:04:43 herbert i3lock[20285]: PAM (other) no module name supplied
Oct 15 14:04:43 herbert i3lock[20285]: PAM (other) illegal module type: @include
faf964e0 (HEAD -> master, origin/master, origin/HEAD) Merge pull request #591 from Daenyth/563-fromfuture-async
8174b67e Add Async.fromFuture (#563)
50ff172a Merge pull request #590 from scala-steward/update/sbt-microsites-0.9.2
e01cd5fd Merge pull request #589 from amohrland/update/sbt-microsites-0.7.27
e3964584 Merge pull request #588 from theiterators/monoidk-par-io
8e1d4f71 Merge pull request #586 from julien-truffaut/patch-1
8c61d1f4 Merge pull request #576 from theiterators/alternative-fiber
bd514a26 (scala-steward/master) Merge pull request #575 from scala-steward/update/sbt-tpolecat-0.1.7
f5c48b8a Merge pull request #581 from scala-steward/update/sbt-scalajs-crossproject-0.6.1
f6fddba7 Merge pull request #573 from scala-steward/update/sbt-sonatype-2.5
import cats.effect.{ConcurrentEffect, Effect, ExitCode, IO, IOApp}
import cats.syntax.flatMap.toFlatMapOps
import cats.syntax.functor.toFunctorOps
import fs2.{Pipe, Stream}
import io.circe.Json
import io.circe.jawn.CirceSupportParser
import jawn.RawFacade
import jawnfs2._
import org.http4s.client.Client
import org.http4s.client.asynchttpclient.AsyncHttpClient