Wednesday, 6 March 2013

Virtual Terminal For Windows lover :)

Hi ,

Are you windows lover and want to give a try to linux terminal,

So here is virtual termianl to test on :

 http://www.masswerk.at/jsuix/





Its fun way to do some experiments here.

Thanks
aksshay
aksshay@live.in

Friday, 11 January 2013

FoxGlove : Firefox + Google by Alex

FOXGLOVE a browser for GOOGLE lovers,

Alex customized the Firefox Portable & integrated his browser with Google Apps.

Alex :-

I found myself running Firefox in two windows: One with Gmail, Google Reader and other webapps, and the other for my casual web wanderings. I read about Chrome's feature that lets you can set up a standalone launcher for any webapp, but I wanted all my apps together in tabs, and I wanted access to all the customization and extensibility of Firefox, but without overhauling my current setup. Then I remembered Asian Angel's howto on running multiple copies of Firefox portable. So, I decided to build a second Firefox install specifically around using Google Apps, one that I could run side-by-side with my regular Firefox browser.
 

Thursday, 10 January 2013

WMIC - WIndows Management and instrumentation Console - Powerful command line tool for Windows

Hi Friends,

Today i am going to discuss about the very powerful tool by windows known as WMIC,

Task Manager - Not working
Windows Defender - Not working
IE - unable to start
System got hacked.

Now what can i do?

Proceed for WMIC tool (Windows Management Instrumentation Console (Command line tool))

Benefits - In built tool by Microsoft.

So how to work with it?

wmic process [pid] delete - equivalent to kill -9 pid as in ubuntu - To kill the process
wmic process where name='cmd.exe' delete
wmic process list brief /every:1 - Similar to top command as in linux
wmic useraccount - To know about the account details
wmic startup list full - Startup Programs


A good example by Alan Ridgeway - C:\> wmic /output:[file] [stuff you want it to do] /format:[format]
Ex - wmic /output:os.html os get /format:hform

Will post all your data, in a html format, you can output your data in CSV,PDF etc version.

To find alias info

wmic [alias] list full

Now start scripting with it and share some good result.

And in the last to explore more, you can look for help option

wmic /?

Good day,
Aksshay Sharma
aksshay@live.in

Tuesday, 4 December 2012

Compare two files using PHP and bash Script :)

Hi Friends,

Need to compare two files and searching for different entries in them. Here is the solution.

Create a new file named cmp.sh and put it in a folder.

#!/bin/bash
uniq temp1 > sort_temp1
sort sort_temp1 > sort1.txt
uniq temp2 > sort_temp2
sort sort_temp2 >> sort1.txt
sort sort1.txt > sort_dup.txt
cat sort_dup.txt | uniq > sort.txt
echo "Elements present in file temp1 not in file temp2"
php index.php 1
echo "Elements present in file temp1 not in file temp2"
php index.php 2

Save it.

Now, we need to create a php file named index.php in same folder.

<?php
$handle = @fopen("sort.txt", "r");
if ($handle) {
    while (!feof($handle)) {
        $buffer = fgets($handle, 4096);

//======================================
if($argv[1] == 1)
{
$handle1 = @fopen("sort_temp1", "r");
if ($handle1) {
$test = 1;
while (!feof($handle1)) {
$buffer1 = fgets($handle1, 4096);
if ($buffer==$buffer1)
$test = 0;
}
if ($test == 1)
echo $buffer;
}
fclose($handle1);
}
//=========================================

//=========================================
if($argv[1] == 2)
{
$handle2 = @fopen("sort_temp2", "r");
if ($handle2) {
$test = 1;
while (!feof($handle2)) {
$buffer2 = fgets($handle2, 4096);
if ($buffer==$buffer2)
$test = 0;
}
if ($test == 1)
echo $buffer;
}
fclose($handle2);
}
//========================================

    }
    fclose($handle);
}
?>

Save the file in same folder. Add your both files need to compare, with the name temp1 and temp2.

Run the cmd.sh script and it will give you the desired result.

Hope it helps.

Aksshay Sharma
aksshay@live.in

Thursday, 22 November 2012

FireFox Troubleshooting | Addon Disappeared | Extension Disabled

Hi Friends,

Last night i was updated my FF to v17 and faced some issues. That addons suddenly disappeared from my list.

So, if you face similar issue you can proceed like this (updating for linux - same goes for windows)

