- Andreas Altendorfer, [email protected]
- 2017-02-25
The files are available in [Gist][] at Github.
| require "benchmark" | |
| def log msg | |
| # NOOP | |
| end | |
| def with_if(x) | |
| x.times do |n| | |
| if (n % 3 == 0) && (n % 5 != 0) | |
| log 'Fizz' |
The files are available in [Gist][] at Github.
| #!/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 |
| #!/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 | |
| # |
| " | |
| " Andi Altendorfer's VIM Setup | |
| " For macbook 'craftsman', started from scratch, 2019-05-03 | |
| " --------------------------------------------------------- | |
| if filereadable(expand("~/.vimrc.plugins")) | |
| source ~/.vimrc.plugins | |
| endif | |
| " | |
| " 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 |
| #!/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 |
| #!/bin/bash | |
| # | |
| # Andreas Altendorfer's Shell Function Library | |
| # (c) 2000-2019 <[email protected]> | |
| # License: MIT | |
| # | |
| # ANSI COLORS SEQUENCES | |
| # Output a given text in color |
| #!/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" |
| 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 -> |