Skip to content

Instantly share code, notes, and snippets.

// ==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==
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
newtype ModularInt s = ModularInt Int
mkModularInt :: forall s . Reifies s Int => Int -> ModularInt s
mkModularInt a = ModularInt (a `mod` modulus)
where
modulus = reflect (Proxy :: Proxy s)
instance Reifies s Int => Num (ModularInt s) where
ModularInt a + ModularInt b = mkModularInt (a + b)
ModularInt a - ModularInt b = mkModularInt (a - b)
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE OverloadedLabels #-}
{-# LANGUAGE ScopedTypeVariables #-}
import Data.Monoid
Failures:
test/Test/Pos/Util.hs:130:
1) Test.Pos.Genesis.Canonical.Genesis, Canonical encoding, GenesisDelegation
uncaught exception: ErrorCall (arbitrary@GenesisDelegationwrong issuerPk address hash set as key for delegation map
CallStack (from HasCallStack):
error, called at src/Debug.hs:43:11 in universum-0.6.1-9mYZcBKoiRA6hokc6njdX3:Debug) (after 2 tests)
*** Failed! (after 2 tests):
Exception:
arbitrary@GenesisDelegationwrong issuerPk address hash set as key for delegation map
mkGenesisDelegation
[yom@shiny daedalus]$ rm -rf bower_components node_modules output
[yom@shiny daedalus]$ npm i
> [email protected] preinstall /home/yom/code/csl/daedalus
> which psc || which purs || npm install [email protected]
which: no psc in (/usr/lib/node_modules/npm/bin/node-gyp-bin:/home/yom/code/csl/daedalus/node_modules/.bin:/home/yom/.gem/ruby/2.4.0/bin:/home/yom/.local/bin:/home/yom/.cabal/bin:/usr/sbin:/sbin:/bin:/usr/games:/home/yom/.nix-profile/bin:/home/yom/.nix-profile/sbin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl)
/usr/sbin/purs
npm WARN deprecated [email protected]: We're super 😸 excited that you're trying to use ES2015 syntax, but instead of continuing yearly presets 😭 , we recommend using babel-preset-env: npm install babel-preset-env. preset-env without options will compile ES2015+ down to ES5. And by targeting specific browsers, Babel can do less work and you can ship native ES2015+ to users 😎 ! Also, w

Storing passwords securely

The best advice about passwords is: don't deal with passwords at all. Authenticate people through Google or Facebook or whatever. Not only it's one less password for people to remember, but also Google has better infastructure for authentication than you will have:

  • they detect suspicious logins
  • they support 2FA
  • and their account recovery process is more nuanced than “we'll send a link to your email, unless you don't have access to that email anymore, in which case you're screwed”)

However, if you can't, don't want to, or just disagree with this opinion for some reason or another, the next best advice about passwords is just “always use scrypt”. Unfortunately, without knowing why exactly scrypt exists it's easy to think “oh I'll be fine with not using scrypt for this small site” or “oh they use SHA256 in this codebase I inherited, well it's okay I guess”, and almost always such thoughts are wrong, so a more detailed explanation would probably do some good.

digestive-functors

In my opinion, digestive-functors is needlessly complicated and obscure (like many Haskell libraries are). It took me three hours to understand how to work with it. However, until things like forma get more popular, that's what we have to work with, I guess. (Oh, and forma is kinda obscure too, though a bit less.)

tl;dr Serokell is hiring Nix devops

Hi! We’re Serokell – a company with about 30 Haskellers working on a bunch of blockchain-related projects (like Cardano or TeachMePlease). We are hiring devops and operations leads who can work with Nix (yay Nix!) and who know some Haskell. The job is fully remote.

A bit more about us