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
#!/bin/bash | |
set -o errexit | |
set -o errtrace | |
set -o nounset | |
set -eou pipefail | |
# ============================================================================== | |
function clearscreen { |
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 -o errexit | |
#set -o errtrace | |
set -o nounset | |
#set -eou pipefail | |
# ============================================================================== | |
VERSION="0.1.0" |
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
#!/bin/bash | |
set -o errexit | |
set -o errtrace | |
set -o nounset | |
set -eou pipefail | |
# ============================================================================== | |
VERSION="0.1.0" |
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
#!/bin/bash | |
set -o errexit | |
set -o errtrace | |
set -o nounset | |
set -eou pipefail | |
# ============================================================================== | |
function clearscreen { |
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
{ | |
description = "IHP flake"; | |
nixConfig.bash-prompt = "[nix]\\e\[38;5;172mλ \\e\[m"; | |
inputs = { | |
nixpkgs.url = "nixpkgs/nixos-21.05"; | |
flake-utils = { | |
url = "github:numtide/flake-utils"; |
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
: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" |
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
// helper functions are from https://github.com/rpearce/hex | |
const lightenDarken = (direction, color) => { | |
const rgb = hexToRgba(color).slice(0, 3) | |
// algo from https://stackoverflow.com/a/21038522/680394 | |
const rgbAdjusted = direction >= 0 | |
? rgb.map(x => (1 - direction) * x + direction * 255) | |
: rgb.map(x => (1 + direction) * x) | |
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 -o errexit | |
set -o errtrace | |
set -o nounset | |
set -eou pipefail | |
function clearscreen { | |
printf '\033c' | |
} |
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
module Tmp | |
def self.build(src:, name:, ext:, binmode: false) | |
file = Tempfile.new([name, ext], Rails.root.join('tmp')) | |
file.binmode if binmode | |
open(src) { |f| file.write(f.read) } | |
file.rewind | |
file.close | |
file | |
end | |
end |
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
#!/bin/sh | |
############################################################################### | |
# XCode | |
############################################################################### | |
echo "Setting up XCode..." | |
xcodebuild -license | |
xcode-select --install | |
sudo xcode-select -switch /Library/Developer/CommandLineTools |
NewerOlder