summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatalie Downe <nat@natbat.net>2009-05-23 15:29:03 +0100
committerNatalie Downe <nat@natbat.net>2009-05-23 15:29:03 +0100
commit164c1b896cb01eac1148e51cb18c882c860e8e15 (patch)
tree217ec31a7c7a7280477a581d5808d736a2392962
parent30d019983da3e99bfeee59f7f0bc534f6dc9e1d8 (diff)
minor modifications to styles, adding in a terminal / subversion cheat sheet and the pdf in the artifacts directory
-rw-r--r--artifacts/pocketwiki_terminal-commands.pdfbin0 -> 46654 bytes
-rw-r--r--css/main.css33
-rw-r--r--css/print.css1
-rw-r--r--pocketHelp.html202
4 files changed, 235 insertions, 1 deletions
diff --git a/artifacts/pocketwiki_terminal-commands.pdf b/artifacts/pocketwiki_terminal-commands.pdf
new file mode 100644
index 0000000..f87f499
--- /dev/null
+++ b/artifacts/pocketwiki_terminal-commands.pdf
Binary files differ
diff --git a/css/main.css b/css/main.css
index d495545..425e70a 100644
--- a/css/main.css
+++ b/css/main.css
@@ -111,6 +111,13 @@ h1 {
margin-top:0.1667em /* 6px */;
margin-bottom:0.5833em /* 21px */;
}
+h1 span {
+ font-size: 0.5em;
+ line-height: 1;
+ color: #CCC;
+ display: block;
+ margin-bottom: 0.3em;
+}
h2, h3 {
font-size:1.143em /* 16px */;
margin-top:0;
@@ -233,6 +240,11 @@ pre {
padding: 0.5em 0;
}
+hr {
+ border: none;
+ background-color: black;
+ height: 1px;
+}
/* @end */
/* @end */
@@ -393,12 +405,21 @@ button.link {
/* @end */
+.amp {
+ font-family: "Bell MT", "Adobe Caslon Pro", "Goudy Old Style";
+ font-style: italic;
+ font-size: 1.3em;
+ line-height: 0.7;
+ margin: 0 0.2em 0 0.1em;
+}
+
/* @end */
/* @group Page structure */
#book {
margin: 10px;
+ overflow: hidden;
}
.page {
width: 241px;
@@ -407,10 +428,17 @@ button.link {
outline: 1px solid #C7C7C7;
float: left;
margin: 10px;
+ position: relative;
}
.inner {
margin: 15px;
}
+.footer {
+ position: absolute;
+ bottom: 15px;
+ left: 15px;
+ width: 211px;
+}
/* @end */
@@ -464,8 +492,11 @@ h3.micro,
h4.micro,
h5.micro,
h6.micro,
-p.micro {
+p.micro,
+span.micro {
font-size: 0.7em;
+ line-height: 1.5em;
+ display: block;
}
/* @end */
diff --git a/css/print.css b/css/print.css
index 216d62b..858331e 100644
--- a/css/print.css
+++ b/css/print.css
@@ -1,5 +1,6 @@
#book {
position: relative;
+ overflow: visible;
height: 969px;
width: 743px;
margin: 0;
diff --git a/pocketHelp.html b/pocketHelp.html
new file mode 100644
index 0000000..9cb84ed
--- /dev/null
+++ b/pocketHelp.html
@@ -0,0 +1,202 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+
+<html lang="en">
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <title>pocket wiki - Terminal commands</title>
+ <meta name="author" content="Natalie Downe">
+ <!-- Date: 2009-05-23 -->
+
+ <link rel="stylesheet" href="css/main.css" type="text/css">
+ <link rel="stylesheet" href="css/print.css" type="text/css" media="print">
+
+ <script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
+ <script type="text/javascript" src="js/dynamic.js"></script>
+
+</head>
+<body>
+
+ <div id="book">
+ <div id="page1" class="page">
+ <div class="inner">
+ <h1><span>pocket wiki</span>Terminal commands</h1>
+
+ <div class="footer">
+ <p>This book belongs to:</p><br><br>
+ <hr>
+ </div>
+ </div>
+ </div>
+
+ <div id="page2" class="page">
+ <div class="inner">
+ <h2>navigate the file tree</h2>
+
+ <p><span class="micro">changing directory to <code>dirname</code></span>
+ <code>cd dirname</code>
+ </p>
+ <p><span class="micro">move up a directory in the tree</span>
+ <code>cd ..</code>
+ <span class="micro">dont forget you can drag a folder in from the finder to get a path to that directory</span>
+ </p>
+ <p><span class="micro">go back to the last directory I was in</span>
+ <code>cd -</code>
+ </p>
+ <p><span class="micro">where am I? (present working directory)</span>
+ <code>pwd</code>
+ </p>
+ <p><span class="micro">list what's in this directory</span>
+ <code>ls</code>
+ </p>
+ <p><span class="micro">now give me more information in the listing</span>
+ <code>ls -lah</code>
+ </p>
+ <p><span class="micro">ssh to server</span>
+ <code>ssh user@domain.com</code>
+ </p>
+ </div>
+ </div>
+
+ <div id="page3" class="page">
+ <div class="inner">
+ <h2>find <abbr class="amp" title="and">&amp;</abbr> open</h2>
+ <p><span class="micro">list all files recursively in subdomains</span>
+ <code>find .</code>
+ </p>
+ <p><span class="micro">find all files with '<code>.css</code>' in the name</span>
+ <code>find . | grep .css</code>
+ </p>
+ <p><span class="micro">find the string '<code>prose</code>' in the contents of all the files in this directory</span>
+ <code>grep -r "prose" .</code>
+ </p>
+ <p><span class="micro">open a file as if you had double clicked it in the finder (mac only)</span>
+ <code>open filename</code>
+ </p>
+ <p><span class="micro">open the current directory in the finder</span>
+ <code>open .</code>
+ </p>
+ <p><span class="micro">make a directory called <code>dirname</code></span>
+ <code>mkdir dirname</code>
+ </p>
+ <p><span class="micro">create a file called <code>filename</code> if it doesnt exist or update last modified date if it does</span>
+ <code>touch filename</code>
+ </p>
+ </div>
+ </div>
+
+ <div id="page4" class="page">
+ <div class="inner">
+ <h2>move, remove <abbr class="amp" title="and">&amp;</abbr> copy</h2>
+ <p><span class="micro">move or rename a file or directory</span>
+ <code>mv oldname newname</code>
+ </p>
+ <p><span class="micro">remove a file</span>
+ <code>rm filename</code>
+ </p>
+ <p><span class="micro">remove a directory and all its contents. <strong>BE VERY CAREFUL!</strong> you could easily delete everything!</span>
+ <code>rm -rf dirname</code>
+ </p>
+ <p><span class="micro">copy a file</span>
+ <code>cp oldfilename newfilename</code>
+ </p>
+ <p><span class="micro">copy a directory and everything in it</span>
+ <code>cp -r olddirname newdirname</code>
+ </p>
+ <p><span class="micro">securely copy a file to / on a remote server</span>
+ <code>scp file user@domain.com:</code>
+ <span class="micro">you can also copy a directory using <code>scp -r</code></span>
+ </p>
+
+ </div>
+ </div>
+
+ <div id="page5" class="page">
+ <div class="inner">
+ <h2>subversion</h2>
+ <p><span class="micro">check out a repository to the current directory</span>
+ <code>svn co http://domain.com/svn/ .</code>
+ </p>
+ <p><span class="micro">update local directory from repository</span>
+ <code>svn up</code>
+ </p>
+
+ <p><span class="micro">are there new or modified files?</span>
+ <code>svn status</code>
+ </p>
+ <p><span class="micro">add new files to the repository</span>
+ <code>svn add filename</code>
+ </p>
+ <p><span class="micro">remove a file from subversion</span>
+ <code>svn remove filename</code>
+ </p>
+ <p><span class="micro">mark a previously conflicted file as resolved</span>
+ <code>svn resolved filename</code>
+ </p>
+ <p><span class="micro">who changed what line number of this file</span>
+ <code>svn blame filename</code>
+ </p>
+ <p><span class="micro">commit all changes in this directory</span>
+ <code>svn commit -m "commit msg"</code>
+ </p>
+ </div>
+ </div>
+
+ <div id="page6" class="page">
+ <div class="inner">
+ <h2>subversion <abbr class="amp" title="and">&amp;</abbr> download</h2>
+ <p><span class="micro">is this directory checked out from svn? and where?</span>
+ <code>svn info</code>
+ </p>
+ <p><span class="micro">show everything that has changed</span>
+ <code>svn diff</code>
+ </p>
+ <p><span class="micro">show what has changed in one file</span>
+ <code>svn diff filename</code>
+ </p>
+
+ <p><span class="micro">open text editor in order to specify which files to ignore from svn</span>
+ <code>svn propedit svn:ignore .</code>
+ </p>
+ <p><span class="micro">download a file to the current directory</span>
+ <code>wget URL</code>
+ </p>
+ <p><span class="micro">show the contents of a file in the terminal</span>
+ <code>curl URL</code>
+ </p>
+ </div>
+ </div>
+
+ <div id="page7" class="page">
+ <div class="inner">
+ <h2>help <abbr class="amp" title="and">&amp;</abbr> information</h2>
+ <p><span class="micro">run any command as root</span>
+ <code>sudo your-command-here</code>
+ </p>
+ <p><span class="micro">get help for any command, eg <code>svn</code></span>
+ <code>svn --help</code>
+ </p>
+ <p><span class="micro">what is the uptime of this computer</span>
+ <code>uptime</code>
+ </p>
+ <p><span class="micro">what is the size of the current directory and all the contents</span>
+ <code>du -h</code>
+ </p>
+ <p><span class="micro">cancel the command you were currently typing</span>
+ <code>ctrl + c</code>
+ </p>
+ <p><span class="micro">go to the beginning of the line in the terminal</span>
+ <code>ctrl + a</code>
+ </p>
+ <p><span class="micro">go to the end of the line in the terminal</span>
+ <code>ctrl + e</code>
+ </p>
+ </div>
+ </div>
+
+ <div id="page8" class="page lines">
+ </div>
+ </div>
+
+</body>
+</html>