1. How to Make a Bootable USB From a Linux ISO File

    Question! How do I make a bootable usb pendrive out of a linux distro ISO image?

    Answer!  Open up a console then type in the following command:

    sudo dd bs=4M if=/path/to/ISO/File.iso of=/dev/sdX status=progress oflag=sync

    Then push the enter key.

    Note! Repalce the "X" in "sdX" by your pendrive corresponding letter.

    Tags
  2. A Short and Simple Python Script

    # file: App.py

    name = input("Hello, what's your name?: ")

    print("Hello, " + name + ", and welcome!")

    #Taking an integer value and assigning it to the service variable for later use

    service = int(input("Now please take a sit and tell me how many guests are you bringing with you tonight?: "))

    #Making a condition to define if the subjects will be plural or singular

    if service > 1:

        invitee = " guests"

        table = " them."

        clients = " all"

    else:

        invitee = " guest"

        table = " the both of you."

        clients = " the both"

    print("Oh, " + str(service) + invitee + "..., then I shall prepare a table for" + table)

    menu = ["Salad", "Sandwich", "Tiramisu"]

    print("In regards to your order, we have " + str(len(menu)) + " specialities today !")

    choice = input("What will you begin with, " + menu[0] + ", " + menu[1] + " or " + menu[2] + " ?")

    #Add code to accept only the available menu choices

    print("So " + choice + " for" + clients + " of you")

    Tags
  3. Bleeding Edge Graphics Drivers for Kubuntu

    Question! How do I install the latest graphics drivers for my GPU (ATI AMDGPU) and the latest mesa under Kubuntu 16.10 (also available for 16.04)?

    Answer!  Open up a console then type in the following command:

    sudo apt-add-repository 'ppa:paulo-miguel-dias/mesa'

    Then push the enter key, and run the next command:


    sudo apt update && sudo apt upgrade

    Note! after this do a reboot and you should be running the latest mesa and AMDGPU drivers with OpenGL 4, to make sure you can check with the following command:


    glxinfo | grep "OpenGL"

    Note! If the terminal complains about glxinfo not being available, you should install mesa-utils, just do a:

    sudo apt install mesa-utils

    Tags
  4. Default monitor on dual monitor setup

    Question! How to set the default monitor for applications in a dual monitor configuration.

    Answer!  Open up a console then type in the following command:

    xrandr -q

    Identify your primary monitor among the list you get, then type in the following command :

    xrandr --output DVI-0 --primary

    Note! Replace DVI-0 by your identified monitor's id.

    Tags
  5. Convert ZNC logs from version 1.4 to 1.6

    Question! How to convert ZNC 1.4 logs to version 1.6.

    Answer!  Download the attached script bellow (convert-znc-1.4-logs-to-1.6.sh), then run it.
     

    sh convert-znc-1.4-logs-to-1.6.sh
     

    Please read the info in the beginning of the script file by editing it :

    nano convert-znc-1.4-logs-to-1.6.sh

    Note! Script taken from https://github.com/ZacharyDuBois/Random-Scripts all credit goes to Zachary DuBois.

     

    convert-znc-1.4-logs-to-1.6.sh

    Tags
  6. Run a JNLP file (Java)

    Question! How to run a jnlp file under terminal.

    Answer!  Open up a console or terminal then type the following command :
     

    sudo apt-get install icedtea-netx
     

    Then type the following command always in the console while in the target file's directory :

    javaws filename.jlnp

    Note! Replace "filename" by the name of the file you want to run.

    Tags
  7. What is using a specific port (Network)

    Question! How to show what is using a specific port (Network).

    Answer!  Open up a console or terminal then type the following command :

    sudo netstat -tunap|grep 23

    Note! Replace "23" by the port you want.

    Tags
  8. Run a java file

    Question! How to run a java file under terminal.

    Answer!  Open up a console or terminal then type the following command :

    java -jar filenamehere.jar

    Tags
  9. Batch Image Resize

    Question! How to resize multiple images at once.

    Answer!  You will first need a tool called ImageMagick, so bring up the console and type in the following command to install it :

    apt-get install imagemagick

     Then type the following command in the console :


    for i in $( ls *.jpg); do convert -resize 50% $i re_$i; done
     

    Note! Replace "jpg" by the extension your images have (it's case sensitive), and "50" by the percentile you want your images to be resized by.

    Tags
  10. Mounting ISO files

    Question! How to mount an ISO image file so that you can read its content.

    Answer! Type the following command in the console :


    mount -o loop <ISO file> <target directory>
     

    Note! Replace <ISO file> and <target directory> by the corresponding names.

    Tags