Using SSH and SCP
FreeIn this video you'll see how simple it is to connect to a remote server using SSH (secure shell). We'll also look at how you can quickly and securely copy files from a remote server using the SCP command (secure copy). These are both invaluable tools when working with servers that you don't have physical access to. Note: this video was originally released April 8, 2010 on Lullabot.com.
In this video we'll look at two ways of finding files from the command line. We'll use both locate (and its friend updatedb) and find, and talk about the differences between them.
Note: this video was originally released June 8, 2010 on Lullabot.com.
This video in the command line series will get you started using the very powerful grep command. This is one of the most used commands, especially if you are working with a lot of text (like code, for instance). Grep will let you search through files to find strings and it's great for tracking down where something is coming from. Grep is a very powerful tool with lots of options, but you'll see you can do a lot even with just the basics. We cover the basic command with a file, how to use it through directories, and then we use a few of the most popular options:
-r Recurse
-n Line Number
-l List
-v Reverse
-i Ignore Case
Note: this video was originally released June 22, 2010 on Lullabot.com.
This video introduces you to the Vi (and Vim) editor. Vi is the most common text editor that you will have available to you on *nix systems so it pays to at least learn the basics in case you end up somewhere where that is all you have to use. Vim is also actually a very serviceable editor which many people (mostly hardcore geeks) use as their day to day editor. We'll talk briefly about Vi versus Vim, then open a file, move around, and close the the file. Our next video will dive more into editing files with Vi.
Note: There are a lot of editors out there on various systems, notably emacs, nano, and pico. Vi is considered the lowest common denominator (i.e. it is the most commonly available one), which is why it is the one being covered in the command line basics series. It is also the editor that I use personally, so is the one I am most familiar with. Please limit editor war discussions to other threads on the internet that are meant for them.
Note: this video was originally released July 27, 2010 on Lullabot.com.
Note: In some places the command line prompt is cut-off. The YouTube version of this video doesn't have the cut-off problem. We are working on getting this fixed, but in the meantime, check out the YouTube version instead.
Command Line Basics 9: Introduction to Vi/Vim editor (youtube.com)
In this second Vi/Vim video we move on to doing some basic editing (see the Intro to Vi/Vim video for an overview). We cover inserting text in a few different ways, how to delete text, and then how to revert or save your changes. Note: this video was originally released August 9, 2010 on Lullabot.com.
Note: In some places the command line prompt is cut-off. The YouTube version of this video doesn't have the cut-off problem. We are working on getting this fixed, but in the meantime, check out the YouTube version instead.
Command Line Basics 10: Editing with Vi/Vim editor (youtube.com)
This video picks up where we left off in the Editing with Vi/Vim video. This time we take a look at some shortcuts for replacing text, how to copy/paste, and the cool visual mode feature you get with Vim Note: this video was originally released August 31, 2010 on Lullabot.com.
Note: In some places the command line prompt is cut-off. The YouTube version of this video doesn't have the cut-off problem. We are working on getting this fixed, but in the meantime, check out the YouTube version instead.
Command Line Basics 11: More Editing with Vi/Vim editor (youtube.com)
JavaScript
TopicJavaScript (JS) is an interpreted programming language that is widely used on the web to control web page behavior and interactivity.
Learn Drupal
GuideCommand Line Basics
CourseIntroduction to Git
CourseDrupal Console
TopicDrupal Console provided a command line utility for performing common site administration tasks, code generation scaffolding, and a Read-Evaluate-Print-Loop for interacting with your Drupal site.
It is no longer actively maintained. Use Drush instead.
YAML, which stands for YAML Ain't Markup Language, is a human-readable data serialization format that's been widely adopted in a variety of use cases in Drupal. Anyone wanting to write modules, or themes, for Drupal will need to understand YAML syntax. Even site builders are likely to encounter YAML at least in passing as YAML is the data-serialization format of choice for Drupal's configuration management system. Good thing it's pretty easy to learn even with the most basic of programming backgrounds.
This tutorial will look at the YAML data format and provide examples of how to write and read YAML. Starting with an introduction to the language's syntax and some of the strengths of YAML. Then looking at the difference between scalar data types like strings and integers, and collection data types like lists and associative arrays.
Since YAML in the Drupal world is read into PHP and ultimately becomes a PHP data structure that we can use in our own code we'll also look at how the YAML we write in a .yml file is represented in PHP data types. To do this we'll use the YAML Sandbox module that provides a handy textarea into which we can type YAML and have it parsed into PHP data structures.
Learning objectives
- Explain what YAML is and its strengths as a data serialization format
- Create scalar key/value pairs in YAML
- Create lists, and associative arrays using YAML collections
- Understand how the YAML you write is represented in PHP
Tips
- In Drupal, use the .yml extension and not .yaml
- Ensure your code editing application is configured to use spaces (preferably 2 spaces, as per Drupal coding standards), not the tab character when the TAB key is pressed. If you have tab characters in a YAML file within a Drupal environment, a fatal PHP error will be thrown and you'll see a White Screen of Death (WSOD).
- Copy and paste from an existing YAML file to ensure the formatting is correct, and edit from there.
Additional resources
- http://www.yaml.org
- YAML Sandbox module
- Find other tutorials and external resources related to YAML on our YAML topic page (Drupalize.Me)
Object-Oriented PHP
TopicObject-oriented PHP utilizes classes and objects to organize code into reusable chunks. This approach helps us organize complex applications, such as Drupal, into modular code called classes that can be reused across the entire system.
Symfony
TopicSymfony is a set of reusable PHP components, and a framework for building PHP applications. Drupal makes use of various Symfony components.