Debian9 Stretch Configure Locale en_US.UTF-8

WTF Russians?

apt-listchanges: Can't set locale; make sure $LC_* and $LANG are correct!
Reading changelogs... Done
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LC_TIME = "ru_RU.UTF-8",
	LC_MONETARY = "ru_RU.UTF-8",
	LC_ADDRESS = "ru_RU.UTF-8",
	LC_TELEPHONE = "ru_RU.UTF-8",
	LC_NAME = "ru_RU.UTF-8",
	LC_MEASUREMENT = "ru_RU.UTF-8",
	LC_IDENTIFICATION = "ru_RU.UTF-8",
	LC_NUMERIC = "ru_RU.UTF-8",
	LC_PAPER = "ru_RU.UTF-8",
	LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
locale: Cannot set LC_ALL to default locale: No such file or directory
(Reading database ... 26424 files and directories currently installed.)
Configure
export LANGUAGE=en_US.UTF-8 &&
export LANG=en_US.UTF-8 &&
export LC_ALL=en_US.UTF-8 &&
locale-gen en_US.UTF-8 &&
dpkg-reconfigure locales
2019/05/17 · Oleg Zvezdo4kin · 0 комментариев (-я)

Debian 9 php5.6 Install

apt install ca-certificates apt-transport-https 
wget -q https://packages.sury.org/php/apt.gpg -O- | apt-key add -
echo "deb https://packages.sury.org/php/ stretch main" | tee /etc/apt/sources.list.d/php.list
apt update
apt install php5.6
apt install php5.6-cli php5.6-common php5.6-curl php5.6-mbstring php5.6-mysql php5.6-xml

https://tecadmin.net/install-php-debian-9-stretch/

2019/05/17 · Oleg Zvezdo4kin · 0 комментариев (-я)

ubuntu_remap_super_key

I have a keyboard without the "Win" key.

:-\

Reassigned this function to "Alt"

Default:
$ xmodmap -pm
xmodmap:  up to 4 keys per modifier, (keycodes in parentheses):

shift       Shift_L (0x32),  Shift_R (0x3e)
lock        Caps_Lock (0x42)
control     Control_L (0x25),  Control_R (0x69)
mod1        Alt_L (0x40),  Alt_R (0x6c),  Meta_L (0xcd)
mod2        Num_Lock (0x4d)
mod3      
mod4        Super_L (0x85),  Super_R (0x86),  Super_L (0xce),  Hyper_L (0xcf)
mod5        ISO_Level3_Shift (0x5c),  Mode_switch (0xcb)
Remove "Super Key" from "mod4"
$ xmodmap -e "remove mod4 = Super_L"
$ xmodmap -e "remove mod4 = Super_R"
$ xmodmap -pm
xmodmap:  up to 3 keys per modifier, (keycodes in parentheses):

shift       Shift_L (0x32),  Shift_R (0x3e)
lock        Caps_Lock (0x42)
control     Control_L (0x25),  Control_R (0x69)
mod1        Alt_L (0x40),  Alt_R (0x6c),  Meta_L (0xcd)
mod2        Num_Lock (0x4d)
mod3      
mod4        Hyper_L (0xcf)
mod5        ISO_Level3_Shift (0x5c),  Mode_switch (0xcb)
Add "Super_L" to "mod1"
xmodmap -e "add mod1 = Super_L"
$ xmodmap -pm
xmodmap:  up to 5 keys per modifier, (keycodes in parentheses):

shift       Shift_L (0x32),  Shift_R (0x3e)
lock        Caps_Lock (0x42)
control     Control_L (0x25),  Control_R (0x69)
mod1        Alt_L (0x40),  Alt_R (0x6c),  Super_L (0x85),  Meta_L (0xcd),  Super_L (0xce)
mod2        Num_Lock (0x4d)
mod3      
mod4        Hyper_L (0xcf)
mod5        ISO_Level3_Shift (0x5c),  Mode_switch (0xcb)
Why?

Ctrl+Alt+right_arrow

Ctrl+Alt+left_arrow

https://habr.com/ru/post/222285/

2019/05/13 · Oleg Zvezdo4kin · 0 комментариев (-я)

freeswitch a1-hash and password generating

a1-hash & password for Directory in Postgresql

 apt-get install uuid
#!/bin/bash
s=$(date +%d-%m-%y_%H:%M:%S)
d=pass_gen_md5-$s
RES=`su -c "psql -t -d DB -c  'SELECT domain, id FROM directory';" USER`
printf "$RES" >> $d
echo "" >> $d
while IFS="|" read domain id; do
	trdom=`echo "$domain" | tr -d [:blank:]`
	trid=`echo "$id" | tr -d [:blank:]`
	pswd=`uuid | tr -d [:blank:]-`
    hash=`echo "$trid:$trdom:$pswd" | md5sum | tr -d [:blank:]-`
    #su -c "psql -d DB -c \"UPDATE directory SET password = '$hash' where id = '$trid'\";" USER
    echo "$trid:$trdom:$pswd"
    echo "$trid:$trdom:$pswd" | md5sum | tr -d [:blank:]-
done < $d

bash manipulating string

FileName="/var/www/html/index.html"
echo "${FileName}"
/var/www/html/index.html
 
echo "${FileName%/*}"
/var/www/html
 
echo "${FileName##*/}"
index.html
 
TmpVal=$(echo "${FileName%.*}")
echo "${TmpVal##*/}"
index
 
echo "${FileName//\//+}"
+var+www+html+index.html

Description…

  • ${variable%pattern} removes first pattern on the right
  • ${variable%%pattern} removes last pattern on the right
  • ${variable#pattern} removes first pattern on the left
  • ${variable##pattern} removes last pattern on the left
  • ${variable/src/pattern} replace all entry

https://www.tldp.org/LDP/abs/html/string-manipulation.html

2019/03/27 · Oleg Zvezdo4kin · 0 комментариев (-я)

<< Новые записи | Предыдущие записи >>

Только авторизованные участники могут оставлять комментарии.
  • blog.txt
  • Последние изменения: 2019/03/27