Note: on legacy intel system the path may be /usr/local/etc/clamav instead of /opt/homebrew/etc/clamav/
$ brew install clamav
$ cd /opt/homebrew/etc/clamav/
$ cp freshclam.conf.sample freshclam.conf| {- | |
| a small sample (the smallest ?) of MonadLogger | |
| -} | |
| {-# LANGUAGE TemplateHaskell #-} | |
| {-# LANGUAGE OverloadedStrings #-} | |
| module MonadLoggerSample where | |
| import Control.Monad.Logger |
| import monix.eval.Task | |
| import java.util.concurrent.TimeUnit | |
| import scala.concurrent.duration._ | |
| /** Request limiter for APIs that have quotas per second, minute, hour, etc. | |
| * | |
| * {{{ | |
| * // Rate-limits to 100 requests per second | |
| * val limiter = TaskLimiter(TimeUnit.SECONDS, limit = 100) | |
| * |
| #include <stdio.h> | |
| #include <iostream> | |
| #include <thread> | |
| #include <list> | |
| #include <sapi/embed/php_embed.h> | |
| int main(int argc, char* argv[]) { | |
| int threadCount = 5; |
| package shade.local | |
| import shade.local.ImmutableCache.{Timestamp, Value} | |
| import scala.annotation.tailrec | |
| import scala.collection.immutable.SortedMap | |
| import scala.concurrent.duration._ | |
| /** Describes an immutable cache data-structure. | |
| * | |
| * It behaves much like a standard `scala.collection.immutable.Map`, but |
| String[] countries = new String[]{"Afghanistan", "Albania", "Algeria", "American Samoa", "Andorra", "Angola", "Anguilla", "Antarctica", "Antigua and Barbuda", "Argentina", "Armenia", "Aruba", "Australia", "Austria", "Azerbaijan", "Bahamas", "Bahrain", "Bangladesh", "Barbados", "Belarus", "Belgium", "Belize", "Benin", "Bermuda", "Bhutan", "Bolivia", "Bosnia and Herzegowina", "Botswana", "Bouvet Island", "Brazil", "British Indian Ocean Territory", "Brunei Darussalam", "Bulgaria", "Burkina Faso", "Burundi", "Cambodia", "Cameroon", "Canada", "Cape Verde", "Cayman Islands", "Central African Republic", "Chad", "Chile", "China", "Christmas Island", "Cocos (Keeling) Islands", "Colombia", "Comoros", "Congo", "Congo, the Democratic Republic of the", "Cook Islands", "Costa Rica", "Cote d'Ivoire", "Croatia (Hrvatska)", "Cuba", "Cyprus", "Czech Republic", "Denmark", "Djibouti", "Dominica", "Dominican Republic", "East Timor", "Ecuador", "Egypt", "El Salvador", "Equatorial Guinea", "Eritrea", "Estonia", "Ethiopia", "Falklan |
| -- {-# LANGUAGE OverloadedStrings #-} | |
| import Data.Text | |
| import Control.Monad.Trans | |
| import Control.Monad.Trans.Maybe | |
| import Control.Monad.Trans.State | |
| import Control.Monad.Trans.Identity | |
| import Control.Monad.Identity | |
| import Control.Monad.Logger |
| import scala.concurrent.duration._ | |
| def scheduleTaskAtFixedRate[A](initialDelay: FiniteDuration, period: FiniteDuration, task: Task[A]): Task[Unit] = | |
| Task.create { (s, callback) => | |
| def loop(delay: Long): Task[Unit] = | |
| Task.defer { | |
| val startedAt = s.currentTimeMillis() | |
| val t = task.flatMap { _ => | |
| val duration = s.currentTimeMillis() - startedAt | |
| val nextDelay = { |
This procedure explains how to install MySQL using Homebrew on macOS Sierra 10.12
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"At this time of writing, Homebrew has MySQL version 5.7.15 as default formulae in its main repository :
I borrowed these steps from the buildbot setup for SmartOS I found at http://haskell.inf.elte.hu/builders/. Generally the standard build steps for ghc seems to work pretty well at this point aside from a few more test failures than I observed when building on Linux.
mk/build.mk to be the following: