2015/01/29

Pretty print JSON

$ cat json | perl -MJSON::XS -ne 'print JSON::XS->new->pretty(1)->encode(decode_json $_)'

In ~/.bashrc:
alias jsonn='perl -MJSON::XS -ne "print JSON::XS->new->pretty(1)->encode(decode_json \$_)"'

Cat in file

$ cat > json <<EOF
{ "json": "data" }
EOF

Generate passwords

$ pwgen -y 20 1

Install Fedora

yum install vim kate speedcrunch firefox clementine \
evolution-ews pidgin git libreoffice icedtea-web dia \
ack perl-JSON-XS perl-App-cpanminus wine hplip

yum remove amarok libreoffice

rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm

yum install gstreamer gstreamer-ffmpeg \
gstreamer-plugins-bad gstreamer-plugins-bad-free \
gstreamer-plugins-bad-free-extras \
gstreamer-plugins bad-nonfree \
gstreamer-plugins-base gstreamer-plugins-good \
gstreamer-plugins-ugly \
faad2 faac libdca wget \
compat-libstdc++-33 compat-libstdc++-296 \
xine-lib-extras-freeworld

firefox add-ons: Status-4-Evar Zoom-Page

skype.com

package-cleanup --leaves | xargs -l1 yum -y remove

Add to .bashrc:
export PERL5LIB=$HOME/perl5/lib/perl5:$PERL5LIB

curl -L http://cpanmin.us | perl - local::lib

List devices

$ lsblk

Cat "eats" lines

$ reset
OR try to change terminal:
$ echo $TERM
xterm-256color
$ export TERM=linux
$ echo $TERM
$ reset

Maybe after that:
$ stty arrays ^?

2015/01/13

Find path

find -wholename '*Dir/File.pm'
find -iwholename '*Permission*'
find haystack | grep -i needle

find lib -type f -iname '*pmoops' -delete