Skip to content

Instantly share code, notes, and snippets.

View freeman42x's full-sized avatar
🎯
Twitch streaming work on open source projects, looking for contributors

freeman42x freeman42x

🎯
Twitch streaming work on open source projects, looking for contributors
View GitHub Profile
@freeman42x
freeman42x / default.nix
Created May 26, 2020 10:49
How can I update the following so that `nix-shell` will provide `cabal-install` and `ghc` in path when run?
let
ghcVersion = "ghc865";
misoPkgs = import (builtins.fetchTarball {
url = "https://github.com/dmjio/miso/archive/561ffad.tar.gz";
sha256 = "1wwzckz2qxb873wdkwqmx9gmh0wshcdxi7gjwkba0q51jnkfdi41";
}) {};
in
with misoPkgs.pkgs;
with haskell.packages."${ghcVersion}";
@freeman42x
freeman42x / agda.md
Created April 29, 2020 01:15
Agda study

Join Discord: https://discord.gg/ZQfmjTP the #agda channel for any questions. You can also ask Agda question on Freenode IRC channel #agda.

Daily schedule:

  • 30 minutes of Agda theory
  • 30 minutes of Agda practice

PLFA schedule:

@freeman42x
freeman42x / file.nix
Created April 28, 2020 01:20
unstable channel
windowManager.xmonad.extraPackages = (haskellPackages: [
haskellPackages.taffybar
]);
@freeman42x
freeman42x / gist:0e4486334e23bad74523e2e42a145936
Created April 28, 2020 01:07
sudo nixos-rebuild switch for taffy
neo@nixos ~> sudo nixos-rebuild switch
building Nix...
building the system configuration...
these derivations will be built:
/nix/store/jf3n1sinm8k360hn4ni9m2g727acf3wr-gi-gdkx11-4.0.1.drv
/nix/store/4jccn0s93hf13rr03d8xxsccfdq4y144-taffybar-3.2.1.drv
/nix/store/fb1xhii1lpr9in1zwah5sgfs53pina72-ghc-8.6.5-with-packages.drv
/nix/store/bbzc1ay0k7yhl27b3hcs2imcw8vrazd1-xmonad-with-packages-8.6.5.drv
/nix/store/brpv87msvcs9h6lrha8v4ff0mzh8s35y-xsession.drv
/nix/store/1yrakks7496f4s340jvfv925qs2xsvw2-none+xmonad-xsession.drv
@freeman42x
freeman42x / file.nix
Created April 28, 2020 00:40
unstable in ghcWithPackages
# haskellPackages.ghcid
# haskellPackages.cabal2nix
# unstable.haskellPackages.cabal-debian
# haskellPackages.xmonad-contrib
# haskellPackages.sysinfo
(pkgs.haskellPackages.ghcWithPackages (self : [
self.cabal2nix
self.cabal-install
self.ghcid
@freeman42x
freeman42x / gist:e4f37eb92c4ae851d3aa65f1e0d44ae5
Created April 27, 2020 12:51
`sudo nixos-rebuild switch` error when installing `oraclejdk`
neo@nixos ~> sudo nixos-rebuild switch
[sudo] password for neo:
building Nix...
building the system configuration...
these derivations will be built:
/nix/store/psx98p1rrfjhdlqmg0y937xgs08yb26z-jdk-8u241-linux-x64.tar.gz.drv
/nix/store/lxdaq9q0wbyrxxqqq206h4myvq0l5izw-oraclejdk-8u241.drv
/nix/store/fqxm0bbidmi132lg8hq5rfw5kcgjrdbl-system-path.drv
/nix/store/10338qrh7vzl5q94shpmi2lqylfr63a9-unit-systemd-fsck-.service.drv
/nix/store/19xk2cfg722b8ss0q0476rargypm28fz-unit-polkit.service.drv
@freeman42x
freeman42x / gist:be039cf60faabd419e368e262393263d
Created April 17, 2020 00:46
fish_prompt.fish nix-shell
~ $nix_shell_info ~>cd Forks/lambdabot/lambdabot-core/
~/F/l/lambdabot-core $nix_shell_info ~>nix-shell -p zlib.dev zlib.out
[nix-shell:~/Forks/lambdabot/lambdabot-core]$ exit
exit
~/F/l/lambdabot-core $nix_shell_info ~>nix-shell -p zlib.dev zlib.out --run fish
~/F/l/lambdabot-core $nix_shell_info ~>
@freeman42x
freeman42x / Main.hs
Created October 19, 2019 17:47
reading radio button state
-- | Haskell language pragma
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
-- | Haskell module declaration
module Main where
-- | Miso framework import
import Miso
import Miso.String
@freeman42x
freeman42x / default.nix
Created October 17, 2019 14:39
adding extra dependencies to a Miso jsaddle project
with (import (builtins.fetchTarball {
url = "https://github.com/dmjio/miso/archive/4e15d92cc4f37605fc398229695de4d903ef8a47.tar.gz";
sha256 = "0kg9lg18qdsnb6gw3jmnl49widzf5cy151bls7k09d5dxlm0myd8";
}) {});
with pkgs.haskell.packages;
let
jsaddle-warp = ... fetch jsaddle-warp here ...
in
ghc865.callCabal2nix "app" ./. { miso = ghc865.miso-jsaddle; inherit jsaddle-warp; }
@freeman42x
freeman42x / gist:f82576c7dc1ebd0c9cb552dd467a7ac9
Created October 16, 2019 20:50
electron miso websockets bug
freeman42x> does this look like it is an Electron issue? https://stackoverflow.com/q/58421285/750216 or could it be server related?
<jaawerth> I didn't know it was airbnb-branded haha
<ljharb> jaawerth: why do you need to schedule a meeting to pull in a package
<jaawerth> ljharb: oh that's DOM ones, I mean like ES ones
<devsnek> https://github.com/airbnb/js-shims
<devsnek> browser-shims includes js-shims
<jaawerth> ljharb: I'm not saying you do. I'm saying using the shim package is an easier sell than adding babel to hte project or uprading node
<jaawerth> since it's an easier transition
<sillyslux> "Haskell jsaddle warp miso server" wtf is your keyboard broken?
<jaawerth> just install it and make sure it's sourced and done