Category: Web Design Articles



In today’s video tutorial, we are going to use CodeIgniter to pull information from a database and display it in a sortable table structure. This is a quite common task, especially inside admin areas, for displaying database records. We’ll be utilizing a few different utilities, such as the active records library and pagination.


Catch Up


Day 16: Displaying & Sorting Tabular Data

Day 16: Displaying & Sorting Tabular Data

Thanks for watching! Any questions/thoughts?

Easier Than A Defamation Suit

Defamation Suit Headaches

Sometimes bad news follows us around. With the Internet’s ability to remember ever little thing, that happens even more often. Someone doesn’t like you or your business and, whether that opinion is valid or not, they send out some kind of attack over the electric wires. And that’s the stuff that sticks around forever, haunting your reputation and damaging your business.

It’s not all monsters out there online to chew you up, though. What kind of a place would the Internet be? No, it’s a big electric nest for new ideas, so you shouldn’t be surprised to hear that solutions have sprung up. In this case, one solution is to recruit the aid of a reputation repair service. These businesses will scrub away the bad.

Defamation Suit Solutions

There’s a trick to making it work for you, of course. Sites get ranked on search pages based on how many sites link to it, so a reputation repair service can force negative stuff down by out-linking it with the service’s own generated content. The insults and potentially libelous stuff get forced from the limelight of those first search pages, 10-20 pages or more down, where they are forgotten.

It’s a solution that only could exist on the Internet. It’s familiar though — giving a good first impression. After that, you’re on your own. But at least it levels the playing field a bit, gets those few damaging comments off the radar and allows the rest of us to form our own opinion of who you really are. (Be on your best behavior.)

Defamation Suit or Reputation Service

Let’s assume for the moment you’re the nicest person on the Web (which probably isn’t that hard to do, actually). You might still be a total unknown, which for a business is only slightly less bad than having a bad reputation. These reputation repair services can push that name of yours up the search results, giving you a good reputation where before you had, let’s face it, none.

The Internet may seem like one big crazy magic box at times, full of rules and regulations that perhaps don’t always make the most sense. It was designed a long time ago, and some of its oldest DNA is still at work. So you just have to take it and run with it. But don’t ignore it; you’ve got an online self in here, and if you own a business or a just trying to find a job you need to make sure you’ve got control of that image at all times. Keep in mind that more people may see it than see your actual real-world self. That’s the crazy thing.

Call us now at (800) 825-9500 for your FREE Top-Dog.org libel, slander repair analysis or visit www.Top-Dog.org to check out our authoritative cyber Top-Dog.org libel repair packages.

Related Blog Posts and Articles

There are so many techniques of building links through various sources available online. A beginner who has started their website or blog newly might not know all of them. But they know extremely well that building hyperlinks is very essential for popularizing their site and to get a good page rank in search engines. The beginners should follow these steps to attain success in their efforts by seeing their site listed in the key word targeted ranking pages of search results and by creating great visitors.

One of the easiest techniques of building links is to submit your web site to directories. There are a number if totally free or commercial directories and you are able to choose the ones which are of high high quality. The directory you chose should not have been penalized for any anti-SEO methods. Google Local serves you greatest for localized companies and services. Try to submit your web directories under the keyword of your niche.

After your web site is launched, email your friends about it in an fascinating manner. You might add some fascinating widgets in it and mail your friends about it to make them take an initial interest to look into your site. If they find it useful and fascinating, they will surely forward the mail to their contacts. You may even place such a request in your mail. In this way, you might get some inbound links to your website, which comes initially from neighborhood websites.

It’s very important to select best key phrases for your site. Make your key phrases as particular as feasible. Believe from the point o f view of your visitors. You will find so many totally free tools available online to choose correct keywords. Within the beginning, just select five or six keywords, which might be increased over time. Write unique posts on Social Book Marking sites which are a good source of quality links.

Article submissions in article submission directories are another technique of getting inbound hyperlinks. Submit articles on a regular pace and try to gain momentum in time. Great high quality article increases your reputation as a well-informed individual in the industry. Don’t ever plagiarize other people’s works. Try to be unique and informative. You might also subscribe to newsletters and blog updaters to obtain hyperlinks.

