Category: ubuntu
-
Fat Ducks – Finding Disk Space Hogs Quickly in Unix
# install numfmt through coreutils sudo apt-get install -y coreutils alias ducks=’sudo du -cbs * | sort -rn| head -11|numfmt –field 1 –to=iec|column -t’ Add to .bash_aliases > cat ~/.bash_aliases alias ducks=’sudo du -cbs * | sort -rn| head -11|numfmt –field 1 –to=iec|column -t’ .. > ducks 10TB this 5GB is 2MB hello 10KB world…
-
Ubuntu – Install Skype 4.3 on Ubuntu 14.04
# remove and purge old skype versions sudo apt-get remove -y skype skype-bin:i386 skype:i386 sudo apt-get purge -y skype skype-bin:i386 skype:i386 # remove and purge old sni-qt versions sudo apt-get remove -y sni-qt:i386 sudo apt-get purge -y sni-qt:i386 # install new sni-qt version sudo apt-get install -y sni-qt:i386 # download and install latest skype version…
-
Python – Headless Selenium Performance Tests with Google Chrome, Browsermob-Proxy and Xvfb
# -*- coding: utf-8 -*- “”” # Install xvfb sudo apt-get install -y xvfb # create build directory mkdir -p ~/build/selenium cd ~/build/selenium # Install API for browsermob-proxy and selenium sudo pip install selenium browsermob-proxy –upgrade # download browsermob proxy wget https://github.com/downloads/webmetrics/browsermob-proxy/browsermob-proxy-2.0-beta-6-bin.zip unzip browsermob-proxy-2.0-beta-6-bin.zip # copy browsermob-proxy to /var/lib sudo cp -r browsermob-proxy /var/lib/ sudo…
-
Python – Testing Selenium with Google Chrome
# use a custom directory for download and installation mkdir -p ~/build/selenium cd ~/build/selenium # Install Google Chrome wget -q -O- https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add – sudo sh -c ‘echo “deb http://dl.google.com/linux/chrome/deb/ stable main” > /etc/apt/sources.list.d/google.list’ sudo apt-get update sudo apt-get install -y google-chrome-stable # Download Selenium wget http://selenium-release.storage.googleapis.com/2.41/selenium-server-standalone-2.41.0.jar # Download Chrome Driver Selenium…
-
Ubuntu – Resolving Package Problems
One of the many ways to resolve package issues in ubuntu 🙂 sudo apt-get -f install sudo apt-get update # to update your package list. sudo apt-get autoclean # to clean up any partial packages. sudo apt-get clean # to clean up the apt cache. sudo apt-get autoremove # will clean up any unneeded dependencies.…
-
monit – FTP checks
check host ftp.redhat.com with address ftp.redhat.com if failed icmp type echo with timeout 15 seconds then alert if failed port 21 protocol ftp then exec “/usr/X11R6/bin/xmessage -display :0 ftp connection failed” alert foo@bar.com References 1. https://mmonit.com/monit/documentation/monit.html
-
monit – URL, HTTP and Elasticsearch checks
1. Simple URL Check check host elastic_health_check with address 0.0.0.0 if failed url http://0.0.0.0:9200/_cluster/health for 2 cycles then alert 2. URL with Basic Authentification # http://stackoverflow.com/questions/1115816/monit-and-apache-site-behind-http-basic-auth # It seems to be possible to include the credentials in the URL, have you tried this?: # (from http://mmonit.com/monit/documentation/monit.html#connection_testing ) # If a username and password is included…
-
Unix – Permanent SSH Tunnel – The easy way 🙂
OK, this is a dead easy instruction of setting up a permanent ssh tunnel through cron This establishes port forwarding to a remote server. Command crontab -e nc -z localhost || ssh @ -N -L :: & Example * * * * * nc -z localhost 15432 || ssh a@big-bad-server.net -N -L 15432:10.0.80.1:5432 -L 25432:10.0.80.2:5432…
-
Ubuntu – XnView – Installation – image viewer
XnView is a great image viewer popular under Windows and now available in Ubuntu 🙂 mkdir -p ~/build/xnview cd ~/build/xnview wget http://download.xnview.com/XnViewMP-linux-x64.deb sudo dpkg -i XnViewMP-linux-x64.deb sudo apt-get install -f References 1. XnView Home 2. http://download.xnview.com/
-
Ubuntu – Linux Process Explorer – GUI – Installation
A process monitoring tool which looks like Sysinternals Process Explorer # download directory mkdir -p ~/build/process-explorer cd ~/build/process-explorer # download wget http://optimate.dl.sourceforge.net/project/procexp/bin_v1/procexp_1.5.275-0ubuntu1_all.deb # install dependancies sudo apt-get install -y python-configobj # install process explorer sudo dpkg -i procexp_1.5.275-0ubuntu1_all.deb # start sudo /bin/sh /usr/bin/procexp.sh # => more errors, doesn’t work # => aaargh, i give up!…