Johan Ekenberg

Computer Programmer and Double Bass Player

Octopress Cheat Sheet

This is h2

Describing h2 with some custom text.

This is h3

Describing h3 with some custom text.

This is h4

Describing h4 with some custom text.

This is h5

Describing h5 with some custom text.

This is h6

Describing h6 with some custom text.

Create, edit, test and publish:

Octopress create new post
1
2
3
4
5
6
7
$ rake new_post["New Post Title"]
# edit the generated 'source/_posts/YY-MM-DD-new-post-title.org'
# export to markdown/octopress from Emacs
$ rake preview  # <-- optional, on linux, check http://localhost:4000/
$ rake watch    # <-- optional, on mac, using pow, visit ekenberg.dev for preview
$ rake generate # <-- straight site build if not previewing as above
$ rake deploy   # <-- sync generated site to webhost

Blockquote:

Everything should be made as simple as possible,
but not any simpler

Generic black code box: It feels buggy, be careful

    Generic black code box, create by indenting line(s) by tab
    End with a single ^ at start of line

Syntax highlighted source code block with title:

python
1
2
3
# some python
def some_function(foo):
    handle(foo)

Verbatim =word= or code ~word~ markup can be used for short highlights but they can break from equal-signs, quotes and who knows what else.

my $foo = 'bar';

White box with plain text:

1This is plain text
2     It will be displayed verbatim with indentation

I made this change to not have org-files messing up jekyll generate

~/.rvm/gems/ruby-1.9.3-p385/gems/jekyll-0.12.0/lib/jekyll/site.rb
1
2
3
4
5
6
7
8
9
10
11
def filter_entries(entries)
  entries = entries.reject do |e|
    unless self.include.include?(e)
      ['.', '_', '#'].include?(e[0..0]) ||
        e[-1..-1] == '~' ||
        e.end_with?(".org") ||
      self.exclude.include?(e) ||
      File.symlink?(e)
    end
  end
end

Math display

Centrifugal force is given by the formula:

where F is force in Newton

CSS

Edit source/custom/sass/_styles.scss for minor style changes, ie font sizes, colors etc

Comments