Initially, when your site has no worth, you can’t believe about hyperlink exchange as nobody will probably be willing do it with you. So, you’ve to generate some visitors and create some value for your site and gain reputation among the visitors, should you want to go a step further in link exchange programs. A good planning will help you to get a good visitors and page rank for your website.

Learn to effectively properly use a link building service here. You will be sure to attain great fiscal success by utilizing this seo service.

Related Blog Posts and Articles

There are many ways to get inspired these days. For designers, looking through design pieces around the internet help them grow their ideas for current or future projects. Though sometimes when you’re down, it doesn’t matter if you are designers or not some quotes or phrase can inspire you to move forward and think creatively.

In this article, we have selected 75+ various design quotes. Some you will recognize coming from the great artist like Pablo Picasso. Others are inspiring quotes created by designers across the world based on their mindset.

Picasso Type – Quote by Picasso

Design’s fundamental role is problem solver.

- Fast Company, 2005

Design is in everything we make, but it’s also between those things. It’s a mix of craft, science, storytelling, propaganda, and philosophy.

- Erik Adigard

Design is not just what it looks like and feels like. Design is how it works.

- Steve Jobs, 2003

Pablo Picasso

If you think it’s expensive to hire a professional to do the job, wait until you hire an amateur.

- Red Adair

Invention is 10% inspiration and 90% perspiration.

- Thomas Edison

…designers can make life more bearable by producing stuff that touches its audience rather than fucks them in the head.

- Jon Wozencraft

Dead Serious

Good design is good business.

- Thomas J. Watson Jr.

The only important thing about design is how it relates to people.

- Victor Papanek

A design isn’t finished until somebody is using it.

- Brenda Laurel

Creativity

You are what you are seen to be.

- Erik Spiekermann

To say that something is designed means it has intentions that go beyond its function. Otherwise it’s just planning.

- Ayse Birsel

A designer knows he has achieved perfection not when there is nothing left to add, but when there is nothing left to take away.

- Antoine de Saint Exupéry

Sweet In The Sour

Truly elegant design incorporates top-notch functionality into a simple, uncluttered form.

- David Lewis

Create your own visual style… let it be unique for yourself and yet identifiable for others.

- Orson Welles

I am always doing that which I cannot do, in order that I may learn how to do it.

- Pablo Picasso

Excellence – Aristotle

Design is as much a matter of finding problems as it is solving them.

- Bryan Lawson

Be a first rate version of yourself, not a second rate version of someone else.

- Judy Garland

The large print giveth and the small print taketh away.

- Tom Waits

Person You Are

Good art inspires; Good design motivates.

- Otl Aicher

Color is a creative element, not a trimming.

- Piet Zwart

Sometimes you can draw more inspiration from the people who don’t believe in you, then from the ones who do.

- William Childs

You Learn Something New Everyday

Education is not the answer to the question. Education is the means to the answer to all questions.

- William Allin

Design is where science and art break even.

- Robin Mathew

I’m convinced that without bad design, the world would be a far less stimulating place; we would have nothing to marvel over and nothing to be nostalgic about.

- Carrie Philips

Typography

The definition of an expert is someone who knows what not to do.

- Charles Willson

Practice safe design: Use a concept.

- Petrula Vrontikis

Just because something looks good doesn’t mean it’s useful. And just because something is useful does not make it beautiful.

- Joshua Brewer

Never Tell Me

Good design goes to heaven; bad design goes everywhere.

- Mieke Gerritzen

When you eliminate quality as a requirement, the entire design process becomes a whole lot easier.

- Jared M. Spool

If you’re more susceptible to interruption, you do more out of the box thinking.

- Don Norman

Life Is…

By far the dominant reason for not releasing sooner was a reluctance to trade the dream of success for the reality of feedback.

- Kent Beck

You can have an art experience in front of a Rembrandt… or in front of a piece of graphic design.

- Stefan Sagmeister

I don’t think that design needs theory, but I think designers need theory.

- Johanna Drucker

The Only Thing Worse

Design is the contrast of the core of limitations therefore there are no boundaries. It is simply an interpretation of creativity.

