Skip to content

Instantly share code, notes, and snippets.

data PasswordEntry = PasswordEntry { min' :: Int
, max' :: Int
, letter :: T.Text
, password :: T.Text
, fullText :: T.Text
} deriving (Show)
instance Read PasswordEntry where
readsPrec _ value = do
[(person, "")]
where
filterAddsTo :: (Foldable t, Eq a, Num a) => a -> [t a] -> [t a]
filterAddsTo num arr = filter (\x -> (foldl (+) 0 x) == num) arr
multiplyAllArrays :: (Foldable t, Num b) => [t b] -> [b]
multiplyAllArrays arr = map (foldl (*) 1) arr
advent1 :: IO ()
advent1 = do
filecontent <- readFile "accounting.csv"
let expenseEntries = (:[]) <$> read <$> (lines filecontent) :: [[Int]]
### Added by Zinit's installer
if [[ ! -f $HOME/.zinit/bin/zinit.zsh ]]; then
print -P "%F{33}▓▒░ %F{220}Installing %F{33}DHARMA%F{220} Initiative Plugin Manager (%F{33}zdharma/zinit%F{220})…%f"
command mkdir -p "$HOME/.zinit" && command chmod g-rwX "$HOME/.zinit"
command git clone https://github.com/zdharma/zinit "$HOME/.zinit/bin" && \
print -P "%F{33}▓▒░ %F{34}Installation successful.%f%b" || \
print -P "%F{160}▓▒░ The clone has failed.%f%b"
fi
source "$HOME/.zinit/bin/zinit.zsh"
Notes:
new buffer: spc + b + N + n
Org mode:
snippet: spc + i + s
Fundamental mode sibling: , + i + s
z + a

Keybase proof

I hereby claim:

  • I am lethjakman on github.
  • I am lethjakman (https://keybase.io/lethjakman) on keybase.
  • I have a public key ASCqnTxJiuXAf5I3Vg6YFnZXbB5_41RsX-8zCc9m8dVSSQo

To claim this, I am signing this object:

class Test
def self.call
puts "You hit it"
end
end
Test.()
" Redesigned mapping for the Colemak layout for Vim 7.0
" 2008-04-21 Shai Coleman, http://colemak.com/ . Public domain.
"
" * Use ":source colemak.vim" (without quotes) to load this file. Adjust path to colemak.vim if needed.
" * Add the line: "source colemak.vim" (without quotes) in your .vimrc file to automatically load this file.
" It is recommended to load colemak.vim after all other Vim scripts.
" recommended commands for running under Linux console
" $ export TERM=xterm # make Backspace and Ctrl-H work correctly
" $ stty -ixon -ixoff # make Ctrl+S and Ctrl+Q work correctly
class PrivateParent
private
def name
'Mommy'
end
end
class PrivateChild < PrivateParent
def get_parent_name
# Implicit receiver
15:28:32 jsilver | Bill Nye the Scyence Guy
15:28:51 jsilver | Bill Nai the Sai-ens guy
15:30:00 interactionjaxsn | bill nye the cyan guy?
15:30:50 lethjakman | bill nei the saiyen guy
15:31:34 interactionjaxsn | is it over 9000?
15:32:09 lethjakman | interactionjaxsn: only if there's evidence.
15:33:47 NBarnes | Beel Nii the Cylon Guy
15:34:52 jsilver | lmao
15:36:30 davidcelis | Bill Nye the Bill Nye Guy
1) Error:
WarehousesControllerTest#test_should_get_index:
ActionController::UrlGenerationError: No route matches {:action=>"index", :controller=>"warehouses"}
test/controllers/warehouses_controller_test.rb:14:in `block in <class:WarehousesControllerTest>'