, ,

Category: OS

  • wget – Recursive GET – download and crawl websites

    recursively download and crawl web pages using wget wget -erobots=off -r http://www.guguncube.com in case downloading hangs due to missing/incorrect robots.txt, just use “-erobots=off”. This skips downloading robots.txt altogether. Multiple URLs wget -erobots=off -i url-list.txt References 1. http://skeena.net/kb/wget%20ignore%20robots.txt

  • Ubuntu – set default text editor

    sudo update-alternatives –config editor #There are 5 choices for the alternative editor (providing /usr/bin/editor). # # Selection Path Priority Status #———————————————————— #* 0 /bin/nano 40 auto mode # 1 /bin/ed -100 manual mode # 2 /bin/nano 40 manual mode # 3 /usr/bin/mcedit 25 manual mode # 4 /usr/bin/vim.basic 30 manual mode # 5 /usr/bin/vim.tiny 10…

  • VMWare Player Installation in Ubuntu 11.04/12.04/12.10/13.10

    Installation 1. Prepare sudo apt-get install build-essential linux-headers-`uname -r` -y sudo apt-get install make -y sudo apt-get install gcc -y 2. Download vmware player a@a:~$ cd Downloads a@a:~/Downloads$ ls VMware-Player-4.0.2-591240.i386.bundle a@a:~/Downloads$ sudo sh VMware-Player-4.0.2-591240.i386.bundle ???? sudo sh vmware-installer -u vmware-player The installed application can be found under: Applications -> System Tools -> VMWare Player Deinstallation…

  • 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…