Skip to content

Instantly share code, notes, and snippets.

https://en.wikipedia.org/wiki/CIE_1931_color_space
https://www.reddit.com/r/ProgrammerHumor/search?q=volume&sort=top&restrict_sr=on
https://books.google.ch/books?id=Jlmm9GZqxkoC&printsec=frontcover&redir_esc=y#v=onepage&q&f=false
// ==UserScript==
// @name Youtrack highlight issues
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Highlight YT links
// @author Artyom
// @match https://github.com/*
// @grant none
// ==/UserScript==
// ==UserScript==
// @name twist-threads
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Move threads to the right
// @author You
// @match https://twistapp.com/*
// @grant none
// ==/UserScript==
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE DataKinds #-}
import Data.Aeson (ToJSON)
import Data.ByteString (ByteString)
import Data.Map (Map, fromList)
import Data.Monoid ((<>))
@neongreen
neongreen / GoToIssue.user.js
Last active December 4, 2017 16:07
GoToIssue.user.js
// ==UserScript==
// @name Youtrack go-to-issue
// @namespace http://tampermonkey.net/
// @version 0.4
// @description Go to issue quickly
// @author Artyom
// @match https://issues.serokell.io/*
// @match https://iohk.myjetbrains.com/youtrack/*
// @grant none
// ==/UserScript==
import Text.Printf
import Data.Foldable
import Control.Monad
-- The colors are “True” and “False”, the suits are 0,1,2,3
main = do
-- Just naming the color of neighbor's card will fail in both games
check1 $ \i n0 n1 -> case i of
0 -> n1
@neongreen
neongreen / print.hs
Last active July 15, 2016 10:44
Generic print that truncates all Doubles in output
{-# LANGUAGE
RecordWildCards,
MultiWayIf
#-}
import Data.Generics.Uniplate.Data
import System.IO
import GHC.IO.Encoding
import GHC.IO.Buffer
import Options.Applicative
data Options = Options {
optTimeout :: Maybe Int,
optCommand :: Command }
deriving Show
data Command
-- domains
= ListDomains (Maybe Int)
import System.Random
import Control.Arrow
import Control.Monad
import Text.Printf
run :: Int -> Int -> IO ()
run newPills pillsMin = step newPills pillsMin 1 [] []
step :: Int -> Int -> Int -> [Double] -> [Double] -> IO ()
step newPills pillsMin day pills eaten = do