- Jenaiha Woods

Don’t worry about people stealing your design work. Worry about the day they stop.

- Jeffrey Zeldman

Simplicity does not mean want or poverty. It does not mean the absence of any decor, or absolute nudity. It only means that the decor should belong intimately to the design proper, and that anything foreign to it should be taken away.

- Paul Jacques Grillo

Fight With Tools

I know the price of success: dedication, hard work & an unremitting devotion to the things you want to see happen.

- Frank Llyod Wright

Design is creativity with strategy.

- Rob Curedale

There ain’t no rules around here. We’re trying to accomplish something.

- Thomas Edison

BeAmazing

Design is an opportunity to continue telling the story, not just to sum everything up.

- Tate Linden

Typography has one plain duty before it and that is to convey information in writing. No argument or consideration can absolve typography from this duty.

- Emil Ruder

Wisdom is to knowing what to do next, skill is knowing how to do it, and virtue is doing it.

- David Starr

Compassion Will Cure…

Designers have a dual duty; contractually to their clients and morally to the later users and recipients of their work.

- Hans Hger

Imitation may be the “sincerest form of plagiarism,” but it is also the mark of an inferior person.

- David Ogilvy

Art does not reproduce what we see; rather, it makes us see.

- Paul Klee

Rising Sun

Some designers create things to show you what they did. I design things to tell you what I solved.

-  Brian Yerkes

The quality of any creative endeavor tends to approach the level of taste of whoever is in charge.

- John Gruber

Simplicity is the ultimate sophistication.

- Leonardo da Vinci

Quotation 6

The secret of joy in work is contained in one word: excellence. To know how to do something well is to enjoy it.

- Pearl S. Buck

Designers think everything done by someone else is awful, and that they could do it better themselves, which explains why I designed my own living room carpet, I suppose.

- Chris Bangle

The world always seems brighter when you’ve just made something that wasn’t there before.

- Neil Gaiman

Mr.Mandela Said…

Designing a product is designing a relationship.

- Steve Rogers

The real issue is not talent as an independent element, but talent in relationship to will, desire, and persistence. Talent without these things vanishes and even modest talent with those characteristics grows.

- Milton Glaser

Every act of creation is first an act of destruction.

- Pablo Picasso

Reminders

I never design a building before I’ve seen the site and met the people who will be using it.

- Frank Lloyd Wright

I don’t design clothes, I design dreams.

- Ralph Lauren

Design is a plan for arranging elements in such a way as best to accomplish a particular purpose.

- Charles Eames

Worth Having

We hope you can be inspired and motivated by the quotes in this post. Join and tell us which is your favorite one or if you have your own quotes, feel free to write it down on the comments. In the meantime here’s mine.

You can’t reach the top before you start climbing from the bottom

- Ari Suardiyanti

Unusual and Desirable Bookshelves DesignsDesign is everywhere, all the buildings, cars, planes, clothes and even bookshelves are designed by the designers. Such different visual design is  good inspiration source for web and graphic designers because it’s totally different creative  field somehow related of course.

This collection will help you to feed your imagination with fresh and creative ideas from furniture design range. Some of the listed examples are very creative and you’ll be surprised that bookshelf could look so impressive and be functional in the same time.

1. T.SHELF

T.Shelf

2.  “Krea” bookcase

"Krea" bookcase

3.  Saba Italia

Saba Italia

4. Twin Shelves

Twin Shelves

5. The Swollen Wall

The Swollen Wall

6. WisdomTree

WisdomTree

7. Cardboard Bookshelf

Cardboard Bookshelf

8. Digitally Fabricated Bookshelf

Digitally Fabricated Bookshelf

9. Toboga Bookcase

Toboga Bookcase

10. Domino Expo

Domino Expo

11. The Laica Bookshelf

The Laica Bookshelf

12. Bibliotheque Tree

Bibliotheque Tree

13. MYDNA Twist Bookcase

MYDNA Twist Bookcase

14. Books on the wall

Books on the wall

15. Curly bookshelf

Curly bookshelf

16. Circle

Circle

17. Elfa desk

