Skip to content

Instantly share code, notes, and snippets.

Avatar

Hauke Stieler hauke96

View GitHub Profile
View command_stub.sh
# 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)
View command.sh
#!/bin/bash
# Global variables
package=
command=
# Some have default values
parsing_succeeded=true
# Parses the install specific arguments
View simple_stub.sh
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++))
View simple.sh
#!/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 Sep 16, 2021
Install libffmpeg.so in vivaldi
View libffmpeg_vivaldi.md

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 Jul 29, 2017
Simple logger for golang
View logger.go
package logger
import (
"fmt"
"os"
"runtime"
"runtime/debug"
"strconv"
"strings"
)