Saturday 29 March 2014

Activate Godmode in Windows 7

Now a friend of mine asked me, how do you I view the installed updates on my system? Looking at the settings screen, one would have to click a few times, and then you finally get the settings you want.

This is tedious and boring. But let's change that. It's pretty simple. By doing so, you get most of the settings at one place. So, you would have to click only once (most of the times).

Here is the how-to:
  • Right-click on any free space on your desktop
  • Create a new folder.
  • Name that folder to GodMode.{ED7BA470-8E54-465E-825C-99712043E01C} and press Enter
And that's done. Now, open your new folder and see what Windows 7 has to offer.

Thank you for reading and as always please comment.

Compile and Run Programs in Notepad++

Yo, most of the people I know use Notepad++ and swear by it that it's the best text editor any one can use. Me, I frankly use Vim. But, I gave it a shot and it's pretty useful. It's got tons of features. This post is not about Notepad++ and it's features.

Now, back to post. The major problem any guy or gal has is that once you write your program in Notepad++, you cannot compile or interpret in it nor can you run your compiled programs in it. So, you would have to use some other application with it. But, now you don't need to (unless you want to debug). I tried that, but it did not work.

Here is the how-to:
  • Install the compiler or interpreter you want to use.
  • Install NppExec Plugin (I won't write how to install it)
  • Now, goto Plugins -> NppExec -> Execute or press F6
  • In the Execute Dialog Box, write
 For C, write
 cd "$(CURRENT_DIRECTORY)"
set obj = $(CURRENT_DIRECTORY)\$(NAME_PART)
gcc "$(FILE_NAME)" -o "$(obj).exe"
NPP_RUN "$(obj).exe"
unset obj
 For C++, you can write
 cd "$(CURRENT_DIRECTORY)"
set obj = $(CURRENT_DIRECTORY)\$(NAME_PART)
g++ "$(FILE_NAME)" -o "$(obj).exe"
NPP_RUN "$(obj).exe"
unset obj
For Java,
 cd "$(CURRENT_DIRECTORY)"
javac "$(FILE_NAME)"
java "$(NAME_PART)"
NOTE: You can write something similar for the language you want to use.
  •  Click on Save.
  • Give the name something like run@.c for C, run@.cpp for C++ and run@.java for Java. (But, keep the name same, see only the extension has changed,  because you are gonna use this property later)
  • Then, make a new script and write in it,
// Save Current File
NPP_SAVE
// Construct the script name to be called
SET Compiler = run@$(EXT_PART)
// Call the script
NPP_EXEC "$(Compiler)"
  • Save this with a name something like compile.
That's about it. Now, anytime you write you program, just run the compile script and it's done.

I haven't tried it with languages other than the ones that have been mentioned in this post. If you do try it, whether you are successful or not, please let us know.

As always thanks for reading and please comment.

Saturday 15 March 2014

Play Breakout on Google

Have you played DX Ball 2? It is actually similar to Breakout. Breakout is an old Atari game. Now, you or anyone can play it on Google.
Well, this trick works (for now, meaning Google has not removed it). Breakout game is a classic (my opinion) and has many remakes. I don't wanna delve into the history of the game, this post is not about that, now back to basics. The board (or the player) can be moved with the mouse or the keyboard arrow keys. It is a fairly easy game and can be played by almost anyone.

To play, simply:
  • Fire up your browser.
  • Go to Google Images
  • In the search box, type
atari breakout
  • Press Enter and you are done.
Here is a small video of me playing. (Well, it is actually another trick in action)

Thursday 13 March 2014

Hack A Linux System

Now, in the world of OS, the most secure system is that of Linux. Here I am gonna show you how to break into a linux OS. Basically all you need is the root password to do anything in linux, Right! I have successfully tried it myself. The system I used was LXLE. You just need GRUB to do this trick.

Here's how you do it:
  • Interrupt linux boot. (Basically, keep Shift Key pressed)
  • Now, you have the GRUB menu, highlight the OS and press e for edit
  • Find the line which contains something on the lines
/vmlinuz -somenumber-generic
  •  At the end of said line, add 1 or s or single after a space (I tried with single and 1, but single worked)
  • Boot with the current settings (I can't exactly list how to do so, since it differs in each flavor)
  • By doing just this you may get root access
  • Now, you do whatever you want. But just in case you tried changing root password and it does not give any output. (Well, that's because SELinux is interrupting)
  • Then, type setenforce 0 to switch SELinux into permissive mode and try again. 
  • If it says something on the lines that setenforce is not installed, then install it and try again.
And that's about it. Now, you can pretty much do anything ranging from changing root password to adding new hidden accounts (I am gonna post on it soon) and even changing password of present user accounts or even deleting them.

I don't actually care why you do this. But I just have to say it, this is sweet.

If I didn't mention something or left something out, then please let me know. There are other ways of hacking a linux box which I have not mentioned, so if you do know of it let us all know.

As Always thanks for reading and please comment.

See Password behind Asterisk in Web Browser

There are several passwords one needs to remember like, for your account, the wifi password, password for hidden files and so on. But each time the popup shows or the web browser asks you to enter your password, all you see when you type the darn thing is a bunch of dots.Even in the modem configuration page, the password for the account is a just a bunch of dots.

This post will tell you a way to actually see those passwords. Now, you would be thinking this is crazy, why would I want to do that. Beats me! I don't know why you want to use this trick but you are here none the less.

So, here is the how:
  • Go to the page that requires the password
  • Type in the password
  • Right click in the password field and select Inspect Element


  • Find the line which reads something like type = password



  • Change password to text and press Enter
  • Voila! You can now see the password
It was that simple. So go ahead and try it out.

NOTE: I have only tried it out using Google Chrome and Mozilla Firefox. If you are using some other web browser, then the trick may need to be modified a little. (Sorry, can't tell you the details of every web browser present on the planet on such a little post, now can I)

As Always thanks for reading and please comment.

Hack Windows 7 login

At times, you find yourself locked out of your system or a friend of yours has changed your password and has left you in trouble. No matter what the case may be, you can still get you account back. Pulling this off in Windows XP was simpler but anyway here is the how-to:
  • Fire up your system.
  • When the screen states "Starting Windows", press the power button.
  •  Now restart the system, when it boots, you have a choice whether to start normally or Launch Startup Repair. Choose Launch Startup Repair.

  • Now, a pop may ask you if you want to use System Restore. Press Cancel.
  • After waiting quite some time, you will be told that Startup Repair failed. Click on the down arrow to see the problem details
  • Scroll down to the very bottom of the report and click on the link for the offline Privacy Statement

  • Notepad opens up, go to File and click on Open

  • In the Open Dialog, go to Computer -> Local Disk (This could be C: or D: or the place where you installed Windows)  -> Windows -> System32
  • Change the File Type from Text Documents to All Files
  • Find the application sethc or a file named sethc.exe
  • Right Click and rename it to sethc-bak
  • Find the application cmd  or a file named cmd.exe
  • Right Click and copy it
  • Now Paste it
  • You will get something on the lines of cmd - Copy,  right click and rename it to sethc
  • Close Notepad and Press Finish (Basically System Shutdown)
  • At the login, press Shift Key 5 times
  • Voila! You have DOS

  • Type net user. This gives you a list of all users.
  • Now, type net user username * to reset the password of account username or net user username password to change password of username account.
See this is a bit complex but still you get what you want.

As Always thanks for reading and please comment.

Sunday 9 March 2014

No Sound in Linux

This is the most common problem, I have come across. Basically it boils down to this. No matter what I do, I cannot get the sound to work.

So, in this scenario, here's what to do:
  • Install pavucontrol (I am not gonna tell you how! Linux has many flavors and each one can use multiple methods)
  • Start pavucontrol (Basically done through terminal)
  • Check the sliders and increase them to the level you want but keep them below 90%.
 
I know most of you will say, been there done that. But wait, there is more.
Here are couple of links, if the above mentioned does not work:

I hope this helps.

As Always thanks for reading and please comment.

Emacs Cheatsheet

Commands mentioned here works on GNU Emacs but does not cover every command. A subset of these commands may work on Zile, XEmacs and others.

Note: C stands for Ctrl and M stands for either Alt or Esc

Command                Description
----------------------------------------------------------------------------------------
C-x C-c          Quit completely
C-g                Quit a partial entered command
C-v                Move forward one screen
M-v                Move back one screen
C-l                 Move text on which cursor is to center of screen (Pressing again leads to movement, first to top, then to bottom and back)

C-p                Move to previous line
C-b                Move backwards character by character
C-f                 Move forwards character by character
C-n                Move to next line
M-f                Move forward word by word (when cursor is between word, then move cursor to end of word)
M-b               Move backwards word by word (when cursor is between word, then move cursor to beginning of word)
C-a                Move to beginning of line (if at beginning, then does nothing)
C-e                Move to end of line (if at end, then does nothing)
M-a               Move to beginning of sentence (if repeatedly pressed, cursor moves to previous sentence's beginning)
M-e               Move to end of sentence (if repeatedly pressed, cursor moves to next sentence's end)
M-<               Move to beginning of whole text
M->               Move to end of whole text
C-u Number Command        Repeat the command "Number" times (Works for most commands)
M-Number Command        Repeat the command "Number" times (Works for most commands)
C-u Number C-v            Scroll text forward by "Number" lines (not screenfull)
C-u Number M-v            Scroll text backward by "Number" lines (not screenfull)
C-x 1                Kill all windows except the current one
C-u Number Character        Insert "Character" "Number" times at current cursor position
C-d                Delete character at current cursor position 
Backspace    Delete character before current cursor position (If used with C-u, then will kill instead of delete)
M-Backspace Kill word before current cursor position
M-d                Kill word after current cursor position 
C-k                 Kill from current cursor position till end of line (if pressed repeatedly, will kill the newline) (If used with C-u Number will kill, instead of delete)
M-k                Kill from current cursor position till end of sentence
C-Space         Start highlighting from current cursor position
C-w                Kill all text previously highlighted by "C-Space"
C-u Number C-k            Kill the "Number" lines along with their newlines
C-y                Yank (Paste) latest killed text at current cursor position (If several C-k were used, then would yank all killed)

M-y                Yank second latest killed text (If pressed repeatedly, then would come back to latest kill) (Could be used with C-u)

C-/                Undo (If used with C-u, then repeat undo "Number" times)
C-_                Undo (If used with C-u, then repeat undo "Number" times)
C-x u             Undo (If used with C-u, then repeat undo "Number" times)
C-x C-f          Open file or create new file
C-x C-s          Save file
C-x C-b          Show the list of buffers
C-x b buffername        Goto "buffername" buffer
C-x s             Save buffers which had changes in them
C-x C-c         Quit emacs
C-z                Suspend Emacs
fg                 Resume Emacs
%emacs       Resume Emacs
M-x repl s string replace    Replace all occurrences of "string" with "replace" after the current cursor position
M-x recover-file        After opening file, if during editing system crashes, this command can be used to recover or get back changes

M-x mode-name            Change mode to "mode-name" (Use text-mode for editing text, use minor mode: auto-fill-mode for human language text)

C-h m                Shows help on current mode
C-u number C-x f        Change margin to "number" (default is 70)
M-q                Re-fill paragraph (if paragrah is made up of sentences, some at new lines, then pressing this would connect them at the period)

C-s string            Search for string in forward direcrion (Enter to terminate search, keep pressing it for next occurrence of "string", after this is Backspace is pressed the cursor would jump to previous occurence of string)

C-r string            Search for string in reverse direction (Enter to terminate search, keep pressing it for next occurrence of "string", after this is Backspace is pressed the cursor would jump to previous occurence of string)

Note:     If control characters are typed other than C-s and C-r, the search terminates

C-x Number            Split the screen into "Number" frames, each displaying the same file
C-x o(other)            Bring the cursor to the other frame
C-M-v                      Scroll other frame (cursor remains where it was)
Escape C-v              Scroll other frame (cursor remains where it was)
C-x 4 C-f                  Open a different file in new frame (Cursor also moves to new frame)
M-x make-frame     Create new window
M-x delete-frame    Delete selected window
Escape Escape Escape        Get out of recursive editing level or out of minibuffer
C-h ?                       Get help on everything
M-x help                  Same as C-h ?
F1                           Same as C-h ?
C-h c Command     Tells "Command" name (Here "Command" is of the form C-x, M-v, C-x C-s, etc...)
C-h k Command            Displays documentation of the "Command" (Here "Command" is of the form C-x, M-v, C-x C-s, etc...)

C-h f Command-name        Displays documentation of "Command-name" (Here "Command-name" is of the form previous-line, etc...)
C-h v variable-name        Displays documentation of "variable-name" (Here "variable-name" refers to all variables some of which can be used to customize Emacs)

C-h a               Search for commands
C-h i                Info (Use "m emacs" to read Emacs Manual, type ? for guided tour)
C-h r               Read Manual

Note:
Use Tab for auto-completion of commands.

If you want to download it, here you go.

As Always thanks for reading and please comment.

Vim Cheatsheet

This is awesome editor. Enough Said. So, here is the cheatsheet

Command            What it does
--------------------------------------------------------------------------------
:q                        Quit (no saving)
:wq                     Save and quit
j                          Move one line down
k                         Move one line up
l                          Move to the next alphabet
h                         Move to the previous alphabet
x                         Delete unwanted character
i                          Insert text
dw                      Delete word
d$                       Delete from current cursor position to end of line
de                       Delete word till end of word
w                        Move onto next word
e                         Move onto next word's end alphabet
0                         Move to beginning of line
$                         Move to end of line
dd                       Delete a line
u                         Undo recent change
U(capital u)        Undo everything on that line
CTRL-r               Redo recent change
p                         Put deleted text after cursor (the entire thing)
r<new char>     Replace character at current cursor position with specified character
ce                       Change characters until the end of the word
Ctrl-g                 Show line number and file status
G                        Go to end of file
gg                      Go to beginning of file
<line number>  Ctrl-g    Go to specified line number
/<word>            Search for specified word in forward direction
?<word>           Search for specified word in backward direction
n                        Search previous word for next hit in forward direction
N                       Search previous word for next hit in backward direction
Ctrl-o(Oh)          To go back where you came from
Ctrl-i                  To go forward
%                       To search for matching parenthesis (place cursor on parenthesis first)
:s/old/new           Substitute 'old' word with 'new' word (only first occurence of 'old' word)
:!<command>    Execute specified command
:w <Filename>   Save opened file with specified filename
v motion :w <filename>    By pressing 'v' we enter visual mode which selects all text with motion such as move down
:r <filename>     Place the text from specified filename below the current cursor position
o                         Place text below cursor position
O(capital o)        Place text above cursor position
a                         Append Text
A                        Insert text after the end of the line
R(capital r)        Replace all characters until <ESC> is pressed
y                         Yank (copy) selected text. Use after entering visual mode
:set ic                  Ignore case for all searches (Use after search command)
:set hls is            Highlight matching text for all searches (Use after search command)
:set noic             Disable ignore case for all searches (Use after search command)
:nohlsearch        Disable highlighting text for all searches (Use after search command)
<HELP>, <F1>, :help    To get help
Ctrl-w Ctrl-w       To jump from one window to another
:e <filename>     Open filename for editing
:set nocp             Disable compatible mode
Ctrl-d                   Show a list of available commands starting with the specified character (Enter a character first), press repeatedly for autocompletion of command (Do :set nocp first)

<TAB>            Autocomplete command or filename (Do :set nocp first)

Note:
You can use the following formats for these commands:
    <times> command
like
    3w        -    Move three words forwards
    2e        -    Move two words forward on the end character
    d3w        -    Delete three words
    2dd        -    Delete two lines
    c$        -    Change till end of line
    c3w        -    Change from beginning of line till beginning of fourth word
    4G        -    Move to fourth line from top
    :s/old/new/g    -    Substitute 'old' word with 'new' word (for every occurence of the 'old' word in the file)

    :#,#s/old/new/g -    #,# are line numbers within which to change 'old' word with 'new' word

    :%s/old/new/g    -    Change 'old' word with 'new' word in entire file
    :%s/old/new/gc  -    Change 'old' word with 'new' word in entire file but prompt first

    :!ls        -    See contents of present working directory
    :!rm <filename>    -    Delete specified filename
    :r !ls        -    Write contents of directory below current cursor position
    j$        -    Move to end of line
    /<text>\c    -    Search for specified text while ignoring case just for this search
    :help <argument> -    Get help on the specified argument


If you want to download it, here you go.

This covers the terminal based vim and not GVim, and also does not cover buffer management  and other commands. These commands should also work on GVim.

As Always thanks for reading and please comment.

Add user to sudoers file

This concerns Linux users. Well, you guys installed this savvy flavor, you opened up the terminal to update so you typed the usual sudo command. But, got something on the lines
User is not in the sudoers file.  This incident will be reported
Let's face it, most of the system functions can be accessed with sudo. So, you need to add the user to this monstrosity. Now, you just need to:
  • Change to root (Don't ask me how! This how-to covers something else)
  • Type vim /etc/sudoers and press Enter. Here instead of vim you could use anything you want like gedit, nano, and the rest.
  • Under User Privilege Specification section add the line
Yourusername ALL = (ALL) ALL
  • Press Esc (Escape key)
  • Type :wq and press Enter. (Well basically, this is saving the file, so if you have used anything other than vim, you know which steps to follow to save the file.)
  • Restart the system
And that's that. After this try sudo again and I am pretty sure, this time around you not get that nagging message.

This is one of the methods to add your username. If your preferred method is not here, then please comment.

As Always thanks for reading and please comment.

Change your Browser into a notepad (sorta)

Hey, long time no see. I have been busy, you know with all the exams, projects and assignments. But, I did not forget you.

This little trick is super. Every now and then, when I surf the web, I like to collect little snippets of information. For this, I needed Notepad or Gedit. But, lately I have just been using the browser. With this trick you can change your browser into a notepad with almost the same functionality.

Here's how you do it:
  • Start your web browser.
  • In the URL Bar, type
data:text/html, <html contenteditable>
  •  Hit Enter and enjoy your new notepad.


That's it. But wait, this trick will work only if your browser supports HTML5. Well, most browsers do, so you  need not worry.

As Always thanks for reading and please comment.

How to set a video as a desktop wallpaper on Windows XP

Everyone has a wallpaper, even the dweeb who aces the exams. I have tried find most of the coolest wallpapers on the net. Someone finds even better than I did and all goes to waste.Then, a friend of mine asked me if you can put a video of a movie or a clip as a wallpaper.

This idea was awesome. Nobody knew about it (If they had, I would have seen it) and so nobody tried. I searched and finally found it (No, it's not a software, it's a trick). So for all you guys, here it is:
  • Before you go ahead, you need to have VLC. you can get it here.
  • Start VLC
  • Click on Tools and then choose Preferences.
  • On the Preferences Window, select Video (It's on the left)
  • In Video Settings, for Output choose DirectX video output instead of Default/Automatic

  • Click Save and restart VLC
  • Start any movie or clip
  • Right click on the screen, under Video choose DirectX Wallpaper/Set As Wallpaper. or Choose Video from the top menu and then choose DirectX Wallpaper/Set As Wallpaper.
If you are using Window's Aero theme, you will get a warning
  • Minimize VLC (Yep! Don't close it) and voila!
If you want to get your wallpaper back, then
  • Resize VLC
  • Choose Video from top menu and select DirectX Wallpaper.
  • Now sometimes it will not work, so just get a new wallpaper (Sorry, this post is about setting a video as a wallpaper, I am not gonna tell you about setting you wallpaper)
Now there might be other methods that I have not mentioned. Please feel free to share.

That's that and enjoy as well as impress other people.

Thanks for reading and as always please comment.

Free Windows 7 Keys

Hey, there. You have Windows 7 installed right. Now, tell me is this the original deal or did you find a crack or a serial key or used RemoveWAT utility. Now, come on tell me.

Okay, you got where I am going with this. But did you know that when you downloaded the ISO for Windows 7, you already had the key (Seriously I mean it). I am gonna show you where it is:
  • Extract the ISO using any tool you like
  • Go to Sources Folder and open it
  • Search for a configuration file named PRODUCT or a file named PRODUCT.ini

  • Open it in notepad and scroll down.
  • You will get all the keys for different Windows.
I haven't used any of these keys. If you do, let us know if it works.

As always thanks for reading and please comment.

Stuff that most try to do