All of the items with an “n” in their execution can either be removed (to operate on the most recent item) or replaced with a number indicating the item in the stack the operation is to effect.
Action
Command
Viewing your command history
.L
Executing a command from the stack
.Xn
Delete an item from the stack
.Dn
Recall an older command to the head of the stack
.Rn
Change a string in a command on the stack
.Cn/oldstring/newstring
Change all occurences of a string in a command on the stack
.Cn/oldstring/newstring/G
Appending something to the end of a command on the stack
.An extra
Files
Creating a new file
CREATE.FILE filename filetype other
Filenames should be uppercase with words divided by periods (.)
File type
Type
Description
1 & 19
directory
2
static
Keys end with numbers.
3
static
Keys end mainly with numbers.
4
static
Keys end with letters.
5
static
Keys end with full range of ASCII characters.
6
static
Keys begin with numbers.
7
static
Keys begin mainly with numbers.
8
static
Keys begin with letters.
9
static
Keys begin with full range of ASCII characters.
10
static
Keys are numbers.
11
static
Keys are mainly numbers.
12
static
Keys are letters.
13
static
Keys are full range of ASCII characters.
14
static
Entire keys are numbers.
15
static
Entire keys are mainly numbers.
16
static
Entire keys are letters.
17
static
Entire keys are full range of ASCII characters.
18
static
Entire keys are of arbitrary form.
30
dynamic
other depends on the filetype being created Creating a new directory file
CREATE.FILE filename 1
CREATE.FILE filename 19
Creating a new static file
CREATE.FILE filename (2-18) modulo separation
modulo is the number of groups the file has.
separation is the number of 512 bytes disk frames are allocated to each group
Maintaining a file
RESIZE filename newtype newmodulo newseparation
Creating a dynamic file
CREATE.FILE filename 30
Copy a file
COPY FROM sourcefile TO destfile ALL OVERWRITING
Editing Records
Action
Command
Invoking the Editor
ED filename recordkey
Display a pageful of the record
P
Qutting a record
Q
Inserting lines
I
Moving between lines
n (move to line n)
+n (move forward n lines)
-n (move backward n lines)
t (move to top)
b (move to bottom)
Changing lines (/G for global)
C/oldstring/newstring/G
Undo
OOPS
Appending to a line
A extra-string
Breaking a line
B word-to-break-on
Concatenating lines
CAT
Deleting lines
D
Duplicating lines
DUP
Locating and finding
L something
F something
Setting editing blocks
< (sets the starting block)
> (sets the ending block)
Copy, move or drop blocks
COPY
MOVE
DROP
Saving your record
SAVE
Editor Macros
Creating a new ED macro
@FILE variable can be used to be the existing file being edited. @ID variable can be used to be the key of the current record being edited. Example usage of @FILE and @ID within a macro
> ED &ED& MACRONAME
----: I
0001= E
0002= SAVE
0003= XEQ BASIC @FILE @ID
0004= XEQ RUN @FILE @ID
0005=
The VOC File
Creating a verb (command word)
> ED VOC verbname
----: I
0001= V
0002= programname
0003= type
0004=
All verbs start with a V. The name of the program to execute is specified by the second line. The type of the program is specified on the third line. Possible options are:
Letter
Language
B
UniVerse Basic
C
C shell script
D
DOS batch file
E
External
I
Internal
P
Primitive
Q
Query command
S
Bourne sheel script
B
Operating system command
Creating a keyword (parameter or modified applied to verbs)
> ED VOC keywordname
----: I
0001= K
0002= value
0003= verbcommand (optional)
Keywords start with a K. Their second parameter is the value that gets substituted for the word. Creating a paragraph (script)
> ED VOC paragraphname
----: I
0001= PA
0002= script ....
0003= script ....
Paragraphs start with PA, then continue to define the script itself. For variables that are unknown at runtime the «…» syntax can be used to prompt the user inline for the value. Creating a sentence (a one line paragraph)
> ED VOC sentencename
----: I
0001= PA
0002= script ....
Creating a file pointer
> ED VOC filename
----: I
0001= F
0002= directoryname
0003= filename
Creating a qpointer
> ED VOC synonymname
----: I
0001= Q
0002= (space)
0003= filename
Creating a remote command
> ED VOC remotecommandname
----: I
0001= R
0002= filename that contains the command record
0003= key of the command record
Dictionaries
A description of common fields for a dictionary record
Field
Description
Conversion
Blank unless a conversion is required. e.g. D DMY[2,A3,4] would store 1 for 01 JAN 1968
Column Header
Title that appears at the head of the column
Format
The number of characters to display and alignment. 10R - 10 characters, right aligned.
10T - 10 characters, text aligned. 10L - 10 characters, left aligned.
Single or Multi
S for single value, M for multi-value
Creating a data field
> ED DICT filename fieldname
----: I
0001= D Description of the field
0002= field number
0003= conversion
0004= header
0005= format
0006= single or multi
Creating an imaginary field
> ED DICT filename fieldname
----: I
0001= I Description of the field
0002= formula
0003= conversion
0004= header
0005= format
0006= single or multi
Creating a phrase field
> ED DICT filename fieldname
----: I
0001= PH Description of the field
0002= fieldnames
0001= WRITEV TYPE.DESC TO FILE.VAR, 'TEST.WRITE', 1
Deleting a record from a file
0001= DELETE FILE.VAR, 'RELLEVEL'
Locking records for update
0000= READU RECORD.VAR FROM FILE.VAR, 'RELLEVEL' LOCKED
0000= MATREADU RECORD.VAR FROM FILE.VAR, 'RELLEVEL' LOCKED
0000= READVU TYPE.DESC FROM FILE.VAR, 'RELLEVEL' LOCKED
Locking records from read
0000= READL RECORD.VAR FROM FILE.VAR, 'RELLEVEL'
0000= MATREADL RECORD.VAR FROM FILE.VAR, 'RELLEVEL'
0000= READVL TYPE.DESC FROM FILE.VAR, 'RELLEVEL'
An example record read
0001= OPEN 'VOC' TO VOC.FILE ELSE STOP "Can't open VOC"
0002= READ VOC.RECORD FROM VOC.FILE, 'RELLEVEL' ELSE VOC.RECORD = ''
0003= PRINT VOC.RECORD
An example record read to an array
0001= DIM VOC.RECORD(10)
0002= OPEN 'VOC' TO VOC.FILE ELSE STOP "Can't open VOC"
0003= MATREAD VOC.RECORD FROM VOC.FILE, 'RELLEVEL' ELSE MAT VOC.RECORD = ''
0004= FOR FIELD.NUMBER = 1 TO 10
0005= PRINT VOC.RECORD(FIELD.NUMBER)
0006= NEXT FIELD.NUMBER
An example record read from a select list
0001= OPEN 'VOC' TO VOC.FILE ELSE STOP "Can't open VOC"
0002= EOF = 0
0003= EXECUTE 'SELECT VOC WITH TYPE = "M"'
0004= LOOP
0005= READNEXT VOC.KEY ELSE EOF = 1
0006= UNTIL EOF
0007= PRINT VOC.KEY
0008= REPEAT
A very brief guide to ripping DVD media at the console with handbrake.
# Rip a disc with the normal preset
HandBrakeCLI -i /dev/dvd -o output.mp4 --preset=Normal --main-feature# Scan a disc for chapter data
HandBrakeCLI -i /dev/dvd -t <chapter> --scan# Rip a specific chapter
HandBrakeCLI -i /dev/dvd -o output.mp4 --preset=Normal -t <chapter>
A cheatsheet of Rails 3 commands once all of the software infrastructure has been setup and is running.
Creating and destroying things
# Create a new application
rails new ApplicationName
# Create a new model
rails generate/g model ModelName
# Create a new controller
rails generate/g controller ControllerName
# Create a new migration
rails generate/g migration MigrationName
# Create a scaffolded controller, model and view
rails generate/g scaffold ModelName ControllerName
# Destroy a new model
rails destroy model ModelName
# Destroy a new controller
rails destroy controller ControllerName
# Destroy a new migration
rails destroy migration MigrationName
Controlling the application
# Start the rails server
rails server/s
# Install a plugin
rails plugin install PluginName
# Start the rails console
rails console/c
# Start the database console
rails dbconsole/db
# Benchmark/Profile the application
rails performance
Manage the database
# Create the database
rake db:create
# Drop the database
rake db:drop
# Migrate the database
rake db:migrate
# Drop and recreate database from schema
rake db:reset
# Rollback the latest migration
rake db:rollback
# Create the schema file
rake db:schema:dump
# Create a sessions migration
rake db:sessions:create
Utility tasks
# Build the RDOC html files
rake doc:app
# List all available tasks
rake –tasks
# Truncate log files
rake log:clear
# Clear session, cache and socket files
rake tmp:clear
# Print out all defined application routes
rake routes
Testing your application
# Run all tests
rake test# Run functional tests
rake test:functionals
# Run integration tests
rake test:integration
# Run unit tests
rake test:units
Working with Gems
# Lock this application's gem set
rake rails:freeze:gems
# List dependent gems
rake gems
# Install all required gems
rake gems:install
# List all installed gems
gem list
# Install a gem
gem install GemName
# Uninstall a gem
gem uninstall GemName
# Start the gem server
gem server