Listing posts

Displaying posts 176 - 180 of 328 in total
Common bashrc settings
mouse 2007 · person cloud · link
Last update
2019-09-11
2019
09-11
« — »
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
PS1="\[\033[0;36m\]\t\[\033[01;34m\][\w]\[\033[00m\]\n\[\033[01;32m\]\u@\h\[\033[00m\]\$ "
[ $EUID -eq 0 ] && PS1="\[\033[01;34m\][\w]\[\033[00m\]\n\[\033[01;31m\]\u\[\033[00m\]# "
PATH=".:$HOME/bin:/opt/bin:$PATH"
EDITOR=/bin/nano
CONCURRENCY_LEVEL=`grep processor /proc/cpuinfo|wc -l`
HISTSIZE=10000
export PS1  PATH  EDITOR CONCURRENCY_LEVEL  HISTSIZE

alias d='clear; ls -lhX --color'
alias md=mkdir
alias cls=clear
alias cd..='cd ..'
alias rm='rm -i'
alias x=exit
alias dum='du -h --max-depth=1'
alias dumm='du -h --max-depth=1|grep M'
alias df='df -h'
alias see=geeqie
alias Grep=grep
alias Less=less
alias java='java -server'
[ -f /usr/lib/mc/mc.sh ] && . /usr/lib/mc/mc.sh

~~~ * ~~~

Keep spam out of your Google Calendar
mouse 1855 · person cloud · link
Last update
2019-08-25
2019
08-25
« — »

General settings

  1. Go to Google Calendar website
  2. Open settings by clicking the gear
  3. Event Settings > Automatically add invitations > No, only show invitations to which I've responded
  4. View Options > uncheck Show declined events
  5. Events from Gmail > uncheck Automatically add events from Gmail to my calendar

App settings

  1. Open the Google Calendar app
  2. Menu > Settings > General > uncheck Show declined events

Source: Lifehacker.com


~~~ * ~~~

Restore deleted locales by localepurge
mouse 1938 · person cloud · link
Last update
2019-08-23
2019
08-23
«restore locales/change user default locale»
  • reset locales:
1
2
3
4
5
6
7
8
# choose locales to keep
dpkg-reconfigure localepurge

# reinstall files
apt-get --reinstall install `dpkg -S /usr/share/locale/it | tr -d , | sed -r 's/: .+$//'`

# choose locales to build and set the default one
dpkg-reconfigure locales
  • set a different user locale for the shell:
1
2
echo "LANGUAGE=it"     >> ~/.profile
echo "LANG=it_IT.utf8" >> ~/.profile
  • set a different user locale for the display manager in ~/.dmrc:
1
2
3
[Desktop]
Session=xfce
Language=it_IT.utf8

Source: Vitavonni, .profile settings, Debian wiki


~~~ * ~~~

Debian | purge config for uninstalled packages
mouse 1062 · person cloud · link
Last update
2019-08-20
2019
08-20
« — »
1
2
3
4
5
# show uninstalled packages with orphaned config files
dpkg -l|grep "^rc"

# remove orphaned config files
aptitude purge ?config-files

~~~ * ~~~

Bash coprocesses
mouse 1610 · person cloud · link
Last update
2019-07-25
2019
07-25
«control async process stdin/stdout simultaneously»

A coprocess is executed asynchronously in a subshell with a two-way pipe established between the executing shell and the coprocess.

Esample: redirect netcat stdout ${COPROC[0]} to bash stdin, and bash stdout to netcat stdin ${COPROC[1]}

1
2
coproc netcat -l -p 1234
exec bash <&${COPROC[0]} >&${COPROC[1]} 2>&1

Source: stackexchange, gnu.org