Elfa desk

18. “M40″ wardrobe and bookcase

"M40" wardrobe and bookcase

19. Yellow

Yellow

20. Bookshelf

Bookshelf

21. Ideas for the office

Ideas for the office

22. TOTO

TOTO

23. MDAY bookcase

MDAY bookcase

24. “Krea” bookcase

"Krea" bookcase

25. Sfuggenti scaffali

Sfuggenti scaffali

26. Libraryland

Libraryland

27. Celebrity Equinox: Library

Celebrity Equinox: Library

28. A bookshelf designed by Ron Arad

A bookshelf designed by Ron Arad

29. Wall of books

Wall of books

30. OBA

OBA

31. Max

Max

32. Circle

Circle

33. Sinapsi

Sinapsi

34. Cebunext

Cebunext

35. Bookcase

Bookcase

Internet marketing and the idea of making a vast amounts of income online is extremely appealing to many people and all sorts all over the world are looking to give up their day jobs and turn to the Internet to find their success and riches. Certainly, the Internet is such a powerful resource and it can provide anyone with the tools to make a vast amount of money.

So if this is the case, why exactly are so many people failing to actually achieve anything online? Why are they are so many people failing to do anything while others are able to achieve great things? Are the successful people simply not telling everyone else what they are up to, or are most people simply failing to do everything in the right way?

Well, certainly it is true that the vast majority of people fail at Internet marketing because they simply do not conduct themselves in the proper way. One of the first stakes that they will make when they set themselves up will be to fail to get the necessary training that they will need in order to make a success of themselves.

In addition to this they will often fall for scams that will promise great returns on very little work and marginal investment. Something that promises to make you $20,000 in a month is simply not going to deliver, and most people who are so motivated by money will let their emotions take over their sense and will often fall for the scams. As result, they will often be put off the idea of Internet marketing forever and will believe it is a process that doesn’t work.

However, this is one of the key mistakes to make, and one of the reasons why people fail to gain success on the Internet is because they do not buy into the right system. In order to gain success on the Internet you need to make sure that you follow the right system that has been replicated by those who are already successful themselves. Make sure that you conduct your own research into those who have gained success and follow what they have done, it really is as simple as that.

Another common mistake that newcomers will make will be that they will overload themselves with information that they do not need. Information overload can simply cause confusion and will lead to people not actually being very effective at anything. Instead, make sure that you keep everything as simple as possible and focus on one way of making money at first.

In addition to all of this, it is absolutely essential for anyone who is looking to make money through Internet marketing to have a high level of hunger and determination to gain success. At the end of the day, it is not likely that you are going to make each money after only a few weeks, and therefore you need to commit to the long-term goals that you have set out in order to make a great success of yourself.

If you are able to avoid some of these pitfalls then you are far more likely to gain success in Internet marketing and in your life in general.

An Internet marketing consultant can help to improve your advertising campaign outcome. Using an Internet marketing expert will get you started in a business or enhance your current practices and techniques.

Related Blog Posts and Articles

Webmaster should be aware of the three pillars of internet marketing and SEO practices. These three foundations are placing good keywords, quality content, and links from other places to your websites. Optimizing with keywords and quality content are generally not difficult to do for many webmasters. The hardest part is usually building links to get higher search engine rating in SEO practices. In this article, you can read some tips to build links to your sites and pages.

Do not just post your links everywhere on the net without following the websites rules. You should also choose which websites to submit your links to. Focus on submitting your links from high ranking websites instead. Spamming the net by posting your links everywhere might also make the search engine drops your website ranking as penalty, which is counterproductive.

First of all, start by interlinking pages within your website. The links will help in link building strategy and also help to get readers attracted to other pages within the site. If you have more than one website, you should also interlink them together.

Another thing you can do is to submit your website links to directories. There are many business directories where you can submit your links for free. Focus on legitimate business directories such as local or regional business directories instead of directories filled with huge blinking ads. Craiglist is another place to submit and promote your business site for free. Submitting your link to these sites also enables your business to be found when someone is looking for a product or service you provide.

