View ghc-docker-run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -euo pipefail | |
base_image='registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb10' | |
tag='9e4c540d9e4972a36291dfdf81f079f37d748890' | |
image="${base_image}:${tag}" | |
docker run -it --rm \ | |
--volume /nix:/nix \ |
View records.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# language DataKinds #-} | |
{-# language DuplicateRecordFields #-} | |
{-# language OverloadedRecordDot #-} | |
import GHC.Records | |
data Person = Person | |
{ name :: String | |
, pet :: Pet | |
, partner :: Maybe Person |
View apld-finkel.pdf
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View get-apld-finkel.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env stack | |
{- stack | |
--resolver nightly-2022-01-10 | |
script | |
--package base | |
--package http-conduit | |
--package http-types | |
--package bytestring | |
-} |
View main.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn main() { | |
let a = 42; | |
let b = "hi"; | |
println!("{a:?} and {b:?}"); | |
} |
View nix-ca-example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -euo pipefail | |
go() { | |
substituter='https://cache.nixos.org/' | |
substituter='https://cache.ngi0.nixos.org/' | |
store_path='/nix/store/39sy7704dswxk1sgr8sgwfm7p4cp23a4-vim-8.2.4186' | |
store_path='/nix/store/apxk3sz6qb219w263rslm96jcsq5i4pq-git-2.34.1' |
View dyn.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- See https://travis.athougies.net/posts/2017-04-26-close-the-world.html | |
{-# OPTIONS_GHC -fprint-explicit-foralls #-} | |
{-# LANGUAGE TypeApplications #-} | |
import Data.Maybe | |
import Data.Typeable | |
data Dyn where |
View unlike-all-youtube.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function sleep(ms) { | |
return new Promise(resolve => setTimeout(resolve, ms)); | |
} | |
async function deleteLiked() { | |
var menus = $('body').getElementsByClassName("dropdown-trigger") | |
for (var i = 0; i < menus.length; i++) { | |
if (i >= 2) { | |
var menu = menus[i]; | |
menu.children[0].click(); | |
const timeout = setTimeout(() => { |
View golang-separate-funcs-with-one-line
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -euo pipefail | |
# Explanation of strange Perlness: | |
# | |
# * -0400 means that we slurp the whole file rather than operating on a | |
# line-by-line basis. | |
# * /gms means global, multiline, '.' can match '\n' (probably not needed in | |
# this case). |
View install
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -euo pipefail | |
pkgs=( | |
doom-emacs | |
dotnet | |
gh_2.0.0_linux_amd64 | |
ghc-9.0.1 | |
go-1.17 |
NewerOlder