Skip to content

Instantly share code, notes, and snippets.

View develop7's full-sized avatar

Andrei Dziahel develop7

View GitHub Profile
@TOTBWF
TOTBWF / IOHCC.hs
Last active July 21, 2021 00:41
My submission for the International Obfuscated Haskell Code Competetion
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE ImpredicativeTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
module IOHCC where
import Unsafe.Coerce
u = unsafeCoerce

haskell-effort-graph

  • Red area is a result of the upfront, fixed cost of learning Haskell vs Java.
    • The company pays this for each new hire.
  • Yellow area is the developer's productivity gain once they're "over the hump."
    • The company can benefit from this, but it must first reach a break-even point vs the cost of learning.
    • If average employee tenure is less than this break-even point, the company is taking an absolute loss on each employee.
    • For Haskell to truly be worth it from a business perspective, the average tenure must not just eclipse the break-even point, but it must go further to account for the opportunity cost of better productivity during that learning period.
  • However, employees always benefit from this regardless of turnover - they get to take the productivity gain with them. This - in my opinion - naturally results in some tension.
@ChrisPenner
ChrisPenner / Optics Cheatsheet.md
Last active April 12, 2024 14:24
Optics Cheatsheet
@Elvecent
Elvecent / Concurrent.hs
Last active September 1, 2019 23:52
Running jobs asynchronously but yielding results in order
module Utils.Concurrent (mkPipeline, launchNukes) where
import Control.Concurrent (threadDelay)
import Control.Concurrent.Async (Async, async, cancel, wait)
import Control.Concurrent.STM (TBQueue, atomically, newTBQueueIO,
readTBQueue, writeTBQueue)
import Control.Monad (forever, void)
import Control.Monad.IO.Class (MonadIO, liftIO)
import GHC.Natural (Natural)
@JoeyBurzynski
JoeyBurzynski / 55-bytes-of-css.md
Last active May 15, 2024 20:11
58 bytes of css to look great nearly everywhere

58 bytes of CSS to look great nearly everywhere

When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:

main {
  max-width: 38rem;
  padding: 2rem;
  margin: auto;
}
@graninas
graninas / enq-node-framework.md
Last active November 7, 2023 17:20
Building network actors with Node Framework

Настройка IDE для Haskell.

Для haskell есть haskell ide engine (далее hie).Это приблуда которая поддерживает Language Server Protocol и благодаря этому может интегрироваться со множеством редакторов (neovim, atom, emacs, sublime, vs code).

Установка hie nix-ом работающего с несколькими GHC одновременно - all-hies

Описана здесь . С помощью одной простой комманды вы можете установить HIE:

nix-env -iA selection --arg selector 'p: { inherit (p) ghc864 ghc863 ghc843; }' -f https://github.com/infinisil/all-hies/tarball/master
@mackwage
mackwage / windows_hardening.cmd
Last active April 28, 2024 20:54
Script to perform some hardening of Windows OS
:: Windows 10 Hardening Script
:: This is based mostly on my own personal research and testing. My objective is to secure/harden Windows 10 as much as possible while not impacting usability at all. (Think being able to run on this computer's of family members so secure them but not increase the chances of them having to call you to troubleshoot something related to it later on). References for virtually all settings can be found at the bottom. Just before the references section, you will always find several security settings commented out as they could lead to compatibility issues in common consumer setups but they're worth considering.
:: Obligatory 'views are my own'. :)
:: Thank you @jaredhaight for the Win Firewall config recommendations!
:: Thank you @ricardojba for the DLL Safe Order Search reg key!
:: Thank you @jessicaknotts for the help on testing Exploit Guard configs and checking privacy settings!
:: Best script I've found for Debloating Windows 10: https://github.com/Sycnex/Windows10Debloater
:
@Brainiarc7
Brainiarc7 / ffmpeg-vp8&9-encode-test-vaapi-intel.md
Last active December 31, 2023 02:19
PSA: You can now use FFmpeg's VAAPI-based VP8 and VP9 encoder on Skylake+ systems on Linux: Tested on Ubuntu 16.04LTS

Build VAAPI with support for VP8/9 decode and encode hardware acceleration on a Skylake validation testbed:

Build platform: Ubuntu 16.04LTS.

First things first:

Install baseline dependencies first

sudo apt-get -y install autoconf automake build-essential libass-dev libtool pkg-config texinfo zlib1g-dev libva-dev cmake mercurial libdrm-dev libvorbis-dev libogg-dev git libx11-dev libperl-dev libpciaccess-dev libpciaccess0 xorg-dev intel-gpu-tools

@freckletonj
freckletonj / oauth.hs
Created April 27, 2017 21:06
Haskell Servant OAuth2.0 for GitHub
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TypeOperators #-}
module Sand where
import Data.Aeson