Open an account and submit to popular social networking sites, such as Facebook, Twitter, or Digg. Aside from link building, having your business pages in these social network sites enables you to communicate with your customers or potential customers about issues related to your business. Your fans or followers will also able to get up to date news about your website update. You can also ask them to spread around your news with “share” or “retweet” functions. If your website goes viral may bring thousands or millions of visitors to your website.

Of course, you should provide content that is newsworthy and high quality to become viral so that people feel the need to share it across the web. Having engaging, easy to read, and fresh content is the key to have a viral website. This is why updating your website regularly is important. Add social networking buttons on your site so that readers can easily share your page they read when they think it is interesting with just a click away.

Another way to place your link in high ranking websites or blogs is by placing ads. Aside from link building purpose, you can also draw potential buyers to your websites with your ads. Other than ads, you can also be a s sponsor to some events, projects, websites, or charities. Helping out charities will also help giving your products and services good branding.

Creating links in internet marketing and SEO practices takes a lot time and effort. You need to have a lot of persistence and patience to do link building successfully. However, when you feel you are not up to it, you can find many help from the SEO experts.

Find complete details and information on how to expand your business through the Internet marketing Peterborough offers today! When you work with the Internet marketing expert UK provides, you will learn the benefits of having experience and knowledge help you succeed!

Related Blog Posts and Articles

Taking out the little time just to search what is available on internet can lead an individual to different choices of online money making.Knowing about the Internet business venues by others or getting the opportunities to work on their own are few of the choices for individuals.Setting up their own full time or part time Internet business are another opportunity available for individuals.

The Internet business make money online venues are diverse in the different industries that are available.There is certainly no shortage of work to be found.Each and every individuals who are in hunt of Internet businesses for making money online can find one, suiting their knowledge and skills.

The only important thing is to decide on how much time you will manage to give to such opportunities and what they will be expecting from you. 1) Selling

There are many opportunities available for selling products online for those who enjoy selling.It is a matter of choosing a product that one has knowledge about and then find where these products will be available for purchase.For your Internet Business to Make Money Online, the opportunities will often include private label type selling|.

2) Affiliate Programs Beside this there is another approach of making money online called ‘Affiliate programs or Associate Programs.These are great because you are basically the sales representative for someone’s else product.Doing the mass advertising because of stocks is something you are free from. However you do have to do the marketing for your niche in order for you to have a good Internet Business make money online service or product

Then on the other hand you may have your own product or service that you can offer as a way to make a Internet Business make money online for you.Perhaps you are a crafts person and you have your wares to sell.This might lead you to a career where you can make use of your knowledge and offer services like teaching the individuals in whatever manner you are specialized in.For this process to be successful you will need a web page as well as marketing skills to drive people to your product or service.You can hire some experts for this or even can do on your own.

It really is going to be a matter of deciding what it is you want to do.You will find that it doesn’t take a great deal of money to set up your Internet business but it will take some time and thought.Ideally the best way to start is to research online what businesses are doing well, and see if any of them fit your needs.

Whatever method you choose, training and guidance is the primary source to success.

Author is an expert Internet marketer from boston. Want to know how to Make Money Online then contact us. Make Money. We can teach you to make money being a Seo professional and earning some good money with ease.

Related Blog Posts and Articles

Search engine optimization, or SEO, involves making a Web site conducive to high search engine rankings. When the site ranks higher, more customers will click on the site link, which should result in proportionately more sales. It is imperative to incorporate SEO into an online marketing campaign, for several reasons.

Two of the main, and most important, reasons to use SEO are to get an increased volume and higher quality of sales. A properly optimized Web site will immediately see a growth in Web traffic. As the site provides additional relevant information in a clear and concise way, the traffic will continue to increase. If the business relies on local customers, the site owner can also leverage local search strategies and tools in order to increase sales.

SEO provides beneficial results from not only Google, but also MSN, Yahoo, and other crawler-based search engines. Once the site is optimized for organic searches, it will be picked up by the three major engines. The quality of leads found through Web searches is quite high. Visitors are typing in keywords relevant to what the business does so they are already interested. There is no objection to overcome, like in cold-calling.

