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
call plug#begin(expand('<sfile>:p:h') . '/plugged') | |
Plug 'neovim/nvim-lspconfig' | |
Plug 'hrsh7th/cmp-nvim-lsp' | |
Plug 'hrsh7th/cmp-buffer' | |
Plug 'hrsh7th/nvim-cmp' | |
Plug 'nvim-lua/plenary.nvim' | |
Plug 'scalameta/nvim-metals' | |
" For vsnip user. | |
Plug 'hrsh7th/cmp-vsnip' |
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 normalize(s: String) = (s + s).sliding(s.length).max | |
val words = scala.io.Source.fromFile("enable1.txt").getLines.toVector | |
val groupOfFour = words.toList.groupBy(normalize).filter(_._2.length == 4) | |
println(groupOfFour) |
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
files=(*.foo) | |
for i in {1..$#files}; do | |
file=$files[$i] | |
pad=${#${#files}} | |
printf "\e[2K\e[G ‣ %${pad}d / %${pad}d: %s" $i $#files $file | |
{ | |
# do stuff with file here | |
} &>/dev/null | |
done | |
echo |
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
-- handy.lua - awesome module for popup clients | |
-- | |
-- Usage: | |
-- handy = require("handy") | |
-- handy("console", "urxvt", | |
-- | |
local awful = require("awful") | |
local inspect = inspect | |
local handy = {} |
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/zsh | |
tt_data=$(curl -s https://iceportal.de/api1/rs/tripInfo/trip) | |
if ! head -n 3 <<<"$tt_data" | grep -q '{'; then | |
echo "Invalid API response. Are you on the ICE Wifi?" | |
exit 1 | |
fi | |
tt_data=$( |
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/zsh | |
tt_data=$(curl -s https://iceportal.de/api1/rs/tripInfo/trip) | |
if ! head -n 3 <<<"$tt_data" | grep -q '{'; then | |
echo "Invalid API response. Are you on the ICE Wifi?" | |
exit 1 | |
fi | |
tt_data=$( |
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
package model.attributes | |
import monocle.Iso | |
import monocle.macros.GenIso | |
final case class Stamina(value: Int) extends AnyVal | |
final case class Sanity(value: Int) extends AnyVal | |
final case class Speed(value: Int) extends AnyVal | |
final case class Sneak(value: Int) extends AnyVal |
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/zsh | |
zparseopts -D -E h=help -help=help d=desc -describe=desc | |
function not-in-left() { | |
awk 'NR==FNR{a[$0]=1;next}!a[$0]' "$@" | |
} | |
function first-col() { | |
cut -d$'\t' -f1 |
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
trait Element[+R] | |
class NullElement[+R] extends Element[R] | |
trait BugRepro { | |
def combineElements(actions: Element[_]*): Element[Unit] | |
def sequence[R, M[+_] <: TraversableOnce[_]](in: M[Element[R]]): Element[M[R]] | |
val mySeq = Seq(1,2,3) |
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
# if there is currently something typed, accept-and-infer-next-history like usual | |
# if the input line is empty, recall the last command and infer based on that | |
# needs deduplication of history disabled! (unsetopt HIST_SAVE_NO_DUPS HIST_IGNORE_ALL_DUPS) | |
local function accept-or-recall-then-infer-history() { | |
if [[ -z $PREBUFFER$BUFFER ]]; then | |
zle up-line-or-history | |
zle infer-next-history | |
else | |
zle accept-and-infer-next-history -- "$@" | |
fi |
NewerOlder