Skip to content

Instantly share code, notes, and snippets.

Avatar

chris norris chrisnorris

  • London
View GitHub Profile
@chrisnorris
chrisnorris / fcd.fish
Last active Oct 8, 2019 — forked from rumpelsepp/fcd.fish
Fuzzy cd for fish shell using fzf
View fcd.fish
function fcd --description "Fuzzy change directory"
if set -q argv[1]
set searchdir $argv[1]
else
set searchdir $HOME
end
# https://github.com/fish-shell/fish-shell/issues/1362
set -l tmpfile (mktemp)
find $searchdir \( ! -regex '.*/\..*' \) ! -name __pycache__ -type d | fzf > $tmpfile
@chrisnorris
chrisnorris / asciify.hs
Created Sep 11, 2019
haskell script to asciify image, scaling is next step
View asciify.hs
#!/usr/bin/env stack
{- stack
--resolver lts-14.5
--install-ghc
exec ghci
--package JuicyPixels
--package lens
--package split
-}
{-# LANGUAGE ScopedTypeVariables #-}
@chrisnorris
chrisnorris / extractDirectoryNames.hs
Last active Sep 11, 2019
haskell script to recursively save directory names to file
View extractDirectoryNames.hs
{-# LANGUAGE OverloadedStrings #-}
import Data.ByteString as B hiding (filter)
import Data.Set (fromList, member)
import Data.Text as T hiding (filter)
import Data.Text.Encoding
import System.Directory
import System.FilePath.Windows
-- work around encoding problems
main = recursiveDirectoryNames "."
You can’t perform that action at this time.