Author - Web Developer - Educator
Found 5 results for tag "search"
RSS Feed

VIM Search and Replace

VIMI thought I'd post this because I needed it, and quick access doesn't hurt. I had a recent experience where I needed to replace a lot of text in a text file in the command line.

While I like to use vim as my text editor of choice while in a Linux system, I hated the fact that I had to find each instance of a word and manually type out the replaced word.

So, I found a solution: (thank you VIM Wiki)

:%s/
The %s command works just like wq, so you need to proceed it with a colon. But here's how it works:
:%s/FIND/REPLACE/OPTIONS
I hope this seems straight forward, but here's the breakdown: %s - initiate the :substitute feature FIND - the word/phrase you want to find REPLACE - the word/phrase you want to replace it with OPTIONS - there are a series of options you can include, the most popular one being g Here is an example:
:%s/cat/dog/g
This replaces all instances of "cat" with the word "dog". Simple, right?

Options

Here is the list of options I have come up with so far:
c - ask for confirmation (similiar to the -i flag)
i - case insensitive search/replace
I - case sensitive (the flag \C can also be tacked on to the word in case you want the word to be case sensitive only)
:%s/\<cat\>/dog/g - while not in the Options field, this searches for the whole words only (such as "cat", but not "categories")

There are plenty of other examples on the VIM Wiki page, but I thought I'd post this guide here for my benefit and anybody elses that needs it.


Tags:#vim #linux #texteditor #search #replace #guide

RSS Feed

Job Hunt Progress

I felt it was necessary to report my latest status regarding my "job hunt" so far.

Over the past 6 months, I have been searching for a job to bring in additional income. Here are my results:

9/14/13:
Kitchen & Company - Never heard back
Trader Joes - Denied at interview
Haywood Community College (Director of Small Business Center) - After a long and frustrating application process, where my application and transcripts were sent to the wrong department twice, I never received a return call

9/25/2013:
Target - Denied on 1/17/14
Biltmore (IT) - Denied
Biltmore (Dishwasher) - Denied
Biltmore (Security) - 1 interview, then Denied

12/3/13:
Regal Cinemas (Floor Staff) - Never heard back/Application Expired

12/14/13:
WCU (Grounds Keeper) - Still "In Progress"
WCU (Instructor) - Still "In Progress"
WCU (Assistant) - Denied
WCU (IT Services) - Denied
UNCA (Journey) - Still "In Progress"

1/6/14:
MedWest (IT) - 1 interview, then never heard back

