Skip to content

Instantly share code, notes, and snippets.

View iboard's full-sized avatar
🏠
Crafting beautiful code at home

Andreas Altendorfer iboard

🏠
Crafting beautiful code at home
View GitHub Profile
@iboard
iboard / kitchen.lua
Last active February 13, 2024 09:59
Lua script for LazyVim to run current line, current file, and the entire suite with mix test in a neovim split view
-- Run mix test in a split view in neovim
-- Andi Altendorfer, 2024-02-12
--
-- Install:
-- Add the following line in your init.lua file
--
-- require("kitchen.kitchen")
--
-- And place this file as lua/kitchen/kitchen.lua
--
defmodule Strings do
# def remove_chars!(str, _chars) do
# String.replace(str, ~r([\-\+\/\*]), "")
# end
def remove_chars(str, chars) do
source = String.split(str, "")
chars = String.split(chars, "")
Enum.reduce(source, [], fn ch, acc ->
@iboard
iboard / nginx_container.sh
Last active October 14, 2020 12:44
Start an NGINX-Docker-container to serve local html-files on a given port
#!/bin/sh
function syntax {
echo "NGINX CONTAINER"
echo ""
echo " Starts a docker container on a given port for a given html-root"
echo " directory. Andreas Altendorfer, 2020-10-14, Free Software."
echo ""
echo "Syntax:"
echo " nginx_container COMMAND NAME PORT HTML_PATH"
@iboard
iboard / .andi-bash-functions
Last active September 13, 2019 12:20
My bash functions loaded from top of bashrc
#!/bin/bash
#
# Andreas Altendorfer's Shell Function Library
# (c) 2000-2019 <[email protected]>
# License: MIT
#
# ANSI COLORS SEQUENCES
# Output a given text in color
@iboard
iboard / .bashrc
Last active September 13, 2019 12:20
Andi's BASHRC
#!/bin/bash
#
# Andi Altendorfer's .bashrc as used on OSX
# BASIC SETUP ==============================================
export TERM="xterm-256color"
export LC_CTYPE=en_US.UTF-8
# Load my function-library
test -f ~/.andi-bash-functions && source ~/.andi-bash-functions
@iboard
iboard / .vimrc.plugins
Last active September 13, 2019 12:20
my .vimrc.plugins file
"
" Vundle Plug-in Manager
"
" To verify the settings are loaded uncomment the next line and start vim
" echo "Loading Vundle Plug-in Manager"
set nocompatible
filetype off " required!
" set the runtime path to include Vundle and initialize
@iboard
iboard / .vimrc
Last active September 13, 2019 12:20
my .vimrc file
"
" Andi Altendorfer's VIM Setup
" For macbook 'craftsman', started from scratch, 2019-05-03
" ---------------------------------------------------------
if filereadable(expand("~/.vimrc.plugins"))
source ~/.vimrc.plugins
endif
@iboard
iboard / check_web_servers.sh
Created February 26, 2019 16:07
Shell script to check a list of https servers
#!/bin/bash
#
# Save this entire file to whatever-filename.sh
# run `chmod +x whatever-filename.sh`
# Edit the list of targets in the list below.
# And, finally run the script with ./whatever-filename.sh
#
@iboard
iboard / shell.exs
Last active April 15, 2020 08:07
Elixir-script template for the commandline.
#!/usr/bin/env elixir
#
# A Template for writing an Elixir script to be used on the
# command-line.
#
# (c) 2019 by Andreas Altendorfer <[email protected]>
# License: Free to use without any warranty.
#
# Usage:
# 1. Add your command to strict and aliases on @opts
@iboard
iboard / README.md
Last active January 20, 2019 07:55
Assignment for the "Function Programming In Erlang" class at FutureLearning

Functional Programming In Erlang

1.24 Pulling it all together (Assignment)

Source

The files are available in [Gist][] at Github.