Skip to the relevant sections if needed.
:def hoogle \x -> return $ ":!hoogle --count=15 \"" ++ x ++ "\"" | |
:def doc \x -> return $ ":!hoogle --info \"" ++ x ++ "\"" | |
:set -Wall | |
:set -fno-warn-type-defaults -ferror-spans -freverse-errors -fprint-expanded-synonyms | |
:set prompt "\ESC[0;32m%s\n\ESC[m[ghci]\ESC[38;5;172mλ \ESC[m" | |
:set prompt-cont " \ESC[38;5;172m> \ESC[m" |
exec startlxde |
package com.github.therapi.apidoc; | |
import java.util.List; | |
import com.fasterxml.jackson.databind.JavaType; | |
import com.fasterxml.jackson.databind.ObjectMapper; | |
import com.fasterxml.jackson.module.jsonSchema.JsonSchema; | |
import com.fasterxml.jackson.module.jsonSchema.factories.SchemaFactoryWrapper; | |
import com.fasterxml.jackson.module.jsonSchema.factories.VisitorContext; |
{ pkgsPath ? <nixpkgs> }: | |
let | |
pkgs = import pkgsPath {}; | |
pkgsAarch64 = import pkgsPath { system = "aarch64-linux"; }; | |
iso = (pkgsAarch64.nixos { | |
imports = [ (pkgsPath + "/nixos/modules/installer/cd-dvd/installation-cd-base.nix") ]; | |
users.users.root.openssh.authorizedKeys.keyFiles = [(builtins.fetchurl https://github.com/lheckemann.keys)]; | |
}).config.system.build.isoImage; |
As a developer, it bothers me when someone sends me a large pdf file compared to the number of pages. Recently, I recieved a 12MB scanned document for just one letter-sized page... so I got to googlin, like I usually do, and found ghostscript!
to learn more abot ghostscript (gs): https://www.ghostscript.com/
What we are interested in, is the gs command line tool, which provides many options for manipulating PDF, but we are interested in compressign those large PDF's into small yet legible documents.
credit goes to this answer on askubuntu forum: https://askubuntu.com/questions/3382/reduce-filesize-of-a-scanned-pdf/3387#3387?newreg=bceddef8bc334e5b88bbfd17a6e7c4f9
Magic words:
psql -U postgres
Some interesting flags (to see all, use -h
or --help
depending on your psql version):
-E
: will describe the underlaying queries of the\
commands (cool for learning!)-l
: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
# Adapted from @ryanorendorff's gist: https://gist.github.com/ryanorendorff/f5c96d9f363a0e390425c2d9588bbb9d | |
{ pkgs ? import <nixos> {} }: | |
let | |
# The standard library in nixpkgs does not come with a *.agda-lib file, so we | |
# generate it here. | |
standard-library-agda-lib = pkgs.writeText "standard-library.agda-lib" '' | |
name: standard-library | |
include: ${pkgs.AgdaStdlib}/share/agda |