When a business uses SEO, it takes cost-effective steps toward developing brand recognition, no matter how small the entity. Brand association occurs for companies that are found at the top of a niche-related results list. Customers become aware of the company and recall its name when certain keywords are remembered. A concise and understandable page description and a landing page that is professional in appearance help turn those visits into sales.

The business gains enhanced legitimacy and credibility when it is located atop the search engine results lists. These lists are looked upon as referrals from trusted sources because visitors respect the authority of the engines. Optimizing also allows journalists and reporters to find the site for purposes of interviews. The site allows the business owner to be looked upon as an expert in his or her niche, someone whose commentary is desired.

No matter what the size of the business, benefits can be gained from search engine optimization. Without incorporating SEO into the online marketing campaign, a business will fade into obscurity and lose profits to competitors. SEO is crucial to the business having a shot at long-term success.

Click here for more information on <a href="http://www.digital-synergy.com/search-engine-marketing“>Web Design and <a href="http://www.digital-synergy.com/search-engine-marketing/seo/on-page-optimization”>Search Engine Optimization

Related Blog Posts and Articles


Back in May, Nettuts+ ran a great article entitled ”7 Simple and Useful Command-Line Tips”; this was a great article for getting started with using the command line. But there’s a lot more you can learn about using a shell, and I’ll take you to the next level in this tutorial!


Getting Started

If you’re running Mac OS X, or your favourite flavour Linux, you’re all set. Just fire up the terminal, and keep going. If you’re on Windows, well, the default command set isn’t quite what a bash shell is. If you want some power, check out Microsoft PowerShell; however, the commands below won’t necessarily work there. You can get a bash shell on Windows, though:

  • Install Cygwim, a Linux-like environment for Windows.
  • Install msysgit; depending on the options you choose when installing, you’ll get a Git Bash that should work will all these commands.
  • Try Windows’ subsystem for Unix-based applications. Although I haven’t tried it myself, I understand you can get a Unix shell with it.

All right, let’s hop in!


1. Touch

touch

As a developer, one of your most common tasks is creating files. If you’re working from the command line, most of the time you’ll just pass the name of the file you want to create to your editor:

$ mate index.html
$ mvim default.css

However, occasionally you’ll just want to create one or more files, without editing it. In this case, you’ll use the touch command:

$ touch index.html
$ touch one.txt two.txt three.txt

It’s that easy. Actually, the touch command is for updating the access / modified date of a file; it’s just a nice side-effect that if the file doesn’t exist, it will create it.


2. Cat and Less

cat and less

Well, since it’s all about files, there’s a good change you’ll want to see the contents of a file from the terminal sooner or later. There’s a few commands that will do this for you. First is cat; cat is short for “concatenate”, and this command does more than output file contents; however, that’s what we’ll look at here. It’s as simple as passing the command a file:

$ cat shoppingList.txt

However, if the file is large, the contents will all scroll past you and you’ll be left at the bottom. Granted, you can scroll back up, but that’s lame. How about using less?

$ less shoppingList.txt

Less is a much better way to inspect large files on the command line. You’ll get a screen-full of text at a time, but no more. You can move a line up or a line down with the k and j respectively, and move a window up or down with b and f. You can search for a pattern by typing /pattern. When you’re done, hit q to exit the less viewer.


3. Curl

curl

Since you probably work with your fair share of frameworks libraries, you’ll often find yourself downloading these files as you work. Oh, I know: you can just download it from the web, navigate to the folder, uncompress it, and copy the pieces to your project, but doesn’t that sound like so much work? It’s much simpler to use the command line. To download files, you can use curl; proceed as follows:

$ curl -O http://www.domain.com/path/to/download.tar.gz

The -O flag tells curl to write the downloaded content to a file with the same name as the remote file. If you don’t supply this parameter, curl will probably just display the file in the commmand line (assuming it’s text).

Curl is a pretty extensive tool, so check out the man page (see below) if you think you’ll be using it a lot. Here’s a neat tip that uses the shell’s bracket expansion:

$ curl -0 http://www.domain.com/{one,two,three}.txt

Yeah, it’s that easy to download multiple files from one place at once. (Note that this isn’t curl functionality; it’s part of the shell, so you can use this notation in other commands; check this link out for more)


