Skip to content

Instantly share code, notes, and snippets.

View elhenro's full-sized avatar

Henry Schober elhenro

View GitHub Profile
@elhenro
elhenro / gist:89e4288beb34a7b62bea72bd79e3697e
Last active April 12, 2018 22:37
Debugging Processwire Installation on Ubuntu/Osx
Processwire 500 Internal Server Error
check site/config.php mysql logins
check .htaccess
- check if it is read (paste shit in the top)
- check if it works with apache2
Processwire 403 Permission Denied
@elhenro
elhenro / convertVideoToWebVideoFormats.sh
Created March 13, 2018 13:24
convert a video to the web video formats: mp4, webm, ogg
#!/bin/bash
# how to use: sh convertVideoToWebVideoFormats.sh fileToConvert.mp4
# how to use for batch conversion: find "$VIDEOS" -name '*.mp4' -exec sh -c 'ffmpeg ... or sh convertV..
input=$1
output=$(echo $1 | sed 's/^\(.*\)\.[a-zA-Z0-9]*$/\1/')
# mp4
ffmpeg -i $input -vcodec h264 -acodec aac -strict -2 -s 1280x720 $output.mp4
# webm
#ffmpeg -i $input -f webm -vcodec libvpx -acodec libvorbis -ab 128000 -crf 22 -s 1280x720 $output.webm
=== * HiFi.conf ===
SectionVerb {
EnableSequence [
cdev "hw:sklnau8825max"
cset "name='codec1_out mo media0_in mi Switch' off"
cset "name='codec0_out mo media0_in mi Switch' on"
cset "name='DAC Oversampling Rate' 128"
cset "name='Headset Mic Switch' off"
cset "name='media0_out mo codec0_in mi Switch' off"
# attention: this will delete all databases and everything mongodb related
# intended to fix a not starting mongoDb installation on ubuntu > 18.04
sudo apt purge mongodb-org*
sudo rm -r /var/log/mongodb
sudo rm -r /var/lib/mongodb
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
echo "deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list
sudo apt update
sudo apt-get install -y mongodb-org
@elhenro
elhenro / .Xresources
Last active May 24, 2019 10:18
elhenro .Xresources
! URxvt
URxvt.saveLines: 2000
URxvt.scrollBar: False
URxvt.scrollstyle: rxvt
URxvt.cursorBlink: False
! Extensions
URxvt.perl-ext-common: default,selection-to-clipboard,resize-font
URxvt.urlLauncher: xdg-open
URxvt.urlButton: 1
URxvt.underlineURLs: True
set previewer ~/.config/lf/pv.sh
#!/bin/sh
case "$1" in
*.tar*) tar tf "$1";;
*.zip) unzip -l "$1";;
*.rar) unrar l "$1";;
*.7z) 7z l "$1";;
*.pdf) pdftotext "$1" -;;
*) highlight -O ansi "$1" || cat "$1";;
esac
@elhenro
elhenro / .vimrc
Last active January 22, 2021 16:33
elhenro vimrc
set encoding=utf-8
set expandtab
set shiftwidth=2
set tabstop=2
set mouse=a
set number
set autoread
set diffopt+=iwhite
set nocompatible
set hidden
@elhenro
elhenro / bashrc
Created May 9, 2019 10:17
bash rc profile
# ~/.bashrc
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
PS1='[\u@\h \W]\$ '
# go
export PATH="$PATH:$HOME/go/bin"
# nvm
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
@elhenro
elhenro / zsh-spaceship-hide-stuff
Created May 11, 2019 11:10
zsh-spaceship-hide-stuff
SPACESHIP_GIT_SHOW=false
SPACESHIP_HG_SHOW=false
SPACESHIP_HG_BRANCH_SHOW=false
SPACESHIP_HG_STATUS_SHOW=false
SPACESHIP_PACKAGE_SHOW=false
SPACESHIP_NODE_SHOW=false
SPACESHIP_RUBY_SHOW=false
SPACESHIP_ELM_SHOW=false
SPACESHIP_ELIXIR_SHOW=false
SPACESHIP_XCODE_SHOW_LOCAL=false