Quick Tips - Piping to Clipboard (Windows)


I came across this neat tip the other day. I needed to capture some text from the command line in Windows. Usually I would just pipe (cmd > filename.txt) the results of whatever command I'm running into a text file. Then I would open the text file afterwards and copy/paste it wherever I needed it. I figured there had to be a more direct way. It turns out, I was correct. Enter "clip.exe" a built in utility that will allow you to pipe command line output directly to your clipboard. So how do you use it? It's really simple. Say for example you need a list of files in a directory. You could run the following and presto it's in your clipboard. Replace dir with whatever command line application you want to capture input from. Run it and copy/paste to your heart's content.

dir | clip

Apparently this has been around in some form or fashion since WIndows 98. It became a regular built in utility in Windows Vista. Not sure why I'm just now finding this out. There are similar tools (xclip) in linux as well. Happy scripting!

  0

Categories: Quick Tips

Tags: command-line

RegBox - Regular Expression Find & Replace Tool


Introduction

I've been using regular expression a lot lately. I like to use it to generate code. I generally use Notepad++ for this operation. However I've found situations where I repeat the same set of operations. I constantly have to re-enter or dropdown to the previous expression. Often forgetting which order the operations need to be ran in. I figured there has to be a better way. So I wrote a quick web app to help with this. I present to you RegBox. A simple tool for chaining regex find and replace operations. Not only will it chain these operations, but it will allow you to export and import operation chains. This app supports JavaScript regular expression flavor.

How To Use It

Cut and paste the text you want to perform regular expression find and replace on in the "Input/Output" box.
Enter the "Match" and "Replace" criteria.
Set which options you may need (gim - g for global, i for case insensitive, m for multiline by default).
Click "Run" to execute and text will change.

Additional Notes

You can add additional operations by clicking the "Add" button. If you need to disable an operation uncheck the checkbox at the end of the operation line. If multiple operations exist the script will run each operation based on the results of the previous operation (chaining). If you wish to run these operations again in the future, you can export a configuration file containing your operation configuration. Just use the "Export Config" button. You can reimport them later. Need the results of your scripts in a file? Just use the "Export Results" button to save to a text file.

Final Thoughts

This tool is provided as is. No warranty. Use at your own risk. I just built this to solve a problem I have. This may not work for you. But I'm happy to share it with you.

Tool
  0

Categories: Development, Programming, Tools

Tags: development, javascript, regular-expression

PHP MySQLDump Browser


PHP MySQLDump Browser allows users/system admins to browse through MySQL Database Backups (Dump Files). Users can view and extract individual table structures and or data from MySQL database dumps. Use this script to avoid restoring entire backups to recover individual tables. Database dumps complied by mysqldump and phpMyAdmin are compatible with this tool. Note: This is an unoffical tool released under the GNU General Public License. PHP MySQLDump Browser creators have no affiliation with Sun Microsystems.

INSTRUCTIONS:
  1. Place the script on your webserver or webhost in the same directory as your MySQL backup dumps.
  2. Run the script.
  3. Choose which backup file you want to search. The script will search through the
  4. dump file for table structures and data. Depending on the size of the dump, this may take some time.
  5. Once the script has finished indexing the dump file, you may choose which table you wish to extract or view. By default the results of your query will display in the iframe at the bottom of the page. However you may download the results to file by clicking the download link above the iframe.

IMPORTANT: Remove PHP MySQLDump Browser as soon as you are finished.

COPYRIGHT AND DISCLAIMER: THIS SCRIPT IS PROVIDED AS IS, WITHOUT ANY WARRANTY OR GUARANTEE OF ANY KIND This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. If you change this script or add any features please tell me.

Download
  0

Categories: Development, Programming, Tools

Tags: development, php, programming

Problems & Solutions In The Life Of A Programmer



A great talk from Brad Traversy. Brad is the owner of Traversy Media. He is a great coder, mentor and teacher. I highly recommend subscribing to his channel on Youtube for more great videos and tutorials. Brad does a great job of presenting material in a fun and educational way. He speaks from heart and knowledge.
  0

Categories: Programming

Tags: youtube, programming

A Quote About Failure


While looking for inspiration, this quote hit me. Reminds me of the words of Yoda: "Do. Or do not. There is no try."

via quotefancy.com
  0

Categories: Quotes

Tags: motivational