Difference between revisions of "Computer Productivity Hacks"

From TeleCafeWiki
Jump to navigation Jump to search
(Add section: Databases + rearrange sections.)
Line 54: Line 54:
 
: Works with [[wikipedia:Command Prompt|cmd.exe]], but doesn't seem to work with [[wikipedia:Windows PowerShell|Windows PowerShell]].
 
: Works with [[wikipedia:Command Prompt|cmd.exe]], but doesn't seem to work with [[wikipedia:Windows PowerShell|Windows PowerShell]].
  
== Rename Files & Folders ==
+
== Data Analysis Tools ==
* [http://www.labnol.org/software/tutorials/rename-multiple-files-bulk-excel-googl-docs/2481/ Rename Multiple Files Efficiently Using Excel or Google Docs]
+
Moved content to [[Data Analysis]].
: To rename files in bulk more efficiently, you can either learn some complex shell scripting language (SED, AWK, Perl) or switch to something more simple--a spreadsheet.
+
 
 +
== Databases ==
 +
* [http://www..com/mysql/mysql-database-export.htm MySQL Database Export - Backup Methods]
 +
: Includes Section: '''Copying Tables or Databases to Another Host''':
 +
:: (You can) send the output of mysqldump directly over the network to the remote MySQL server. If you can connect to both servers from the host where source database resides, use this command (Make sure you have access on both the servers):
 +
:::<code>$ mysqldump -u root -p database_name \</code>:
 +
::::<code>| mysql -h other-host.com database_name</code>
 +
 
 +
== Educate Yourself ==
 +
=== Learn to Code ===
 +
* [http://www.labnol.org/internet/learn-coding-online/28537/ The Best Websites to Learn Coding Online] - Amit Agarwal, ''Digital Inspiration'', Jan 12 2015
 +
: The ''Learn to Code'' movement has picked up momentum worldwide and that is actually a good thing as even basic programming skills can have a major impact. If you can teach yourself how to write code, you gain a competitive edge over your peers, you can think more algorithmically and thus can tackle problems more efficiently.
 +
 
 +
* [http://www.propublica.org/nerds/item/new-years-resolution-learn-to-code New Year’s Resolution: Learn to Code] - by Lena Groeger, ''ProPublica'', Dec. 19, 2012, 2:51 p.m.
 +
: Lena Groeger: When I started learning to code, I was amazed by how much was out there: introductory videos, explanatory blog posts, tips and tricks and step-by-step guides. If you're a journalist who wants to make a news app or a student interested in learning to code, you have plenty of paths to choose from.
  
=== Bulk Rename Files ===
+
=== Multiple Codes ===
* [http://www.howtogeek.com/111859/how-to-batch-rename-files-in-windows-4-ways-to-rename-multiple-files/ How to Batch Rename Files in Windows: 4 Ways to Rename Multiple Files]
+
* [http://www.codecademy.com/learn Codecademy]
: Bottom line: use this tool: [http://www.bulkrenameutility.co.uk/Download.php Bulk Rename Utility] (Windows only.)
+
: Learn to code while building a project. Free online courses include: HTML &amp; CSS; jQuery; JavaScript; PHP; Python; Ruby; Web Projects; APIs
  
* Confused by [http://www.bulkrenameutility.co.uk/Download.php Bulk Rename Utility]? Take a look at [http://ivanrf.com/en/portfolio-posts/massive-file-renamer/ Massive File Renamer] instead.
+
=== R ===
 +
* [https://www.datacamp.com/ DataCamp]
 +
: Learn R & Become a Data Analyst
  
=== Rename List of Files With Batch File ===
+
=== D3.js ===
It's easy to rename a group of files by running a [[wikipedia:Batch file|batch file]] (<tt>file.bat</tt>), configured something like this:
+
* [https://www.youtube.com/user/d3Vienno d3Vienno]
<pre>
+
: '''d3Vienno''' features a series of video tutorials, each about 10-12 minutes long, on using D3.js.
rename "Old-File_001.jpg" "New-File_001.jpg"
 
rename "Old-File_002.jpg" "New-File_002.jpg"
 
rename "Old-File_003.jpg" "New-File_003.jpg"
 
</pre>
 
Using Windows or DOS, just create your [[wikipedia:Batch file|batch file]] using the format shown above, and then double-click it to rename the files in the directory containing both your <tt>file.bat</tt> and files with the same names as those found in the "Old-File" (left) column of your <tt>file.bat</tt> file.
 
  
* [http://stackoverflow.com/questions/3808001/how-do-i-create-batch-file-to-rename-large-number-of-files-in-a-folder How do I create batch file to rename large number of files in a folder?]
+
* [http://gisciencegroup.ucalgary.ca/engo500/texts/Interactive_Data_Visualization_for_the_Web.pdf Interactive Data Visualization for the Web: An Introduction to Designing with D3]
: See this answer: http://stackoverflow.com/a/3808074
 
:: For help with using Regular Expressions in text file, see this answer: [http://stackoverflow.com/questions/28807534/regular-expresion-in-text-editor Regular expresion in text editor] ([[wikipedia:Sic|sic]])
 
  
=== Rename Multiple Folders / Directories With Batch File ===
+
; D3 Tools
* [http://stackoverflow.com/questions/9271107/bat-file-for-renaming-multiple-folders .bat file for renaming multiple folders]
+
* [http://nytimes.github.io/svg-crowbar/ SVG Crowbar]
: There are a couple of pretty good answers to this question; answers that explain how the regular expression written into the <tt>.bat</tt> file actually works.
+
: A Chrome-specific bookmarklet that extracts SVG nodes and accompanying styles from an HTML document and downloads them as an SVG file—A file which you could open and edit in Adobe Illustrator, for instance. Because SVGs are resolution independent, it’s great for when you want to use web technologies to create documents that are meant to be printed (like, maybe on newsprint). It was created with d3.js in mind, but it should work fine no matter how you choose to generate your SVG.
  
 
== File Transfer ==
 
== File Transfer ==
Line 99: Line 108:
 
: To compress a folder without using any particular compression software.
 
: To compress a folder without using any particular compression software.
 
[[File:MacScreenshots.PNG|500px|thumb|link=http://apple.stackexchange.com/questions/33906/alternative-to-windows-snipping-tool-for-mac-osx|Getting screenshots from a Mac.]]
 
[[File:MacScreenshots.PNG|500px|thumb|link=http://apple.stackexchange.com/questions/33906/alternative-to-windows-snipping-tool-for-mac-osx|Getting screenshots from a Mac.]]
 +
 +
== Maintenance ==
 +
=== Dual Boot ===
 +
* [http://lifehacker.com/5403100/dual-boot-windows-7-and-ubuntu-in-perfect-harmony Dual-Boot Windows 7 and Ubuntu in Perfect Harmony]
 +
 +
=== Boot Disks ===
 +
* [http://lifehacker.com/5991848/how-to-boot-from-a-cd-or-usb-drive-on-any-pc How to Boot From a CD or USB Drive on Any PC]
 +
 +
* [http://rufus.akeo.ie/ Rufus]
 +
: Rufus is an utility that helps format and create bootable USB flash drives, such as USB keys/pendrives, memory sticks, etc.
 +
 +
=== Network Issues ===
 +
* [http://www.howtosolutions.net/2013/06/fixing-slow-sending-or-receiving-of-files-through-lan-network-using-windows/ Local Area Network : How to fix slow LAN transfer speed of files in Windows]
 +
: Post reviews various "fixes" found all over the web, and which "fix" actually worked for the post's author.
 +
 +
* [http://www.richard-slater.co.uk/archives/2009/10/23/change-your-mtu-under-vista-windows-7-or-windows-8/ Change your MTU under Vista, Windows 7 or Windows 8]
 +
: Path MTU Discovery (PMTUD) in Windows just doesn’t seem to figure out the MTU for a given path. So Windows uses the default. For the most part this doesn’t affect anyone. But failure of PMTUD will result in some websites not loading correctly, having trouble connecting to normally reliable online services and general Internet weirdness.
 +
 
== Print Screen / Screen Grabs / Screen Shots ==
 
== Print Screen / Screen Grabs / Screen Shots ==
 
* [[wikipedia:Print screen|Print Screen]]
 
* [[wikipedia:Print screen|Print Screen]]
Line 116: Line 143:
 
Moved content to [[Data Analysis]].
 
Moved content to [[Data Analysis]].
  
== Text Editors ==
+
== Rename Files &amp; Folders ==
* [http://stackoverflow.com/questions/20533/mac-text-code-editor Mac text/code editor]
+
* [http://www.labnol.org/software/tutorials/rename-multiple-files-bulk-excel-googl-docs/2481/ Rename Multiple Files Efficiently Using Excel or Google Docs]
 +
: To rename files in bulk more efficiently, you can either learn some complex shell scripting language (SED, AWK, Perl) or switch to something more simple--a spreadsheet.
  
== Text Extraction ==
+
=== Bulk Rename Files ===
Moved content to [[Data Analysis]].
+
* [http://www.howtogeek.com/111859/how-to-batch-rename-files-in-windows-4-ways-to-rename-multiple-files/ How to Batch Rename Files in Windows: 4 Ways to Rename Multiple Files]
 +
: Bottom line: use this tool: [http://www.bulkrenameutility.co.uk/Download.php Bulk Rename Utility] (Windows only.)
  
== Educate Yourself ==
+
* Confused by [http://www.bulkrenameutility.co.uk/Download.php Bulk Rename Utility]? Take a look at [http://ivanrf.com/en/portfolio-posts/massive-file-renamer/ Massive File Renamer] instead.
=== Learn to Code ===
 
* [http://www.labnol.org/internet/learn-coding-online/28537/ The Best Websites to Learn Coding Online] - Amit Agarwal, ''Digital Inspiration'', Jan 12 2015
 
: The ''Learn to Code'' movement has picked up momentum worldwide and that is actually a good thing as even basic programming skills can have a major impact. If you can teach yourself how to write code, you gain a competitive edge over your peers, you can think more algorithmically and thus can tackle problems more efficiently.
 
  
* [http://www.propublica.org/nerds/item/new-years-resolution-learn-to-code New Year’s Resolution: Learn to Code] - by Lena Groeger, ''ProPublica'', Dec. 19, 2012, 2:51 p.m.
+
=== Rename List of Files With Batch File ===
: Lena Groeger: When I started learning to code, I was amazed by how much was out there: introductory videos, explanatory blog posts, tips and tricks and step-by-step guides. If you're a journalist who wants to make a news app or a student interested in learning to code, you have plenty of paths to choose from.
+
It's easy to rename a group of files by running a [[wikipedia:Batch file|batch file]] (<tt>file.bat</tt>), configured something like this:
 +
<pre>
 +
rename "Old-File_001.jpg" "New-File_001.jpg"
 +
rename "Old-File_002.jpg" "New-File_002.jpg"
 +
rename "Old-File_003.jpg" "New-File_003.jpg"
 +
</pre>
 +
Using Windows or DOS, just create your [[wikipedia:Batch file|batch file]] using the format shown above, and then double-click it to rename the files in the directory containing both your <tt>file.bat</tt> and files with the same names as those found in the "Old-File" (left) column of your <tt>file.bat</tt> file.
  
=== Multiple Codes ===
+
* [http://stackoverflow.com/questions/3808001/how-do-i-create-batch-file-to-rename-large-number-of-files-in-a-folder How do I create batch file to rename large number of files in a folder?]
* [http://www.codecademy.com/learn Codecademy]
+
: See this answer: http://stackoverflow.com/a/3808074
: Learn to code while building a project. Free online courses include: HTML &amp; CSS; jQuery; JavaScript; PHP; Python; Ruby; Web Projects; APIs
+
:: For help with using Regular Expressions in text file, see this answer: [http://stackoverflow.com/questions/28807534/regular-expresion-in-text-editor Regular expresion in text editor] ([[wikipedia:Sic|sic]])
  
=== R ===
+
=== Rename Multiple Folders / Directories With Batch File ===
* [https://www.datacamp.com/ DataCamp]
+
* [http://stackoverflow.com/questions/9271107/bat-file-for-renaming-multiple-folders .bat file for renaming multiple folders]
: Learn R & Become a Data Analyst
+
: There are a couple of pretty good answers to this question; answers that explain how the regular expression written into the <tt>.bat</tt> file actually works.
  
=== D3.js ===
+
== Text Editors ==
* [https://www.youtube.com/user/d3Vienno d3Vienno]
+
* [http://stackoverflow.com/questions/20533/mac-text-code-editor Mac text/code editor]
: '''d3Vienno''' features a series of video tutorials, each about 10-12 minutes long, on using D3.js.
 
  
* [http://gisciencegroup.ucalgary.ca/engo500/texts/Interactive_Data_Visualization_for_the_Web.pdf Interactive Data Visualization for the Web: An Introduction to Designing with D3]
+
== Text Extraction ==
 
+
Moved content to [[Data Analysis]].== Investigative Reporting; Journalism; General Research ==
; D3 Tools
 
* [http://nytimes.github.io/svg-crowbar/ SVG Crowbar]
 
: A Chrome-specific bookmarklet that extracts SVG nodes and accompanying styles from an HTML document and downloads them as an SVG file—A file which you could open and edit in Adobe Illustrator, for instance. Because SVGs are resolution independent, it’s great for when you want to use web technologies to create documents that are meant to be printed (like, maybe on newsprint). It was created with d3.js in mind, but it should work fine no matter how you choose to generate your SVG.
 
 
 
== Data Analysis Tools ==
 
Moved content to [[Data Analysis]].
 
 
 
== Investigative Reporting; Journalism; General Research ==
 
 
* [http://www.ire.org/ Investigative Reporters and Editors] ([http://www.ire.org/ IRE])
 
* [http://www.ire.org/ Investigative Reporters and Editors] ([http://www.ire.org/ IRE])
 
: Useful IRE Resources:
 
: Useful IRE Resources:
 
::- [http://www.ire.org/nicar/nicar-net-tour/ NICAR Net Tour] - The [http://www.ire.org/nicar/ National Institute for Computer-Assisted Reporting] ([http://www.ire.org/nicar/ NICAR]) is an [http://www.ire.org/ IRE] program.
 
::- [http://www.ire.org/nicar/nicar-net-tour/ NICAR Net Tour] - The [http://www.ire.org/nicar/ National Institute for Computer-Assisted Reporting] ([http://www.ire.org/nicar/ NICAR]) is an [http://www.ire.org/ IRE] program.
 
::- [http://www.ire.org/nicar/analysis-jobs/ Analysis jobs by NICAR] - Names the media organizations [http://www.ire.org/nicar/ NICAR] has worked for, and lists kinds of analysis jobs [http://www.ire.org/nicar/ NICAR] has done.
 
::- [http://www.ire.org/nicar/analysis-jobs/ Analysis jobs by NICAR] - Names the media organizations [http://www.ire.org/nicar/ NICAR] has worked for, and lists kinds of analysis jobs [http://www.ire.org/nicar/ NICAR] has done.
 
== Maintenance ==
 
=== Dual Boot ===
 
* [http://lifehacker.com/5403100/dual-boot-windows-7-and-ubuntu-in-perfect-harmony Dual-Boot Windows 7 and Ubuntu in Perfect Harmony]
 
 
=== Boot Disks ===
 
* [http://lifehacker.com/5991848/how-to-boot-from-a-cd-or-usb-drive-on-any-pc How to Boot From a CD or USB Drive on Any PC]
 
 
* [http://rufus.akeo.ie/ Rufus]
 
: Rufus is an utility that helps format and create bootable USB flash drives, such as USB keys/pendrives, memory sticks, etc.
 
 
=== Network Issues ===
 
* [http://www.howtosolutions.net/2013/06/fixing-slow-sending-or-receiving-of-files-through-lan-network-using-windows/ Local Area Network : How to fix slow LAN transfer speed of files in Windows]
 
: Post reviews various "fixes" found all over the web, and which "fix" actually worked for the post's author.
 
 
* [http://www.richard-slater.co.uk/archives/2009/10/23/change-your-mtu-under-vista-windows-7-or-windows-8/ Change your MTU under Vista, Windows 7 or Windows 8]
 
: Path MTU Discovery (PMTUD) in Windows just doesn’t seem to figure out the MTU for a given path. So Windows uses the default. For the most part this doesn’t affect anyone. But failure of PMTUD will result in some websites not loading correctly, having trouble connecting to normally reliable online services and general Internet weirdness.
 
  
 
== See Also ==
 
== See Also ==

Revision as of 08:39, 11 July 2015

Command Line

Mounting shared drives and connecting to remote resources is something you can easily do from the Windows GUI. With our quick guide to the command prompt, however, you can more easily automate large tasks.
Quick super fast course in using the command line. It is intended to be done rapidly in about a day or two, and not meant to teach you advanced shell usage.

WGET

Using PowerShell (Among other useful options listed at this resource.):
WinWGet is a GUI (Graphical User Interface) for Wget. It is FREE. It will keep track of your downloads - add, clone, edit, delete jobs.
GNU Wget is a free network utility to retrieve files from the World Wide Web using HTTP and FTP, the two most widely used Internet protocols. It works non-interactively, thus enabling work in the background, after having logged off.
Say you want to backup your blog or create a local copy of an entire directory of a web site for archiving or reading later. The command: wget -m http://website.tld
Tips for mirroring specific directories, update only changed files, etc.
Download files using curl or wget. This addon generates curl/wget commands that emulate the request as though it's coming from your browser allowing you to download protected files directly to a separate machine (e.g. server).

Windows Command Line

Cmdlets are the heart-and-soul of Windows PowerShell, Microsoft's latest command shell/scripting language.
Robocopy: A robust file copy command for the Windows command line.
Each command is linked to more info about the particular command.
The xcopy command is a Command Prompt command used to copy one or more files and/or folders from one location to another location.
This question is answered in numerous ways. Many of the answers point to useful utilities to accomplish find-and-replace.

Generate File List

Example: C:\Users\me\Downloads\MyFolder> dir /b > filelist.txt
(The text in orange shows the command used once you've navigated into the directory from which you want to generate the list of file names.)
This tutorial contains several working answers for using Windows PowerShell to list files and folders.
Works with cmd.exe, but doesn't seem to work with Windows PowerShell.

Data Analysis Tools

Moved content to Data Analysis.

Databases

Includes Section: Copying Tables or Databases to Another Host:
(You can) send the output of mysqldump directly over the network to the remote MySQL server. If you can connect to both servers from the host where source database resides, use this command (Make sure you have access on both the servers):
$ mysqldump -u root -p database_name \:
| mysql -h other-host.com database_name

Educate Yourself

Learn to Code

The Learn to Code movement has picked up momentum worldwide and that is actually a good thing as even basic programming skills can have a major impact. If you can teach yourself how to write code, you gain a competitive edge over your peers, you can think more algorithmically and thus can tackle problems more efficiently.
Lena Groeger: When I started learning to code, I was amazed by how much was out there: introductory videos, explanatory blog posts, tips and tricks and step-by-step guides. If you're a journalist who wants to make a news app or a student interested in learning to code, you have plenty of paths to choose from.

Multiple Codes

Learn to code while building a project. Free online courses include: HTML & CSS; jQuery; JavaScript; PHP; Python; Ruby; Web Projects; APIs

R

Learn R & Become a Data Analyst

D3.js

d3Vienno features a series of video tutorials, each about 10-12 minutes long, on using D3.js.
D3 Tools
A Chrome-specific bookmarklet that extracts SVG nodes and accompanying styles from an HTML document and downloads them as an SVG file—A file which you could open and edit in Adobe Illustrator, for instance. Because SVGs are resolution independent, it’s great for when you want to use web technologies to create documents that are meant to be printed (like, maybe on newsprint). It was created with d3.js in mind, but it should work fine no matter how you choose to generate your SVG.

File Transfer

File Transfer Clients for Windows Mac

Lists several clients recommended for interoperating with OpenSSH from Mac OS machines. Note that Mac OS X includes OpenSSH by default.
SSH Clients for Windows, Mac, and Unix
Libre FTP, SFTP, WebDAV, S3 & OpenStack Swift browser for Mac and Windows.

Folder & File Compression

Example: for /d %%X in (*) do "c:\Program Files\7-Zip\7z.exe" a "%%X.zip" "%%X\"
To compress a folder without using any particular compression software.
Getting screenshots from a Mac.

Maintenance

Dual Boot

Boot Disks

Rufus is an utility that helps format and create bootable USB flash drives, such as USB keys/pendrives, memory sticks, etc.

Network Issues

Post reviews various "fixes" found all over the web, and which "fix" actually worked for the post's author.
Path MTU Discovery (PMTUD) in Windows just doesn’t seem to figure out the MTU for a given path. So Windows uses the default. For the most part this doesn’t affect anyone. But failure of PMTUD will result in some websites not loading correctly, having trouble connecting to normally reliable online services and general Internet weirdness.

Print Screen / Screen Grabs / Screen Shots

In Microsoft Windows, pressing Prt Scr will capture the entire screen, while pressing the Alt key in combination with Prt Scr will capture the currently selected window.
Using Ubuntu Linux
Using Mac OS
Using Windows

Regular Expressions

Moved content to Data Analysis.

Rename Files & Folders

To rename files in bulk more efficiently, you can either learn some complex shell scripting language (SED, AWK, Perl) or switch to something more simple--a spreadsheet.

Bulk Rename Files

Bottom line: use this tool: Bulk Rename Utility (Windows only.)

Rename List of Files With Batch File

It's easy to rename a group of files by running a batch file (file.bat), configured something like this:

rename "Old-File_001.jpg" "New-File_001.jpg"
rename "Old-File_002.jpg" "New-File_002.jpg"
rename "Old-File_003.jpg" "New-File_003.jpg"

Using Windows or DOS, just create your batch file using the format shown above, and then double-click it to rename the files in the directory containing both your file.bat and files with the same names as those found in the "Old-File" (left) column of your file.bat file.

See this answer: http://stackoverflow.com/a/3808074
For help with using Regular Expressions in text file, see this answer: Regular expresion in text editor (sic)

Rename Multiple Folders / Directories With Batch File

There are a couple of pretty good answers to this question; answers that explain how the regular expression written into the .bat file actually works.

Text Editors

Text Extraction

Moved content to Data Analysis.== Investigative Reporting; Journalism; General Research ==

Useful IRE Resources:
- NICAR Net Tour - The National Institute for Computer-Assisted Reporting (NICAR) is an IRE program.
- Analysis jobs by NICAR - Names the media organizations NICAR has worked for, and lists kinds of analysis jobs NICAR has done.

See Also

References