Pages

10 Jul 2015

Enable Java/NPAPI in Google Chrome

Skip to end of metadata
Go to start of metadata

How to enable Java in Google Chrome

Background

NPAPI support by Chrome (Copied from Java's website)

The Java plug-in for web browsers relies on the cross platform plugin architecture NPAPI, which has long been, and currently is, supported by all major web browsers. Google announced in September 2013 plans to remove NPAPI support from Chrome by "the end of 2014", thus effectively dropping support for Silverlight, Java, Facebook Video and other similar NPAPI based plugins. Recently, Google has revised their plans and now state that they plan to completely remove NPAPI by late 2015. As it is unclear if these dates will be further extended or not, we strongly recommend Java users consider alternatives to Chrome as soon as possible. Instead, we recommend Firefox, Internet Explorer and Safari as longer-term options. As of April 2015, starting with Chrome Version 42, Google has added an additional step to configuring NPAPI based plugins like Java to run — see the section Enabling NPAPI in Chrome Version 42 and laterbelow.

The Fix

Enabling NPAPI in Chrome Version 42 and later

As of Chrome Version 42, an additional configuration step is required to continue using NPAPI plugins.
  1. In your URL bar, enter:
    chrome://flags/#enable-npapi 
  2. Click the Enable link for the Enable NPAPI configuration option.
  3. Click the Relaunch button that now appears at the bottom of the configuration page.
Developers and System administrators looking for alternative ways to support users of Chrome should see this blog, in particular "Running Web Start applications outside of a browser" and "Additional Deployment Options" section.

11 Apr 2015

Partitioning Linux File System (Redhat, Fedora, CentOS)

Tutorial-Partition-Linux
/boot recommended size at least 500MB
The partition mounted on /boot contains the operating system kernel along with files used for the bootstrap process.

/ recommended size of 10 GB
This is where the root directory is located. The root directory is the top-level  and by default all files are written to this partition unless a different partition is mounted in the path being written to (i.e /boot or /home). 5GB root partition allows you to install a minimal installation, it is recommended to allocate at least 10GB so that you can perform a full installation, choosing all package groups.

/home recommended size up to user but normally 50GB or over
User data storage which is separate from system data, create a dedicated partition within a volume group for the /home directory. This partition should be sized accordingly on the amount of user data that will be stored locally.

swap (varies)

  • Systems with 4GB of ram or less require a minimum of 2GB of swap space 
  • Systems with 4GB to 16GB of ram require a minimum of 4GB of swap space
  • Systems with 16GB to 64GB of ram require a minimum of 8GB of swap space
  • Systems with 64GB to 256GB of ram require a minimum of 16GB of swap space

SSD Optimization

Using the btrfs file system you can optimize SSD. There are two ways this can be done.

1) The first way is mkfs.btrfs turns off meta data duplication on a single device when /sys/block/device/queue/rotational is zero for the single specified device. This is equivalent to specifying -m single on the command line. It can be overridden and duplicate meta data forced by providing the -m dup option.

Duplication is not required due to SSD firmware potentially losing both copies. This wastes space and is a performance cost.

2) The second way is through a group of SSD mount options: ssd, nossd, and ssd_spread. The ssd option does several things:

  • It allows larger metadata cluster allocation.
  • It allocates data more sequentially where possible.
  • It disables btree leaf rewriting to match key and block order.
  • It commits log fragments without batching multiple processes.
The ssd mount option only enables the ssd option. Use the nossd option to disable it.


Partition tree example using "lsblk" command.

Plain HTML5 Cheat / Reference Sheet

Programming: HTML5 Cheat / Reference Sheet


Bolded text

<b>Text goes here</b>

Italic text

<i>Text goes here</i>

Underlined text

<u>Text goes here</u>

Changing font color

<font color=”blue”>Text goes here</font>

Changing font size

<font size=”12px”>Text goes here</font>
<font size=”large”>Text goes here</font>

Adding links

<a href=”sadiqulanalysis.blogspot.co.uk” target=”_blank”>Link goes here</a> 

(target=_blank indicates that the link will open in a new browser window or tab; you may remove it if you’d like the link to open in the same window)

