Posts

Transfer files to Remote server using SCP commands

Pulling files from server to local machine 1. Cd /home/manoj/workingdir 2. scp -r username@198.168.0.138:/var/www 3. password :******* - r Recursively copy entire directories Transfer file from local machine to server 1. Cd /home/manoj/workingdir 2. scp filename.php username@198.168.0.138:/var/www 3. password :*******

SQL Important queries

Fetch record in ASC or DESC order  //DECENDING ORDER SELECT * FROM mytablename ORDER BY id DESC  //ASSENDING ORDER SELECT * FROM mytablename ORDER BY id ASC //WITH LIMIT  SELECT * FROM mytablename ORDER BY id DESC LIMIT 50 How to fetch last 50 records from table SELECT * FROM ( SELECT * FROM mytablename ORDER BY id DESC LIMIT 50 )sub ORDER BY id ASC  Update column fields using update commands  UPDATE tablename SET devicemodel='Data what you want to replace' where devicemodel='HUAWEI G730-U00'  Use Delete commands  DELETE FROM Persons WHERE FirstName = 'Peter'

DeCompile .apk file on ubuntu 14.04

1. Download   Dex2jar from  http://dex2jar.googlecode.com/files/dex2jar-0.0.9.15.zip    and Extract it. 2. Go to Download path      ./d2j - dex2jar . sh / home /manoj / someApk . apk   if .sh is not compilable that giver chomod a+x d2j - dex2jar . sh permission.     3. It will generate .jar file.     To open that .jar file we have to use JD-Gui. Just download http://jd.benow.ca/jd-gui/downloads/jd-gui-0.3.5.linux.i686.tar.gz it    and Go to that path. and follow below command throught your terminal(ALT+CTR+T).   Here's the process I went through:    $ ./jd-gui ./jd-gui: error while loading shared libraries: libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory $ sudo apt-get install libgtk2.0-0:i386 $ ./jd-gui ./jd-gui: error while loading shared libraries: libXxf86vm.so.1: cannot open shared object file: No such file or directory $ sudo apt-get install libxxf86vm1:i386 $ ./jd-gui ./jd-gui: error while loading shared librar

Ubuntu Refrences and Commands Hacks

Privileges sudo command – run command as root sudo -s – open a root shell sudo -s -u user – open a shell as user sudo -k – forget sudo passwords gksudo command – visual sudo dialog (GNOME) kdesudo command – visual sudo dialog (KDE) sudo visudo – edit /etc/sudoers gksudo nautilus – root file manager (GNOME) kdesudo konqueror – root file manager (KDE) passwd – change your password Network ifconfig – show network information iwconfig – show wireless information sudo iwlist scan – scan for wireless networks sudo /etc/init.d/networking restart – reset network for manual configurations (file) /etc/network/interfaces – manual configuration ifup interface –

Dedicated Runtime Thread (ART vs Dalvik)

What is Dalvik? Dalvik is the process virtual machine (VM) in Google's Android operating system. It is the software that runs the apps on Android devices. Dalvik is thus an integral part of Android, which is typically used on mobile devices such as mobile phones and tablet computers as well as more recently on embedded devices such as smart TVs and media streamers. Programs are commonly written in Java and compiled to bytecode. They are then converted from Java Virtual Machine-compatible .class files to Dalvik-compatible .dex (Dalvik Executable) files before installation on a device. The compact Dalvik Executable format is designed to be suitable for systems that are constrained in terms of memory and processor speed. Dalvik is open-source software. Dalvik is named after an Icelandic city. (source) Okay so what is ART? ART is a project Google has been working on for reportedly for 2 years. The goal of ART was to produce a faster runtime that wou

How To Install Git 1.9.0 On Ubuntu 14.04,13.10,12.10,12.04,10.04, Linux Mint 16,14,13 And Elementary OS 0.2

Image
$ sudo add-apt-repository ppa:git-core/ppa $ sudo apt-get update $ sudo apt-get install git Push Your App to GitHub Check if Git is installed In the terminal type git --version (1.8 or higher preferred) If not, download Git [here] (http://git-scm.com/downloads). Then, setup your local Git profile - In the terminal: Type git config --global user.name "your-name" Type git config --global user.email "your-email" To check if Git is already config-ed you can type git config –list Push your app to GitHub using the command line git init git status git add . git commit -m "first commit" git remote add origin https://github.com/username/yourprojectname.git git push -u origin master enter your username and password of github GIT and REPO CheatSheet