Skip to content

Instantly share code, notes, and snippets.

View hauke96's full-sized avatar

Hauke Stieler hauke96

View GitHub Profile
# Parses the install specific arguments
# Needed parameter: $@
function parse_install_args(){
for (( i=1; i<=$#; i++ ))
do
arg=${@:$i:1} # Gets the string i
val=${@:$i+1:1} # Gets the string i+1
case $arg in
-h|--help)
#!/bin/bash
# Global variables
package=
command=
# Some have default values
parsing_succeeded=true
# Parses the install specific arguments
for (( i=1; i<=$#; i++ ))
do
arg=${@:$i:1} # Gets the string i
val=${@:$i+1:1} # Gets the string i+1
case $arg in
-p)
package=$val
# The parse the next argument and not this value
((i++))
#!/bin/bash
# Global variables
package=
command=
# Some have default values
parsing_succeeded=true
for (( i=1; i<=$#; i++ ))
@hauke96
hauke96 / libffmpeg_vivaldi.md
Last active July 4, 2023 18:56
Install libffmpeg.so in vivaldi

Install libffmpeg.so in vivaldi

This short instruction shows how to install libffmpeg.so in vivaldi to play e.g. mp4 videos.

I use the ubuntu repository for that but this is just one way to get the file.

1. Download .deb package

Go to http://security.ubuntu.com/ubuntu/pool/universe/c/chromium-browser/ and choose the latest chromium-codecs-ffmpeg-extra and download it.

For example: chromium-codecs-ffmpeg-extra_58.0.3029.110-0ubuntu1.1354_amd64.deb

@hauke96
hauke96 / logger.go
Last active July 29, 2017 15:30
Simple logger for golang
package logger
import (
"fmt"
"os"
"runtime"
"runtime/debug"
"strconv"
"strings"
)