4. Tar and Gzip

tar and gzip

So, now you’re rocking command line downloads; however, there’s a really good chance that most of the things you download will be archived and gzipped, having an extension of .tar.gz (or, alternately, .tgz). So, what do you do with that? Let’s take a step back for a second and understand what exactly “archived and gzipped” means. You’re probably familiar with archives. You’ve seen .zip files; they’re one incarnation of archives. Basically, an archive is just a single file that wraps more than one file together. Often archives compress the files, so that the final file is smaller than the original ones together. However, you can still get a bit smaller by compressing the archive … and that’s where gzipping comes in. Gzipping is a form of compression.

So, back to that download. It’s been tarred (archived) and gzipped. You could unzip it and then un-tar it, but we’re all about fewer keystrokes here, right? Here’s what you’d do:

$ tar xvzf download.tar.gz

Wait, what? Here’s the breakdown: tar is the command we’re running; xvzf are the flags we’re using (usually, you’d have a dash in front, but that’s optional here). The flags are as follows:

  • x let’s tar know we’re extracting, not archiving.
  • v let’s tar know we want it to be verbose (give us some output about the action it’s performing).
  • z let’s tar know that the file we’re working with has been gzipped (so it unzips the file).
  • f let’s tar know we’re going to pass it the name of the archive file.

If you want to create one of these gzipped archives, it’s as simple as replacing the x flag with a c (to create an archive). The v and z flags are options: do you want output? how about gzipping? Of course, leave f; you’ll have to give the file name for the new archive (otherwise, it will all be output to the command line). After that, you’ll pass the command all the files you want to put in the archive:

$ tar cvzf archive.tar.gz index.html css js auth.php
$ tar cvzf archive.tar.gx *.txt

