Custom Search

Dec 14, 2011

Linux Tips: source .bashrc at login

terminal
 
If .bashrc is not sourced when you log in using SSH, you need to source it in your .bash_profile like this:

if [ -f ~/.bashrc ]; then
  . ~/.bashrc
fi

 
Additional information can be found here:
 
Configuring your login sessions with dot files
.bashrc at ssh login

Dec 6, 2011

Linux Tips: using diff – view differences side by side

terminal_thumb[2]
To view the differences side by side between two files:
 
diff -y FILE1 FILE2 | less

Using this on large diffs, can quickly show you exactly what changed between the two files in a  human readable format.

Google Tasks are your friends

Need a way to manage your daily tasks? Have Gmail? Try Google Tasks!



Useful keyboard shortcuts include:
In Gmail
Shift + T
Create a task based on the open message

G and then K
Open Tasks, or shift the cursor from Gmail to Tasks
In the Tasks Window
Tab
Moves task right ("subtasks")

Shift + Tab
Moves task left

Ctrl + Up
Moves task up

Ctrl + Down
Moves task down

Shift + Enter
Edit task details, including due date or notes

Esc
Close Tasks

Shift + Esc
Shift the cursor from Tasks to Gmail

Nov 13, 2011

Set of common Vi/Vim Commands


Cursor movement

  • h - move left
  • j - move down
  • k - move up
  • l - move right
  • w - jump by start of words (punctuation considered words)
  • W - jump by words (spaces separate words)
  • e - jump to end of words (punctuation considered words)
  • E - jump to end of words (no punctuation)
  • b - jump backward by words (punctuation considered words)
  • B - jump backward by words (no punctuation)
  • 0 - (zero) start of line
  • ^ - first non-blank character of line
  • $ - end of line
  • G - Go To command (prefix with number - 5G goes to line 5)
Note: Prefix a cursor movement command with a number to repeat it. For example, 4j moves down 4 lines.

Insert Mode - Inserting/Appending text

  • i - start insert mode at cursor
  • I - insert at the beginning of the line
  • a - append after the cursor
  • A - append at the end of the line
  • o - open (append) blank line below current line (no need to press return)
  • O - open blank line above current line
  • ea - append at end of word
  • Esc - exit insert mode

Editing

  • r - replace a single character (does not use insert mode)
  • J - join line below to the current one
  • cc - change (replace) an entire line
  • cw - change (replace) to the end of word
  • c$ - change (replace) to the end of line
  • s - delete character at cursor and subsitute text
  • S - delete line at cursor and substitute text (same as cc)
  • xp - transpose two letters (delete and paste, technically)
  • u - undo
  • . - repeat last command

Marking text (visual mode)

  • v - start visual mode, mark lines, then do command (such as y-yank)
  • V - start Linewise visual mode
  • o - move to other end of marked area
  • Ctrl+v - start visual block mode
  • O - move to Other corner of block
  • aw - mark a word
  • ab - a () block (with braces)
  • aB - a {} block (with brackets)
  • ib - inner () block
  • iB - inner {} block
  • Esc - exit visual mode

Visual commands

  • > - shift right
  • < - shift left
  • y - yank (copy) marked text
  • d - delete marked text
  • ~ - switch case

Cut and Paste

  • yy - yank (copy) a line
  • 2yy - yank 2 lines
  • yw - yank word
  • y$ - yank to end of line
  • p - put (paste) the clipboard after cursor
  • P - put (paste) before cursor
  • dd - delete (cut) a line
  • dw - delete (cut) the current word
  • x - delete (cut) current character

Exiting

  • :w - write (save) the file, but don't exit
  • :wq - write (save) and quit
  • :q - quit (fails if anything has changed)
  • :q! - quit and throw away changes

Search/Replace

  • /pattern - search for pattern
  • ?pattern - search backward for pattern
  • n - repeat search in same direction
  • N - repeat search in opposite direction
  • :%s/old/new/g - replace all old with new throughout file
  • :%s/old/new/gc - replace all old with new throughout file with confirmations

Working with multiple files

  • :e filename - Edit a file in a new buffer
  • :bnext (or :bn) - go to next buffer
  • :bprev (of :bp) - go to previous buffer
  • :bd - delete a buffer (close a file)
  • :sp filename - Open a file in a new buffer and split window
  • ctrl+ws - Split windows
  • ctrl+ww - switch between windows
  • ctrl+wq - Quit a window
  • ctrl+wv - Split windows vertically



Oct 30, 2011

Are w3svc1 log files getting very large, taking up too much of your Windows Server hard drive space?

Microsoft Windows Server 2003 is a pain to maintain. It doesn't automatically clean any log files, and recently I had to automate the clean up for another set of log files that grew to 100+ GB in size.

