Skip to content

Instantly share code, notes, and snippets.

@DLakomy
DLakomy / zshrc_alias_checker.zsh
Last active July 3, 2023 18:07
# alias cd="rm -rf" defender
# I think I'll sleep better knowing what aliases do I get
# from the various scripts I use in zshell...
# ...
# at the end of the .zshrc file add this:
# to recreate the reference file, use the command `alias > .aliases-reference` in your home directory
if ! diff -U0 ~/.aliases-reference --label reference <(alias) --label aliases; then
local RED='\033[0;31m'
local NC='\033[0m'
echo "${RED}The list of aliases doesn't match the .aliases-reference file!${NC}"
@DLakomy
DLakomy / bfIntepreter.hs
Last active September 3, 2022 18:09
Possibly working BF intepreter
import Text.Parsec.String (Parser)
import Control.Applicative hiding ((<|>))
import Text.ParserCombinators.Parsec hiding (many)
import Data.Char(chr, ord)
import System.Environment
data BFCmd
= BFPrev
| BFNext
| BFInc
@DLakomy
DLakomy / sudoku.hs
Last active April 26, 2021 07:30
Sudoku Solver in Haskell
-- inspired by https://gist.github.com/pathikrit/a32e17832296befd6b94
-- it works with the sample;
-- if it doesn't work in general... it's a pity, but I've had enough :D I prefer Scala
-- it's my first Haskell program
-- Exercises for the reader
-- change List to Sequence, it can be more efficient for index-based access
-- guarantee that the board is 9x9 via its type
import Data.List
@DLakomy
DLakomy / Vagrantfile
Last active October 14, 2022 07:06
Light Ubuntu Vagrant (20.04) with XFCE
Vagrant.configure("2") do |config|
config.vm.box = "bento/ubuntu-20.04"
config.vm.provider :virtualbox do |vb|
vb.gui = true
vb.memory = "4096"
vb.customize ["modifyvm", :id, "--vram", "128"]
vb.customize ["modifyvm", :id, "--clipboard", "bidirectional"]
vb.customize ["modifyvm", :id, "--draganddrop", "bidirectional"]
end