Just for completeness, I’ll mention that you can gzip archives (or other files) individually; when you do so, gzip replaces the original file with the gzipped version. To un-gzip, add the -d flag (think decompress.

$ gzip something.txt
$ gzip -d something.txt.gz

5. Chmod

chmod

Another thing you’ll do often as a web developer is change file permissions. There are three permissions you can set, and there are three classes that can receive those permissions. The permissions are read, write, and execute; the classes are user, group, and others. The user usually the owner of the file, the user that created the file. It’s possible to have groups of users, and the group class determines the permissions for the users in the group that can access the file. Predictably, the others class includes everyone else. Only the user (owner of the file) and the super user can change file permissions. Oh, and everything you’ve just read goes for directories as well.

So, how can we set these permissions? The command here chmod (change mode). There are two ways to do it. First, you can do it with octal notation; this is a bit cryptic, but once you figure it out, it’s faster. Basically, execute gets 1 ‘point’, write gets 2, and read gets 4. You can add these up to give multiple permissions: read+write = 6, read+write+execute = 7, etc. So for each class, you’ll get this number, and line them up to get a three digit number for User, Group, and Others. For example, 764 will give user all permissions, give group read and write ability, and give others permission to read. For a better explanation, check out the Wikipedia article.

If you have a hard time remembering the octal notation, you might find symbolic notation easier (although it takes a few more keystrokes). In this case, you’ll use the initial ‘u’, ‘g’, and ‘o’ for user, group, and others respectively (and ‘a’ for all classes). Then, you’ll use ‘r’, ‘w’, and ‘x’ for read, write, and execute. Finally, you’ll use the operators ’+’, ‘-‘, and ’=’ to add, subtract, and absolutely set permissions. Here’s how you’ll use these symbols: class, operator, permissions. For example, u+rwx adds all permissions to the user class; go-x removes executable permission from group and others; a=rw sets all classes to read and write only.

To use all this theory on the command line, you’ll start with the command (chmod), followed by the permissions, followed by the files or directories:

$ chmod 760 someScript.sh
$ chmod u=rwx g+r o-x dataFolder

6. Diff and Patch

diff and patch

If you’ve used version control like Git or Subversion, you know how helpful such a system is when you want to share a project with other developers, or just keep track of versions. But what if you want to send a friend some updates to a single file? Or what if another developer has emailed you the new version of a file that you’ve edited since you received the last copy? Sometimes, full-blown version control is too much, but you still need something small. Well, the command line has you covered. You’ll want to use the diff command. Before you make changes to a file, copy the file so you have the original. After you update, run diff; if you don’t send the output to a file, it will just be output to the command line, so include a > with the name for your patch file:

$ cp originalFile newFile
$ vim newFile #edit newFile
$ diff originalFile newFile
1c1
< This is a sentence.
---
> This is a short sentence.
$ diff originalFile newFile > changes.patch

As you can see, the diff is just a simple text file that uses a syntax the diff and patch command will understand. Patch? Well, that’s the command that goes hand in hand with diff. If you’ve received a patch file, you’ll update the original as follows:

patch originalFile2 changes.patch

And now you’re all updated.


7. Sudo

sudo

Sudo isn’t really a command like the others, but it’s one you’ll find a need for as you venture deeper into the command line world. Here’s the scenario: there are some things that regular users just shouldn’t be able to do on the command line; it’s not hard to do irrevocable damage. The only user who has the right to do anything he or she wants is the super user, or root user. However, it’s not really safe to be logged in as the super user, because of all that power. Instead, you can use the sudo (super user do) command to give you root permissions for a single command. You’ll be asked for you user account password, and when you’re provided that, the system will execute the command.

For example, installing a ruby gem requires super user permissions:

$ gem install heroku
ERROR:  While executing gem ... (Errno::EACCES)
    Permission denied - /Users/andrew/.gem/ruby/1.9.1/cache/heroku-1.9.13.gem
$ sudo gem install heroku
Password:
Successfully installed heroku-1.9.13

8. Man

man

Most of the commands you’ll use in a bash shell are pretty flexible, and have a lot of hidden talents. If you suspect a command might do what you want, or you just want to see some general instruction on using a command, it’s time to hit the manuals, or man pages, as they’re called. Just type man followed by the command you’re curious about.

$ man ln

You’ll notice that the man pages are opened in less.


9. Shutdown

shutdown

When you’re done for the day, you can even turn your computer off from the command line. The command in the spotlight is shutdown, and you’ll need to use sudo to execute it. You’ll have to give the command a flag or two; the most common ones are -h to halt the system (shut it down), -r to reboot, and -s to put it to sleep. Next, you’ll pass the time it should happen, either as now, +numberOfminutes, or yymmddhhmm. Finally, you can pass a message to be shown to users when the deed is about to be done. If I wanted to put my computer to sleep in half-an-hour, I’d run this:

$ sudo shutdown -s +30

10. History, !!, and !$

history

Since the command line is all about efficiency, it’s supposed to be easy to repeat commands. There are a few ways to do this. First, you can use the history command to get a numbered list of many of your recent commands. Then, to execute one of them, just type an exclamation mark and the history number.

$ history
...
563  chmod 777 one.txt
564  ls -l
565  ls
566  cat one.txt
...
$ !565

Granted, this is a terrible example, because I’m typing more characters to use the history than it would take to re-type the command. But once you’re combining commands to create long strings, this will be faster.

It’s even quicker to access the last command and last argument you used. For the latest command, use !!; the usual use case given for this is adding sudo to the front of a command. For the latest argument, use !$; with this, moving into a new folder is probably the common example. In both these cases, the shell will print out the full command so you can see what you’re really executing.

$ gem install datamapper
ERROR:  While executing gem ... (Errno::EACCES)
    Permission denied - /Users/andrew/.gem/ruby/1.9.1/cache/datamapper-1.0.0.gem
$ sudo !!
sudo gem install datamapper
Password:
Successfully installed datamapper-1.0.0

$ mkdir lib
$ cd !$
cd lib

Conclusion

If you’re as passionate about productivity as I am, the idea of using the command line as much as possible should resonate with you. What I’ve shown you here is just a sampling of the built in commands … then, there are many more than you can install yourself (look at something like the homebrew package manager, for example). But maybe you’re already proficient on the command line; if so, can you share another great command with the rest of us? Hit the comments!

Powered by WordPress | Theme: Motion by 85ideas.