I have the disk space monitored using an in-house script, I put together. Soon you'll be able to get it at: http://radicmonitor.blogspot.com/

I received an email letting me know that the server is running low on hard drive space. After reviewing the graphs, I noticed that in the past 5 days, the free space went from 40GB down to 90MB. This is a problem.

To locate the problem I used an awesome tool I have used for several issues before: JDiskReport

To quickly resolve the problem, I followed the advice in this thread: http://social.technet.microsoft.com/Forums/en/configmgrgeneral/thread/d989b249-0159-41fc-b78c-1f1d91ce8bb3







Basically, you have do the clean up yourself. Just schedule an automatic cleanup every Sunday:

Just invoke the task scheduler using the following command:


at 12:00 /EVERY:Su Forfiles.exe -p C:\WINDOWS\system32\LogFiles\W3SVC1 -m *.log -d -30 -c \"Cmd.exe /C del @path\"  



12/04/2011: COMING SOON - A script to customize the above command for your environment. Add yourself to my email update list above.


Adjust the paths and the schedule to fit your needs.


NOW you have to go back to your event logs and see what's causing the logs to blow up. 

Let me know if this helped you in the comments section below.


Oct 25, 2011

How Can a Business Make a Profit Selling on eBay?

8214827
Selling on eBay can sometimes lead to losses for many businesses. In the last year, I've learned a proven recipe for making money as a small business selling computer hardware on eBay. These are the steps that can almost always guarantee sales on eBay.

 

 


analog-clock_v1.0Step 1: Know what you paid for your items. 

Keep an inventory. A simple spreadsheet should suffice. If you have employees, account for your time and their time in handling the items. Treat their time spent as part of the cost, but don’t over-do-it. If some products take more time to prepare, treat their time as sunk costs and move on.

 

 
 
Step 2: Terapeak.com - This is where you find out how much you should sell it for.
 
!!d-WUd!BHU~$(KGrHgoH-CoEjlLluzl BKgEtzLcC!~~_27
Terapeak lets you "Get eBay Data, Sell Smarter, & Increase Profits". It primarily helps you find out how much your item is worth to eBay buyers.


Terapeak is also a great tool to find out what your competitors are selling. It lets you search for sold and unsold listings in the past 7, 30, 60, 90 and 90+ days.


It's a tremendous tool for eBay sellers. Technically, if you price your items according to what buyers are paying, you're almost guaranteed a sale.

Sign up here: http://www.terapeak.com ($25 / month minimum)
 
 
 
 
 

calculator
Step 3: Use an eBay Fees Calculator.
 
http://www.rolbe.com/ebay.htm - This is where you find out how much profit you're likely to make (roughly)

If you're paying for an eBay store you need to select "Basic" stores level to get accurate fee information.

 

 



md5665Step 4: Automate fancy listings.
 
http://www.AuctionSound.com - This is the tool you're going to use to upload "fancy" eBay listings with nice pictures.


Check out my other post on AuctionSound (http://www.itbangbang.net/2011/10/how-do-you-automate-ebay-and-craigslist.html) which also lets you upload directly to Craigslist.
 
For used equipment use stock item pictures. It makes listing easier.
 
Download pictures from Google Image Search.
 
List items in 1 day, 3 day and 7 day durations so that you can theoretically sell throughout the week.
 
 

 
Turbolister2Step 5: Have a ton of similar items? Need them uploaded quickly?

eBay Turbo Lister - FREE eBay Tool that lets you quickly duplicate listings.

Useful for creating dozens of duplicate items. Lets say we have 20 identical items. You can just duplicate the item 10 times in Auction Style Listing.

Fixed Price listings are usually allowed only 1 per category, therefore having 20 listings pop up versus just 1 is an instant benefit.

 
 
 
Have any comments or tips for me?
 
Leave them in the comment field below this post.
 
Happy Selling!

How do you automate eBay and Craigslist Listings?

While browsing eBay listings, I recently found an online tool that allows you to create professional auction listings using amazing templates, and an easy to use interface that just works. In addition, the tool even lets you automatically upload professional posts to Craigslist as well.

Here are the pros and cons:

Pros:

  1. Only tool I have found so far that lets you automate Craigslist posts
  2. Creates great looking auctions and craigslist posts.
  3. Hosts your images and automatically resizes them for you.
  4. Manages your inventory.
  5. Lets you sell for other people and make a profit.
  6. Works well, and it's easy to use.

Cons:

  1. Not free; Minimum cost is $50 per month
  2. Only worth it if you're a business with lots of items to sell.

Here's a tip: If you're uploading to Craigslist, choose the simple layout with anonymous reply. It most closely resembles what you would upload if you were not using an automated tool.

Check it out at: http://www.auctionsound.com/





Video of the product in action: