Skip to content

Commit

Permalink
Merge branch 'master' of github.com:ttscoff/cheaters
Browse files Browse the repository at this point in the history
* 'master' of github.com:ttscoff/cheaters:
  Fixing broken image links
  Fix indentation
  Added new command in screen GNU cheatsheet
  Screen GNU cheatsheet added
  • Loading branch information
ttscoff committed Apr 10, 2013
2 parents ef00053 + 2fb52bd commit 91e104f
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
You can read this page if you want to, but [this one](http://ttscoff.github.com/cheaters/) is way prettier.

![Cheat Sheets Header](http://brettterpstra.com/wp-content/uploads/2012/03/Cheat-Sheets-Header.jpg)
![Cheat Sheets Header](http://brettterpstra.com/uploads/2012/03/Cheat-Sheets-Header.jpg)

[macdrifter]: http://www.macdrifter.com/2012/02/markdown-cheat-sheets-and-marked/
[gather]: http://brettterpstra.com/introducing-gather-a-cocoa-markdownifier/
Expand All @@ -12,13 +12,13 @@ First and foremost, this is a total ripoff of an idea by Gabe Weatherhead [over
Cheaters is a collection of HTML-based cheat sheets meant for display in an Automator-based popup browser which can float on your screen while you work in other apps. Most of the time I create [TextExpander][te] snippets for commonly-forgotten formats, but having an overall reference can be handy. I've included a collection of hastily made sheets as examples for you to create your own. Sheets are easy to create with minimal markup and are, for the most part, automatically styled and made to fit in with Cheaters overall aesthetic.


![Cheat Sheets wide](http://brettterpstra.com/wp-content/uploads/2012/03/Cheat-Sheets-wide.jpg)
![Cheat Sheets wide](http://brettterpstra.com/uploads/2012/03/Cheat-Sheets-wide.jpg)

### Using Cheaters

The most useful way to use Cheaters is with an Automator Application.

![Cheaters Automator Application setup](http://brettterpstra.com/wp-content/uploads/2012/03/Cheaters-Automator.jpg)
![Cheaters Automator Application setup](http://brettterpstra.com/uploads/2012/03/Cheaters-Automator.jpg)

1. Download the Zip file above and put it anywhere on your computer (I keep mine in Dropbox so that my cheat sheets are available on other machines).
2. Open Automator in your Applications folder.
Expand All @@ -42,15 +42,15 @@ The index file for Cheaters loads each cheat sheet dynamically into its own mark

#### The look

![Narrow, high contrast](http://brettterpstra.com/wp-content/uploads/2012/03/Cheat-Sheets-narrow-high-contrast.jpg)
![Narrow, high contrast](http://brettterpstra.com/uploads/2012/03/Cheat-Sheets-narrow-high-contrast.jpg)

If you run into markup that isn't handled by the CSS, just wrap it in a div with a unique ID and add specific styles in the main CSS file to override or augment default styles. You can, of course, completely replace that stylesheet if you want an entirely different look. I promise not to be offended.

There's also a contrast icon in the upper right, which you can use to flip between light-on-dark and dark-on-light. You can make this change permanent by editing the body class in index.html. Adding a class of "inverted" will set it to be light-on-dark by default; without that class it's dark-on-light automatically.

#### Using PDFs

![Cheat Sheets with image](http://brettterpstra.com/wp-content/uploads/2012/03/Cheat-Sheets-Wide-Image.jpg)
![Cheat Sheets with image](http://brettterpstra.com/uploads/2012/03/Cheat-Sheets-Wide-Image.jpg)

If you find a PDF cheat sheet that's ideal for this type of display, you'll need to convert it to an image (gif, jpg or png) first. Make it large, between 800px and 1024px wide. Cheaters will automatically scale it to your browser width, and when your browser width gets small enough that the image would be unreadable, it shows it full size and lets you scroll around within the viewport. See the CSS3 cheat sheet markup for an example of using an image; it's just an image tag in an html file. Easy as pie.

Expand Down
74 changes: 74 additions & 0 deletions cheatsheets/screen.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
<div id="html5">
<h3>GNU Screen</h3>
<div>
<article id="page2">
<div class="inner">
<header><h4>Basics</h4></header>
<dl>
<dt><code>ctrl a c</code></dt>
<dd>Cre­ate new win­dow</dd>
<dt><code>ctrl a A</code></dt>
<dd>Set win­dow name</dd>
<dt><code>ctrl a w</code></dt>
<dd>Show all win­dow</dd>
<dt><code>ctrl a 1|2|3|…</code></dt>
<dd>Switch to win­dow n</dd>
<dt><code>ctrl a ”</code></dt>
<dd>Choose win­dow</dd>
<dt><code>ctrl a ctrl a</code></dt>
<dd>Switch between win­dow</dd>
<dt><code>ctrl a d</code></dt>
<dd>Detach win­dow</dd>
<dt><code>ctrl a ?</code></dt>
<dd>Help</dd>
<dt><code>ctrl a [</code></dt>
<dd>Start copy, move cur­sor to the copy loca­tion, press ENTER, select the chars, press ENTER to copy the selected char­ac­ters to the buffer</dd>
<dt><code>ctrl a ]</code></dt>
<dd>Paste from buffer</dd>
</dl>
</div>
</article>

<article id="page3">
<div class="inner">
<header><h4>How to start screen</h4></header>
<dl>
<dt><code>screen –DR</code></dt>
<dd>List of detached screen</dd>
<dt><code>screen –r PID</code></dt>
<dd>Attach detached screen ses­sion</dd>
<dt><code>screen –dmS MySes­sion</code></dt>
<dd>Start a detached screen ses­sion</dd>
<dt><code>screen -S MySession</code></dt>
<dd>Start a new screen session with name MySession</dd>
<dt><code>screen –r MySes­sion</code></dt>
<dd>Attach screen ses­sion with name MySession</dd>
</dl>
</div>
</article>

<article id="page4">
<div class="inner">
<header><h4>Advanced</h4></header>
<dl>
<dt><code>ctrl a S</code></dt>
<dd>cre­ate split screen</dd>
<dt><code>ctrl a TAB</code></dt>
<dd>switch between split screens</dd>
</dl>
If you cre­ated a new split screen, the cur­rent win­dow is empty. either select an exist­ing win­dow (ctrl a ”) or cre­ate a new split screen (ctrl a n).
<dl>
<dt><code>ctrl a Q</code></dt>
<dd>Kill all regions but the cur­rent one.</dd>
<dt><code>ctrl a X</code></dt>
<dd>Remove active win­dow from split screen</dd>
<dt><code>ctrl a O</code></dt>
<dd>Logout active win­dow (dis­able out­put)</dd>
<dt><code>ctrl a I</code></dt>
<dd>Login active win­dow (enable output)</dd>
</dl>
</div>
</article>
</div>
<hr>
<p>Adapted from <a href="http://neophob.com/2007/04/gnu-screen-cheat-sheet/" target="_top">Neophob.com post</a></p>
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<!-- <li><a href="cheatsheets/keybindings.html">Bindings</a></li> -->
<li><a href="cheatsheets/gmail.html">GMail</a></li>
<li><a href="cheatsheets/vim.html">Vim</a></li>
<!-- <li><a href="cheatsheets/screen.html">Screen</a></li> -->
<li><a href="cheatsheets/alfred.html">Alfred</a></li>
<!-- <li><a href="cheatsheets/git.html">Git</a></li> -->
<!-- <li><a href="cheatsheets/git-advanced.html">Git</a></li> -->
Expand Down

0 comments on commit 91e104f

Please sign in to comment.