pgcli - Postgres command line interface
A CLI for working with Postgres databases. Ships with auto-completion and syntax highlighting.
Related cards:
davetron5000/methadone - GitHub
Framework to write command-line apps in Ruby. Comes with a nice way of processing parameter options, some utility classes and Cucumber steps for testing your CLI app.
docopt: A promising command line parser for (m)any language
docopt helps you define interface for your command-line app, and automatically generate parser for it.
docopt is based on conventions that are used for decades in help messages and man pages for program interface description. Interface descri...
RSpec: Executing specs by example id (or "nesting index")
There are several ways to run a single spec. I usually copy the spec file path with the line number of the example and pass it to the RSpec binary: bin/rspec spec/models/user_spec.rb:30
(multiple line numbers work as well: :30:36:68
). Another ...
Working on the Linux command line: Use the `tree` command instead of repeated `cd` and `ls`
The tree
command will show you the contents of a directory and all its sub directories as a tree:
>tree
.
├── a
│ ├── file_1.txt
│ └── file_2.txt
└── b
├── c
│ └── even_more.txt
└── more.txt
3 directories, 4 files
If...
PostgreSQL: Expanded display and other command line features
One useful postgres command I stumbled upon recently was \x
. It gives you an expanded display which allows you to actually read the results of your select * from
queries. The link below describes a few more useful techniques and commands.
Linux: How to print PDF files from the command line
Sometimes you may want to print files from the command line, especially when you have lots of them.
You can use lp
for that.
To print a single example.pdf
file on your default printer, simply say:
lp example.pdf
lp
accepts multipl...
Opening Rubymine projects from the command line
To activate the shell command, go to Tools > Create Command-line Launcher
and confirm.
Now you have mine
as bash command. Run this to open a project in RubyMine:
mine path/to/my_project
Booting Rubymine
The mine
script will a...
How to view Image Metadata on the Linux Command Line with ImageMagick
ImageMagick has a command line tool called identify
which can read image metadata:
>identify -verbose DSC00136.JPG
Image: DSC00136.JPG
Format: JPEG (Joint Photographic Experts Group JFIF format)
Class: DirectClass
Geometry: 5472x3648+...
Joining PDFs with Linux command line
There are several ways to merge two (or more) PDF files to a single file using the Linux command line.
If you're looking for graphical tools to edit or annotate a PDF, we have a separate card for that.
PDFtk (recommended)
...