This file contains hidden or 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 | |
REDIRECT="http://127.0.0.1:7777" | |
echo "Enter your consumer key." | |
echo "You can get it from: https://getpocket.com/developer/apps/new" | |
read -p "> " consumer_key | |
code=$( | |
curl -sX POST --data "consumer_key=$consumer_key&redirect_uri=$REDIRECT" \ |
This file contains hidden or 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
let | |
pkgsOrig = import <nixpkgs> {}; | |
pkgsMusl = pkgsOrig.pkgsMusl; | |
extraLibraries = with pkgsMusl; [ | |
musl | |
zlib zlib.static | |
libffi (libffi.override { stdenv = makeStaticLibraries stdenv; }) | |
gmp (gmp.override { withStatic = true; }) | |
]; | |
docker = |
This file contains hidden or 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
diff --git a/modules/modules.nix b/modules/modules.nix | |
index 0e18795..a5d1757 100644 | |
--- a/modules/modules.nix | |
+++ b/modules/modules.nix | |
@@ -27,7 +27,7 @@ let | |
(loadModule ./misc/gtk.nix { }) | |
(loadModule ./misc/lib.nix { }) | |
(loadModule ./misc/news.nix { }) | |
- (loadModule ./misc/nixpkgs.nix { }) | |
+ # (loadModule ./misc/nixpkgs.nix { }) |
This file contains hidden or 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
{ old, new, pkgs ? import <nixpkgs> {}}: | |
let | |
packages = [ | |
"aeson" "Agda" "attoparsec" "cassava" "conduit" "cryptonite" | |
"diagrams-core" "distributed-process" "esqueleto" "git-annex" "hakyll" | |
"hedgehog" "hlint" "http-client" "idris" "lens" "pandoc" "pipes" | |
"purescript" "QuickCheck" "servant" "servant-server" "ShellCheck" | |
"singletons" "tls" | |
]; |
This file contains hidden or 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 GeneralizedNewtypeDeriving #-} | |
{-# LANGUAGE LambdaCase #-} | |
{-# LANGUAGE MultiWayIf #-} | |
{-# LANGUAGE RecordWildCards #-} | |
module Game.THLPE | |
( THLPE () | |
, GodAnswer (..) | |
, GodType (..) | |
, GodName (..) |
This file contains hidden or 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
module Main where | |
import Data.List | |
import Data.Tree | |
data Elem a = Elem { elemVec :: [Double], elemData :: a } | |
deriving (Show) | |
data KDTree a | |
= Branch Int Double Int (KDTree a) (KDTree a) |
This file contains hidden or 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
import sys | |
import json | |
from pprint import pprint | |
from datetime import datetime | |
with open(sys.argv[1], "r") as f: | |
js = json.load(f) | |
items = js["items"] |
This file contains hidden or 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 python | |
import re | |
import sys | |
import argparse | |
from typing import * | |
from pprint import pprint | |
from multiprocessing import Pool | |
from datetime import datetime, timedelta |
This file contains hidden or 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 -o errexit | |
set -o nounset | |
FULL_PATH=$(realpath "$1") | |
TMPDIR="$(mktemp -d)" | |
set -o xtrace |
This file contains hidden or 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 TypeOperators #-} | |
{-# LANGUAGE DataKinds #-} | |
{- | |
This piece of code makes GHC never terminate. | |
$ ghc --version | |
The Glorious Glasgow Haskell Compilation System, version 8.0.2 | |
$ ghc-pkg list | grep servant | |
servant-0.11 |