Step 1 - First check your add-on list at about:support if the things are visible there, then just start the firefox into safe mode and try to enable them.

Step 2 - To open firefox in safe mode enter this command in the terminal firefox -safe-mode and it will open firefox in safe mode, and check your extension list. If you are able to do it, then all good else proceed to next step.

Step 3 - Open error console (Ctrl+Shift+J) , and clear all the logs, Now try to open your addon manager.

Step 4 - If the error is caused due to any extension then try to delete it and delete all the files related to extensions, present in your profile (/home/<username>/.mozilla/firefox/<profile-name>/) (extension.ini & extension.sqlite).

Step 5 - Restart the FF. Hope it solves your issue.

Step 6 - If you are still facing the problem, then open about:support , reset your Firefox, the old data will get saved at your desktop.

Step 7 - Now open terminal and enter the command firefox -P and create the new Profile. -P is used to create, delete, rename the firefox profile and start the firefox profile. Copy the content from folder Old Data to New Profile.

Step 8 - Enjoy your Firefox, and do www.mozilla.org/plugincheck/ Plugins check. (recommended by firefox)

Have a nice day.

Aksshay Sharma
aksshay@live.in


Thursday, 15 November 2012

Make bootable USB of Windows 8 using DISKPART command, no 3rd party tool

So you want to make a bootable USB for windows 8, and don't want to use 3rd party tool.

So DISKPART utility is the solution of your problem.

Tools needed :-

1. Windows 8 DVD (Ofcourse, dont ask why :-P)
2. USB Drive (4GB or 8GB)

Steps to follow :-

Step 1 :- Open CMD (command prompt) using administrative privileges.
Step 2 :- Give the command DISKPART.
Step 3 :- Enter LIST DISK command & it will show all the drives present in your PC, hopefully your USB drive, if its working properly.
Step 4 :-Select your SELECT DISK X (Replace X with USB drive number).
Step 5:  Type CLEAN. It will delete all the information present on USB.
Step 6 :-  Enter CREATE PARTITION PRIMARY. For creating primary partition.
Step 7 :-  Enter SELECT PARTITION 1. Selects primary partition created above.
Step 8 :-  Enter FORMAT FS=FAT32 QUICK. Fast format the partition with FAT32 file system. You can skip QUICK, if you have so much of time. :-)
Step 9 :-  Enter ACTIVE. It activates the partition.
Step 10:-  Enter ASSIGN. It will assign drive letter to your USB.
Step 11:-  Enter EXIT. It will make your exit from DISKPART utility.
Step 12:- Insert your Windows 8 DVD in the DVD ROM.

Step 13:-  Now copy the contents, enter XCOPY A: B: /S/E/H/K/C. Replace A with DVD ROM drive letter and B with USB drive letter.
Step 14:-  Type EXIT to  exit from process. Exits copying section.Your USB is done and bootable now.
Step 15:- Go and intall windows 8. :-P

Thanks
Aksshay Sharma
aksshay@live.in

Tuesday, 13 November 2012

Transfer PDF files from PC to Nokia LUMIA. :-D


-->
Nokia Lumia – Easy, not the easiest :P way to transfer PDF files to your Phone, as there is no option in ZUNE, so its much better ;)
As i was using Nokia Lumia from past few months, and facing difficulties in synchronizing pdf files, I came up with the solution.
Tools required :-
  1. Wifi Connection.
  2. XAMPP (For creating server)
Step 1:- Download and install XAMPP. (Everything is provided there, even how to start it)
                 http://www.apachefriends.org/en/xampp-windows.html
Step 2:- Start the XAMPP.
Step 3:- Go to your C:\xampp\htdocs\ and delete all the contents from there.
Step 4:- Create a folder named Nokia-Lumia inside it.
Step 5:- Open cmd & find the IP(a.b.c.d) of your machine.

Step 6:- You are almost done. Copy all the PDF files into the Nokia-Lumia folder (You want to transfer to the phone).
Step 7:- Connect the phone with your wifi connection to the network.
Step 8:- Open Internet Explorer (IE) in your phone.
Step 9:- Go to http://a.b.c.d/Nokia-Lumia/ (in my case it is 192.168.1.10) you will find all your PDF files here, download them with speed of 54 Mbps :-D.
Step 10:- Start reading PDF in your phone.
Step 11:- For uploading, you need PHP script. Message me if required.

Thanks
AKSSHAY SHARMA
(aksshay@live.in)