Pages

Tuesday, November 12, 2013

Eclipse Setup for C, C++, Java, Python, PHP, PERL, Shell Scripst, Verilog and VHDL with Vim-Like Editing

General

Install Eclipse
yum install eclipse
Vim-Like Editing
yum install eclipse-vrapper

for C/C++ (using CDT)
Install CDT
yum install eclipse-cdt

for Java (using JDT)

Install JDT
yum install eclipse-jdt

Specify Java VM
http://stackoverflow.com/questions/2030434/eclipse-no-java-jre-jdk-no-virtual-machine

for Python (using Pydev)
Install Pydev
yum install eclipse-pydev

for PHP(using PHP Eclipse)
Install PHP Eclipse
yum ibnstall eclipse-phpeclipse

for PERL (using EPIC)

Install EPIC
yum install eclipse-epic
OR
Install pad-walker for debugging
yum install perl-PadWalker

Launch Eclipse
eclipse &
Add Software Source
Select "Help/Install New Software" from menu bar
Click "Available Software Sites"
Click "Add"
Enter following information:
Name "EPIC"
Location "http://e-p-i-c.sf.net/updates"
Install "EPIC Main Components"
Install "EPIC Main Components" in the available software.
REF: http://www.epic-ide.org/download.php

for Shell Scripts (using Shelled Eclipse)
Install Shelled Eclipse
yum install eclipse-shelled

for Verilog and VHDL (using Veditor)
Install Veditor
yum install eclipse-veditor


Monday, September 9, 2013

Cross Compile C for Android

Download NDK
http://developer.android.com/tools/sdk/ndk/index.html


Create Folders and Files
mkdir jni
mkdir libs
mkdir obj

jni/hello.c
#include <stdio.h>
int main(int argc, char **argv)
{
        printf("HelloWorld\n");
        return 0;
}


jni/Android.mk
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
# module names
 LOCAL_MODULE    := hello_world
# list of C files for compiler
 LOCAL_SRC_FILES := hello.c
#build executables
include $(BUILD_EXECUTABLE)


Build
android-ndk-r9/ndk-build

Binary for android is located within obj/local/armeabi/hello_world .

Thursday, August 1, 2013

Install GRUB2 on an External Storage

To Make Directory for a Mounting External Drive
mkdir /mnt/usb

To Mount the External Driver
mount /dev/sdb1 /mnt/usb

To Install GRUB2 on the External Drive
grub2-install --root-directory /mnt/usb /dev/sdb


Friday, July 5, 2013

Access exFAT Partitions

To Install fuse-exfat for Mounting exFAT Filesystem,
yum install fuse-exfat
To Install Utilities for exFAT Filesystem
yum install exfat-utils

Now you can mount exFAT partitions in Linux!

Tuesday, July 2, 2013

Bash Tips

command expansion
echo /dev/sd{a,b,c}


hotkey

Ctrl + A Go to the beginning of the line you are currently typing on
Ctrl + E Go to the end of the line you are currently typing on
Ctrl + L               Clears the Screen, similar to the clear command
Ctrl + U Clears the line before the cursor position. If you are at the end of the line, clears the entire line.
Ctrl + H Same as backspace
Ctrl + R Let’s you search through previously used commands
Ctrl + C Kill whatever you are running
Ctrl + D Exit the current shell
Ctrl + Z Puts whatever you are running into a suspended background process. fg restores it.
Ctrl + W Delete the word before the cursor
Ctrl + K Clear the line after the cursor
Ctrl + T Swap the last two characters before the cursor
Esc + T Swap the last two words before the cursor
Alt + F Move cursor forward one word on the current line
Alt + B Move cursor backward one word on the current line
Tab Auto-complete files and folder names

Linux with traditional interface naming scheme

To use traditional interface naming scheme, boot kernel with following parameter
net.ifnames=0

Thursday, June 27, 2013

Export / Import dcon settings

Dump (Export)
dconf dump /desktop/ibus/ > ibus.dconf

Load (Import)
dconf load /desktop/ibus/ < ibus.dconf

Enable Password for Single User Mode

vi /etc/sysconfig/init

SINGLE=/sbin/sushell
-->
SINGLE=/sbin/sulogin