Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 nix-shell | |
#! nix-shell -p "haskellPackages.ghcWithPackages (pkgs: with pkgs; [http-conduit http-types bytestring])" -i runhaskell | |
#! nix-shell -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/293a28df6d7ff3dec1e61e37cc4ee6e6c0fb0847.tar.gz | |
{-# LANGUAGE BlockArguments #-} | |
{-# LANGUAGE ImportQualifiedPost #-} | |
{-# LANGUAGE OverloadedStrings #-} | |
import Control.Monad (forM) | |
import Data.ByteString qualified as B |
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:?}"); | |
} |
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' |
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 |
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(() => { |
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). |
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 |
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
package main | |
import ( | |
"fmt" | |
) | |
type StructTag string // Creates a new type :-) | |
func main() { | |
var st StructTag = "foo" |
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
#include <stdio.h> | |
#include <stdbool.h> | |
static void truthy_int(int i) { | |
if (i) printf("%d is true\n", i); else printf("%d is false\n", i); | |
} | |
int main() { | |
truthy_int(-1); | |
truthy_int(0); |