Skip to content

Instantly share code, notes, and snippets.

View adinapoli's full-sized avatar
🐘

Alfredo Di Napoli adinapoli

🐘
View GitHub Profile
{-# language DeriveFunctor #-}
{-# language OverloadedStrings #-}
{-# language RankNTypes #-}
module Main where
import Control.Applicative
import Control.Monad
import Shelly
--------------------------------------------------------------------------------
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DataKinds #-}
module Data.API.Tools.PureScript.Pretty where
import Data.String.Conv
import qualified Data.Text as T
import qualified Language.PureScript.AST.Declarations as PS
import qualified Language.PureScript.Environment as PS
import qualified Language.PureScript.Kinds as PS
import qualified Language.PureScript.Names as PS
;;; -*- lexical-binding: t -*-
;;; adinapoli-zen-mode.el --- A mode for who do not want to be distracted.
;; Copyright (C) 2016 Alfredo Di Napoli
;; Author: Alfredo Di Napoli <alfredo.dinapoli@gmail.com>
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or

Yo Ollie!

Finally as promised here I am! First of all, I should point out that I'm mostly plant-based but not 100% vegan.

I tried for a while, but occasionally I revert to eat some fish and some cheese, maybe some organic chicken breast. The reason is that "vegan" as you know carries quite a deep ethic and activist connotation I'm not sure I could quite fit in my lifestyle! Reason I turned mostly plant-based last year is quite interesting (at least is what I pretend is :D ) so I will do a bit of a digression. Around April 2015 I was still into running but decided to switch cold turkey to a soylent-based diet, specifically trying out Queal and Joylent. Bad idea!

Error found:
in module Data.Foreign.Class
at /Users/adinapoli/work/athena/eros/app/assets/purescript/bower_components/purescript-foreign/src/Data/Foreign/Class.purs line 54, column 24 - line 5
6, column 5
Could not match type
Array _0
with type
@adinapoli
adinapoli / configuration.nix
Created November 13, 2015 08:00
Clean Nix Config
{ config, pkgs, ... }:
{
# Use the GRUB 2 boot loader.
boot.loader.grub.enable = true;
boot.loader.grub.version = 2;
# Define on which hard drive you want to install Grub.
boot.loader.grub.device = "/dev/sda";
# Select internationalisation properties.

Input

{
    "ldv": {
        "mittente": {
            "cap": "00144",
            "tipoAnagrafica": "S",
            "telefono": "06 5060071",
            "indirizzo": "Via Unita d'Italia 5783296",

I'm building an Haskell implementation of the Myo armband WebSockets specification:

https://developer.thalmic.com/forums/topic/534/

The API per se it's quite run-of-the-mill, but with a twist. You can send "command" to the Armband, but the json payload describing them it's quite indulgent. As an example, these are 2 possible commands:

{"command": "set_stream_emg",
 "myo": <number>, // Myo ID (unsigned integer)
 "type": "enabled" | "disabled"
/tmp/hermes/builds/hermes-0.12.7.0 ⌚ 10:24:54
$ hub load < hermes.manifest
Resolving dependencies...
cabal-1.20.0.0: Could not resolve dependencies:
next goal: atlas (user goal)
rejecting: atlas-0.12.10.14, 0.12.10.13, 0.12.10.12, 0.12.10.11 (global
constraint requires ==0.12.10.9)
trying: atlas-0.12.10.9
trying: atlas-0.12.10.9:-library-only
trying: markdown-0.1.13.1 (dependency of atlas-0.12.10.9:-library-only)