Skip to content

Instantly share code, notes, and snippets.

@MaxGabriel
MaxGabriel / ttt.hs
Last active August 29, 2015 14:01
Haskell implementation of tic-tac-toe on the command line
import Data.Ix
import Data.List
import Data.Maybe
import Control.Lens
import Text.Read (readMaybe)
data Move = O | X deriving (Show, Eq)
type PlayerTurn = Move
@MaxGabriel
MaxGabriel / gist:6c60c0d85b9960776f17
Created June 10, 2014 15:22
haskell-idea-plugin-exception
null
kotlin.KotlinNullPointerException
at org.jetbrains.haskell.external.BuildWrapper$object.init(BuildWrapper.kt:33)
at org.jetbrains.haskell.external.HaskellExternalAnnotator.doAnnotate(HaskellExternalAnnotator.kt:91)
at org.jetbrains.haskell.external.HaskellExternalAnnotator.doAnnotate(HaskellExternalAnnotator.kt)
at com.intellij.codeInsight.daemon.impl.ExternalToolPass.doAnnotate(ExternalToolPass.java:222)
at com.intellij.codeInsight.daemon.impl.ExternalToolPass.access$400(ExternalToolPass.java:43)
at com.intellij.codeInsight.daemon.impl.ExternalToolPass$2.run(ExternalToolPass.java:133)
at com.intellij.codeInsight.daemon.impl.ExternalToolPass$3.run(ExternalToolPass.java:170)
at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:320)
@MaxGabriel
MaxGabriel / SassMeister-input.scss
Created June 21, 2014 15:42
Generated by SassMeister.com.
// ----
// Sass (v3.3.8)
// Compass (v1.0.0.alpha.19)
// Bourbon (v4.0.2)
// ----
@import "bourbon/bourbon";
$nav-height: 45px;
nav {
@MaxGabriel
MaxGabriel / SassMeister-input.scss
Created July 3, 2014 20:27
Generated by SassMeister.com.
// ----
// Sass (v3.3.9)
// Compass (v1.0.0.alpha.20)
// Bourbon (v4.0.2)
// ----
@import "bourbon/bourbon";
$asset-pipeline: true;
.docs-icon {
maximilians-mbp:MyBlog Max$ cabal install --force-reinstalls
Resolving dependencies...
Warning: The following packages are likely to be broken by the reinstalls:
yesod-form-1.4.0.1
Continuing even though the plan contains dangerous reinstalls.
Notice: installing into a sandbox located at
/Users/Max/Documents/NewHaskell/Screencasts/MyBlog/.cabal-sandbox
Downloading aeson-0.8.0.2...
Configuring aeson-0.8.0.2...
Building aeson-0.8.0.2...
maximilians-mbp:MyBlog Max$ cabal install
Resolving dependencies...
In order, the following will be installed:
MyBlog-0.0.0 (reinstall) changes: aeson-0.8.0.1 -> 0.8.0.2, markdown-0.1.11
removed, persistent-2.1 added, persistent-postgresql-2.1 added,
persistent-template-2.1 added, shakespeare-2.0.1.1 added, yaml-0.8.9.2 ->
0.8.9.3, yesod-1.4.0 added, yesod-auth-1.4.0.1 added, yesod-core-1.4.2 added,
yesod-form-1.4.0.1 -> 1.4.0.2, yesod-static-1.4.0.2 added
Warning: Note that reinstalls are always dangerous. Continuing anyway...
Notice: installing into a sandbox located at
@MaxGabriel
MaxGabriel / gist:10c2c3c253815b3f392a
Created October 18, 2014 22:26
GHC panic (verboseness 5)
This file has been truncated, but you can view the full file.
maximilians-mbp:MyBlog Max$ cabal install --ghc-option=-v5
Resolving dependencies...
In order, the following will be installed:
MyBlog-0.0.0 (reinstall) changes: aeson-0.8.0.1 -> 0.8.0.2, markdown-0.1.11
removed, persistent-2.1 added, persistent-postgresql-2.1 added,
persistent-template-2.1 added, shakespeare-2.0.1.1 added, yaml-0.8.9.2 ->
0.8.9.3, yesod-1.4.0 added, yesod-auth-1.4.0.1 added, yesod-core-1.4.2 added,
yesod-form-1.4.0.1 -> 1.4.0.2, yesod-static-1.4.0.2 added
Warning: Note that reinstalls are always dangerous. Continuing anyway...
Notice: installing into a sandbox located at
@MaxGabriel
MaxGabriel / STIIssue
Created November 12, 2014 22:04
Rails Single Table Inheritance / Includes test case
# Activate the gem you are reporting the issue against.
gem 'activerecord', '4.1.7'
require 'active_record'
require 'minitest/autorun'
require 'logger'
# Ensure backward compatibility with Minitest 4
Minitest::Test = MiniTest::Unit::TestCase unless defined?(Minitest::Test)
# This connection will do for database-independent bug reports.