<commit_before>#!/bin/bash -x
#
# Description : Fix some problems with the Raspbian OS
# Author      : <NAME> (<EMAIL>)
# Version     : 0.3 (9/Sep/14)
#
clear

tempfile=`tempfile 2>/dev/null` || tempfile=/tmp/test$$
wHEIGHT=10
wWIDTH=90

trap "rm -f $tempfile" 0 1 2 5 15

SOUND(){
	sudo sed -i 's/pcm.front cards.pcm.front/pcm.front cards.pcm.default/g' /usr/share/alsa/alsa.conf
}

BLACK_SCREEN(){
	sudo sh -c "TERM=linux setterm -foreground black -clear >/dev/tty0"
}

while true
do
	dialog --clear   \
		--title		"[ Raspbian Fixes ]" \
		--menu 		"Fix some problems with the Raspbian OS. Choose your fix or Exit:" $wHEIGHT 90 $wHEIGHT \
		Sound		"ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.front" \
		Black		"Black out the local terminal (ideal for omxplayer)" \
		Exit 		"Exit to the shell" 2>"${tempfile}"

	case $(<"${tempfile}") in
		Sound)	SOUND ;;
		Black)	BLACK_SCREEN ;;
		Exit)	exit ;;
	esac
done
<commit_msg>Added Fix SDL<commit_after>#!/bin/bash -x
#
# Description : Fix some problems with the Raspbian OS
# Author      : <NAME> (<EMAIL>)
# Version     : 0.4 (5/Apr/15)
# Compatible  : Raspberry Pi 1 (Doesn't work) & 2 (tested. OK.)
#
clear

. ../helper.sh || . ./scripts/helper.sh || . ./helper.sh || wget -q 'http://github.com/jmcerrejon/PiKISS/raw/master/scripts/helper.sh'
check_board || { echo "Missing file helper.sh. I've tried to download it for you. Try to run the script again." && exit 1; }

tempfile=`tempfile 2>/dev/null` || tempfile=/tmp/test$$
wHEIGHT=10
wWIDTH=90

trap "rm -f $tempfile" 0 1 2 5 15

SOUND(){
	sudo sed -i 's/pcm.front cards.pcm.front/pcm.front cards.pcm.default/g' /usr/share/alsa/alsa.conf
}

BLACK_SCREEN(){
	sudo sh -c "TERM=linux setterm -foreground black -clear >/dev/tty0"
}

while true
do
	dialog --clear   \
		--title		"[ Raspbian Fixes ]" \
		--menu 		"Fix some problems with the Raspbian OS. Choose your fix or Exit:" $wHEIGHT 90 $wHEIGHT \
		Sound		"ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.front" \
		Black		"Black out the local terminal (ideal for omxplayer)" \
		SDL		"Fix SDL1.2 black screen" \
		Exit 		"Exit to the shell" 2>"${tempfile}"

	case $(<"${tempfile}") in
		Sound)	SOUND ;;
		Black)	BLACK_SCREEN ;;
		SDL)	SDL_fix_Rpi ;;
		Exit)	exit ;;
	esac
done

{'fraction_non_alphanumeric': 0.15184859154929578, 'fraction_numerical': 0.023327464788732395, 'mean_word_length': 3.2406716417910446, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3914197', 'n_tokens_mistral': 987, 'n_tokens_neox': 883, 'n_words': 256}