1/12/14:
Art & Logic - 1 return email, completed a sample task, then Denied on 2/19/14 (although, according to the email, my work was better than what they usually receive, but it wasn't good enough to move on)
BCGTrans - Never heard back
KISS (Book company) - Never heard back
Followup Boss - Denied
TOKY - Never heard back
Morrison Agency - Never heard back
Authenticff - Never heard back
McKinley - Denied

1/25/14 (at this point, I just didn't care where/what the job was):
Lowes (Overnight Stock) - Turned down within 12 hours
Bi-Lo (Stock) - Denied even before I finished the application
Ingles - TBA
Harris Teeter (3rd Shift Stocker) - Application expired (3/25/14)

Update (2/10/14)2/1/14:
Buncombe County (Black Mountain Tech Support) - Application expired
Barnes & Noble - Denied
PNC Bank (Tech Support) - Denied on 2/10/14

2/2/14:
National Park Service - Denied on 4/7/14

2/3/14:
WCU (Tech Support) - Turned down (3/25/14)
WCU (CatTran Driver) - Possibly accepted on 7/2, but way out of date
WCU (UC Housekeeping Staff) - Denied on 2/25/14
WCU (Ramsey Housekeeping Staff) - Still "In Progress"
WCU (Assistant Campus Activites Director) - Still "In Progress"
Champion Credit Union - TBA
State Employees Credit Union - Denied on 3/20/14

2/4/14:
Mast General - TBA
New Meridian - TBA

2/6/14:
Harris Teeter (3rd Shift Cashier) - Application expired (3/25/14)
Regal Cinemas (Floor Staff) - Application Expired, Again

2/9/14:
Greater Asheville Regional Airport Authority (Operations Specialist I) - TBA

2/10/14:
Harris Teeter (PT Cashier) - TBA
Harris Teeter (PT Stocker) - Application expired (3/25/14), Denied on 5/16/14
Harris Teeter (3rd Shift Assistant Grocery Manager) - Application expired (3/25/14), Denied on 5/16/14

Update (2/21/14)2/17/14:
Clear Channel Radio (Promotions Director) - Denied on 8/20/15
A-dec (Web Developer) - Denied on 4/10

2/17/14:
AdvisorPool (Web Developer) - Denied on 3/26
[Legal Website] (Web Developer) - In Progress, not finalized

2/21/14:
UNCA (Assistant Director for Student Engagement) - TBA

Update (3/14/14)3/14/14:
KeyBank (Applications System Consultant) - TBA

Update (3/25/14)3/24/14:
City of Asheville (Park Ranger - Athletics & Ball Fields) - Denied on 5/6/14
City of Asheville (Parks Recreation - Cultural & Arts) - TBA
City of Asheville (Concessionsare/Runner) - TBA
City of Asheville (Adminstrative Assistant - Human Resources) - TBA
City of Asheville (Adminstrative Secretary - Human Resources) - TBA
City of Asheville (Cashier) - TBA
City of Asheville (Tradesworker) - TBA

3/25/14:
CBTS (Web Developer) - Possibility.... and Nope (4/9/14). Apparently, not enough Responsive experience
Abacus Group, LLC (Web Developer) - TBA
CyberCoders (PHP Developer) - TBA
CyberCoders (LAMP Developer) - Denied on 4/3/14

3/27/14:
SMDC (Building Manager) - TBA

Update (4/7/14)4/7/14:
Harrah's Cherokee Casino - Production Technician - Denied on 5/7/14
Harrah's Cherokee Casino - A/V Technician - 1 interview, then never heard back

Update (4/17/14)4/17/14:
USPS (Mail Sorter and Processor) - TBA
Applied Solutions Group (PHP Developer) - TBA
WCU (Director of Conference Services) - TBA

4/18/14:
Evergreen Packaging (Traffic Coordinator) - Denied on 5/15/14
Haywood County (Custodian) - Denied on 5/16

4/19/14:
City of Asheville (GIS Analyst/Civic Programmer) - TBA
Immedion (Managed Services Engineer) - TBA
Modis (IT Infrastructure Manager) - TBA
Sinclair Broadcast Group (Multimedia IT Engineer) - TBA
Smoky Mountain Center (QA Tester/Trainer) - TBA
Self-Help (IT Tech Support Specialist) - TBA
Gardner Institute for Excellence in Undergraduate Education (Director of Marketing and Communications) - Denied on 5/16/14
A-B Tech (Programmer Analyst III) - TBA
A-B Tech (Instructor - Computer Skills) - TBA
A-B Tech (Instructor - Business Computer Technologies) - Possible
BorgWarner (Sr. Business Analyst - SAP) - TBA
Gaia Herbs (Application Developer) - Denied on 4/28
Storage Unit Auction List (Developer) - TBA
City of Asheville (Park Ranger) - Denied on 5/6/14
RSI Vacations (Application Developer) - TBA

4/20/14:
Beaconfire (Programmer/Developer) - TBA
GalaxeSolutions (PHP Programmer) - TBA
TreeHouse Internet Group (PHP Developer) - TBA

4/22/14:
Locus (Front End Developer) - TBA

4/24/14 - Harrah's Job Fair:
Harrah's (Production Designer) - Denied
Harrah's (Drop Counter Staff) - Denied
Harrah's (Groundskeeper) - Denied
Harrah's (Table Games Dealer) - YES!

5/1/14:
Runskip (Web Designer) - TBA
RSI Vacations (PHP Developer I) - TBA
(no name) (LAMP Developer) - TBA
(no name) (Web Designer) - TBA
Econosoft Inc (PHP Developer) - TBA


Although I'm hopeful for Ingles and/or Harris Teeter, nobody can say that I didn't try, or "Getting a job is easy". I've been trying, trust me. That's 26 44 49 50 62 64 84 87 applications in 8 months (as of 4/18/14).


Tags:#jobs #status #search #results

RSS Feed

Viewing Recent Purchases via Google

I was browsing for the voltage requirements for an item I recently purchased through Amazon when I found this neat little trick with Google:

I was browsing for HDE, the seller of a nice little camera I bought, when this box on the right popped up.
Searching for HDE with Google

I thought it was kind of cool, so I clicked on "1 item from Amazon.com" (which took me to https://google.com/search?&q=my+purchases) and I saw this:
My Purchases with Google

Google used my Gmail information and told me (very concisely) what the recent orders were, their expected delivery dates, and a tracking link for each (if it can find a relevant one).

I didn't expect to find this, but hey, one more way that Google is making my life easier.

(PS: You will need an active Gmail account for this to work)

(PPS: You can also just Google "my purchases" and the search result page will come up as well - you don't have to go through these steps to find that page)


Tags:#google #gmail #amazon #purchase #search #tracking

RSS Feed

Find text in files with GREP

I needed to reference this quite frequently, so I thought I'd post it here.

Ever had the frustration of needing to find a certain string inside files on a Linux OS via a terminal/command line? It'd be nice to have something like the Windows File Finder (when it works) to search for text inside of a file and report the file back.

You could cat each file and use grep [string] to spit back each line, then write down the filename. But there is an easier way.

Use grep first instead of piping it!

All you need to do is type in

grep -lir "[phrase]" [directory]
and that's all there is to it (the quotations are optional). By using the command grep instead of using it after a pipe "|", this can search through files in an instant instead of having to manually search through each file. The -l (that's a lowercase "L") puts out files that match (as opposed to -v which shows all files that don't match). The i makes the search query case insensitive. Lastly, the r makes grep recursive in folders. Simple as that. Of course, you can have the results spit back to you if you just press Enter, or you can output it to a file by using the > operator, like so:
grep -lir "cout" . > output.txt
(my VB and C++ friends should like this)


Tags:#linux #commandline #terminal #grep #search #tutorials

RSS Feed

Tueday's over already?

Laser Pointer

Yesterday seemed to fly by. Keat didn't have class in the morning, but she still had to be there to sign in, so we were up and out of the apartment by noon. I actually got a lot of sleep on Monday night, but I was always so tired during the day. Can't figure that out.

Anyway, after I got to the office, I decided to spruce up on th jQuery I'd been studying. I fixed a few Fire & Ice issues (along with implementing jQuery on the spot), and did a little sales work on the side. Didn't get 1 of our potential customers that I'd been working with for about 3 weeks, but that's okay. Sooner or later, we'll get more customers.

I also figured out that by using a border-code in CSS, I can eliminate the "rounded box images" I had been using so much. This actually makes it easier for me because I don't have to create custom-color images for each rounded box I want. The CSS automatically rounds the box for me, and uses the supplied div/img without any additional markup! What a time-saver!
.round_border, .round_box{
 
	-moz-border-radius:12px;
 
	-khtml-border-radius: 12px;
 
	-webkit-border-radius: 12px;
 
	border-radius:12px;
 
}

I also added a few features to the blog; the main one being the "Search" feature (others being the bottom gear margin fix and the Newer/Older buttons, but the Search feature took me the longest to add/fix). Using the round box CSS method, I also made that input field rounded as well. How cool is that? I wanted to use jQuery to automatically highlight the searched term when found in the context, but that took too long. With my limited knowledge and the examples from jquery.com, it turns out that the example I was using would actually go through the whole context and replace every word with &;lt;span>word, which can get very resource-heavy and it took about 10-20 seconds for the page to load. After unsucessfully finding a method for $('#content').find(':contains('+query+').replaceWith(''+query+''), only to find that the jQuery statement would end up in a recursive loop, I decided to make it server-side and have the replacement function in PHP instead of jQuery. That actually made things a lot faster and I found a case-insensitive function that allowed for replacement of the original capitalization (if existed). That saved me a few hours.

On to a different topic: I finally successfully implemented the Active/Inactive feature on the Business Accelerator form builder, but it took me forever to figure out why the variable wasn't being passed right. It turns out that I actually had my custom function get each array type in the form and (after passing it through a "Save" page with jQuery and AJAX), compile the whole thing into an orderly form with proper syntax. So in order to find the Active/Inactive variable, the function was trying to find a variable in an array that didn't exist, which is why the variable wasn't being passed. After I realized that, I took the custom parser out and made the Active/Inactive and Debug variables parse first (since they're only checkboxes), and parse the rest of the array-based form later. That solved that issue.

I'm still working on the form builder, and Milestone 4 should be done within a day or so (with respect to the world around me). If things go right, I should have it done by Spring. That'd be awesome.

I'm also going to be adding a "Projects" tab to this site for project tracking. Let's see how well that goes.

On another topic, I finished Eureka 3.5 and I'm excited to see what happens next. Season 4 isn't out on Netflix Instant yet, and Hulu only has episodes 5-9 until the season returns in 2011. I may watch 4:5-9 and watch 4:1-4 when Instant comes out, but I don't know right now. I may not be able to hold the excitement if Season 4 has 20 episodes, which means Instant is a ways off.

After yesterday's long work day (I got home around 9ish), Keat and I cooked dinner and watch the Eureka Pilot. It's a good series, I don't mind watching it again, plus Keat wanted to watch it from the beginning. She went to bed around 11 (maybe 12?), and I was up working on a few loose ends before I hit the sack around 2 (and missed the post for the day). Then, this mornings alarm woke me up around 8. Why must the winter be so cold? I wanted to call it a "sick day" and crawl back under the covers. But, work has to get done........


Tags:#eureka #netflix #xkcd #css #jquery #search #accelerator #hulu