Adding images

<img src=”sadiqulanalysis.blogspot.co.uk/image.jpg” border=”1px black solid” align=”right” />

border=”1px #000 solid” puts black border around the image. The "1px" value refers to the border thickness, the second value "black" refers to the border colour, the third value (solid) refers to the pattern of the line, which can be replaced with "dotted" or "dashed"
align=”right” will position the image to alignment you may replace right with left, center or justify

Adding a horizontal divider between sections on web page

 <hr> </hr>

Adding a line break

 <br > <br/>

Making nested bulletined list

<ul>
<li>Section A</li>

<ul>
<li>Section A Part 1</li>
<li>Section A Part 2</li>

<ul>
<li>Section A Part 2.1</li>
<li>Section A Part 2.2</li>
<li>Section A Part 2.3</li>
</ul>

<li>Section A Part 3</li>
<li>Section A Part 4</li>
</ul>

<li>Section B</li>
<li>Section C</li>

<ul>
<li>Section C Part 1</li>
<li>Section C Part 2</li>
</ul>

<li>Section D</li>
</ul>

Making a numbered list

Replace <ul> with <ol> and </ul> with </ol> in the code above
You can also combine numbers and bullets within the same nested list, depending on whether you choose to use <ul> </ul> or <ol> </ol> for each list level.

Making paragraphs

<p>A paragraph of text goes in here</p>

<p style=”font-size:14px;color:green;font-weight:bold;align=center;”> This whole paragraph of text will be centered, green and in 14px. </p>

Creating nested table

<table border="1" style="width:100%">
  <tr>
    <td>Column 1 Row 1 </td>
    <td>Column 1 Row 2 </td>
    <td>Column 1 Row 3 </td>
  </tr>
  <tr>
    <td>Column 2 Row 1 </td>
    <td>Column 2 Row 2 </td>
    <td>Column 2 Row 3 </td>
  </tr>
</table>

9 Jan 2015

RDP into a Linux box from Windows

Tutorial:xRDP-Windows-Linux

Use Windows Remote Desktop Protocol to log into a Linux machine. This tutorial is for primarily Centos 7 / Rhel 7 / Fedora

  1.  Open up the terminal either locally or remotely
  2.  Enter: vi /etc/yum.repos.d/xrdp.repo
  3.  Enter the following content into vi editor:
    [xrdp]
    name=xrdp
    baseurl=http://li.nux.ro/download/nux/dextop/el7/x86_64/
    enabled=1
    gpgcheck=0


    Hit : and type wq! to save changes
  4.  Enter: yum -y install xrdp tigervnc-server
  5.  Enter: systemctl start xrdp.service
  6. Verify xRDP start up service by entering: netstat -antup | grep xrdp
  7. Configure Firewall IPTables
    firewall-cmd --permanent --zone=public --add-port=3389/tcp
    firewall-cmd --reload
Open up remote desktop and enter the Linux machines IP address and test connectivity.

2 Jan 2015

Bypass Skip TrueCrypt Recovery Disk and save it as an Image file

Tutorial:TrueCrypt-Ver7.2-Windows


Bypass Skip TrueCrypt Recovery Disk and save it as an Image file
  1. Goto Start > Run / Search for 'cmd' > right click 'run as admin'
  2. Type: cd c:\Programs Files\"TrueCrypt format.exe" /noisocheck (your driver letter and file location may be different)
This will skip the CD check, create an ISO file and prompt user to save the image location.

TrueCrypt Windows command line options
TrueCrypt.exe command options (Windows)Description
truecrypt.exe /a or /auto [devices | favorites]If no parameter is specified, automatically mount the volume. If devices is specified as the parameter, auto-mount all currently accessible device/partition-hosted TrueCrypt volumes. If favorites is specified as the parameter, auto-mount favorite volumes designated as “mount upon logon”. Note that /auto is implicit if /quit and /volume are specified. If you need to prevent the application window from appearing, use /quit.
truecrypt.exe /b or /beepBeep after a volume has been successfully mounted or dismounted.
truecrypt.exe /c or /cache [y | n]Enable or disable password cache, Note that turning the password cache off will not clear it (use /w to clear the password cache).
truecrypt.exe /d or /dismount [drive letter]Dismount volume specified by drive letter. When no drive letter is specified, dismounts all currently mounted TrueCrypt volumes.
truecrypt.exe /e or /exploreOpen a Windows Explorer window after a volume has been mounted.
truecrypt.exe /f or /forceForces dismount (if the volume to be dismounted contains files being used by the system or an application) and forces mounting in shared mode (i.e., without exclusive access).
truecrypt.exe /h or /history [y | n]Enables or disables saving the history of mounted volumes.
truecrypt.exe /help or /?Display command line help.
truecrypt.exe /k or /keyfiles [keyfile | search path]Specifies a keyfile or a keyfile search path. For multiple keyfiles, specify e.g.: /k c:\keyfile1.dat /k d:\KeyfileFolder /k c:\kf2. To specify a keyfile stored on a security token or smart card, use the following syntax: token://slot/SLOT_NUMBER/file/FILE_NAME.
truecrypt.exe /l or /letter [drive letter]Driver letter to mount the volume as. When /l is omitted and when /a is used, the first free drive letter is used.
truecrypt.exe /m or /mount [bk|rm|recovery|ro|sm|ts]bk or headerbak: Mount volume using embedded backup header. All volumes created by TrueCrypt 6.0 or later contain an embedded backup header (located at the end of the volume).
recovery: Do not verify any checksums stored in the volume header. This option should be used only when the volume header is damaged and the volume cannot be mounted even with the mount option headerbak.
rm or removable: Mount volume as removable medium.
ro or readonly: Mount volume as read-only.
ts or timestamp: Do not preserve container modification timestamp.
sm or system: Without pre-boot authentication, mount a partition that is within the key scope of system encryption (for example, a partition located on the encrypted system drive of another operating system that is not running). Useful e.g. for backup or repair operations.
Note: If you supply a password as a parameter of /p, make sure that the password has been typed using the standard US keyboard layout (in contrast, the GUI ensures this automatically). This is required due to the fact that the password needs to be typed in the pre-boot environment (before Windows starts) where non-US Windows keyboard layouts are not available.
truecrypt.exe format.exe /n or /noisocheckDo not verify that TrueCrypt Rescue Disks are correctly burned. Warning: never attempt to use this option to facilitate the reuse of a previously created TrueCrypt Rescue Disk. Note that every time you encrypt a system partition/drive, you must create a new TrueCrypt Rescue Disk even if you use the same password. A previously created TrueCrypt Rescue Disk cannot be reused as it was created for a different master key.
truecrypt.exe /p or /password [password]The volume password. If the password contains spaces, it must be enclosed in quotation marks (e.g., /p “My Password”). Use /p “” to specify an empty password. Warning: this method of entering a volume password may be insecure, for example, when an unencrypted command prompt history log is being saved to unencrypted disk.
truecrypt.exe /q or /quit [background|preferences]Automatically perform requested actions and exit (main TrueCrypt window will not be displayed). If preferences is specified as the parameter (e.g.,/q preferences), then program settings are loaded/saved and they override settings specified on the command line. /q background launches the TrueCrypt Background Task (tray icon) unless it is disabled in the Preferences.
truecrypt.exe /s or /silentIf /q is specified, suppresses interaction with the user (prompts, error messages, warnings, etc.). If /q is not specified, this option has no effect.
truecrypt.exe /v or /volume [volume]Path to a TrueCrypt volume to mount (do not use when dismounting). For a file-hosted volume, the path must include the filename. To mount a partition/device-hosted volume, use, for example, /v \Device\Harddisk1\Partition3 (to determine the path to a partition/device, run TrueCrypt and click ‘Select Device’). You can also mount a partition or dynamic volume using its volume name (for example, /v \\?\Volume{5cceb196-48bf-46ab-ad00-70965512253a}\). To determine the volume name use e.g. mountvol.exe. Also note that device paths are case-sensitive.
truecrypt.exe /w or /wipecacheWipes any passwords cached in the driver memory.