(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| #!/usr/bin/env bash | |
| # download and install xquartz https://xquartz.macosforge.org | |
| # so deps | |
| brew install cairo memcached | |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| module DapperFSharp = | |
| open System.Data.SqlClient | |
| open System.Dynamic | |
| open System.Collections.Generic | |
| open Dapper | |
| let dapperQuery<'Result> (query:string) (connection:SqlConnection) = | |
| connection.Query<'Result>(query) | |
| let dapperParametrizedQuery<'Result> (query:string) (param:obj) (connection:SqlConnection) : 'Result seq = |
| {-# LANGUAGE OverloadedStrings #-} | |
| {-# LANGUAGE QuasiQuotes #-} | |
| {- | |
| build-depends: base >=4.7 && <4.8 | |
| , aeson | |
| , aeson-qq | |
| , bytestring | |
| , text |
DISCLAIMER: This could all quite plausibly brick your Chromebook, and I take no responsibility for any damage you might inflict on it or yourself. Follow along at your own risk.
Most Chromebooks can run some flavour of GNU/Linux using the Chrubuntu method, running off the kernel that comes with ChromeOS. I found, however, that the ChromeOS kernel didn’t play well with recent X.org versions, and would refuse to recover from suspend, and not deal very well at all with having an external screen attached to it.
I also wanted to replace ChromeOS entirely with Arch on my Chromebook, because only 16 gigabytes of eMMC isn’t very convenient for dual booting. To accomplish this, I needed an external installation medium.
First of all, you’ll need to get your Chromebook into developer mode if you haven’t already. This is model specific, although for most recent models holding the Escape and Reload keys while booting should do the trick. If not, ask Google.
| {-# LANGUAGE OverloadedStrings #-} | |
| module Main where | |
| import System.Environment | |
| import Data.Monoid | |
| import Control.Monad | |
| import Data.Aeson | |
| import qualified Data.Text as T | |
| import qualified Data.Text.IO as T | |
| import Network.HTTP.Client |
| {-# LANGUAGE NoImplicitPrelude #-} | |
| {-# LANGUAGE RebindableSyntax #-} | |
| module Comonad where | |
| import Prelude (Functor(..)) | |
| class Functor m => Monad m where | |
| return :: a -> m a | |
| join :: m (m a) -> m a |
| rabbitmqctl add_user test test | |
| rabbitmqctl set_user_tags test administrator | |
| rabbitmqctl set_permissions -p / test ".*" ".*" ".*" |
| [Unit] | |
| Description=Docker Compose on CoreOS | |
| After=docker.service | |
| Requires=docker.service | |
| [Service] | |
| Type=oneshot | |
| RemainAfterExit=yes | |
| TimeoutStartSec=0 |
| // Node v6.9.0 | |
| // | |
| // TEST FILE (cut down for simplicity) | |
| // To ensure Golang encrypted string can be decrypted in NodeJS. | |
| // | |
| let crypto; | |
| try { | |
| crypto = require('crypto'); |