Unbounded Above

Alex Teichman

Test Post

This is a test post to see if Octopress is suitable for my purposes. Conclusion: yes. There’s nothing here for general consumption, but I’ve left this page up in the offchance you’re wondering if Octopress is for you.

YouTube videos

You can more or less just paste the YouTube embed line directly into the markdown file. I needed to add ‘http:’ to the URL supplied by YouTube. Adding ?rel=0&vq=hd1080 to the end of the URL will prevent it from showing related video suggestions at the end and make it play in HD.

Images

Images should be placed in the octopress/source/images directory. A link path looks like /images/2013-07-15_oblique_angle_test/00-animated.gif. When the site is generated, they’ll end up in the octopress/public/images directory.

alt text

Math

Latex is not supported by default but it is quite easy to add:

Terminal output

1
2
3
4
5
6
7
8
9
10
11
12
13
14
teichman@aluminum:~/octopress$ ls -l
total 60
-rw-rw-r--  1 teichman teichman  1303 Jul 15 17:55 CHANGELOG.markdown
-rw-rw-r--  1 teichman teichman   413 Jul 15 17:55 config.rb
-rw-rw-r--  1 teichman teichman   643 Jul 15 17:55 config.ru
-rw-rw-r--  1 teichman teichman  2865 Jul 15 18:06 _config.yml
-rw-rw-r--  1 teichman teichman   450 Jul 15 17:55 Gemfile
-rw-rw-r--  1 teichman teichman  1412 Jul 15 17:57 Gemfile.lock
drwxrwxr-x  2 teichman teichman  4096 Jul 15 17:55 plugins
drwxrwxr-x  7 teichman teichman  4096 Jul 15 18:09 public
-rw-rw-r--  1 teichman teichman 15660 Jul 15 17:55 Rakefile
-rw-rw-r--  1 teichman teichman  2839 Jul 15 17:55 README.markdown
drwxrwxr-x  6 teichman teichman  4096 Jul 15 18:01 sass
drwxrwxr-x 10 teichman teichman  4096 Jul 15 18:04 source

Code

bash code example
1
2
3
function cgrep {
  2>/dev/null grep -n "$@" $(cfiles) | nl | grep "$@"
}
c++ code example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
class Trajectory : public Serializable
{
public:
  Trajectory() {}
  //! Deep copy
  Trajectory(const Trajectory& other);
  //! Deep copy
  Trajectory& operator=(const Trajectory& other);
  ~Trajectory();

  void clear();
  //! Destroys everything inside.
  void resize(size_t num);
  void set(size_t idx, const Eigen::Affine3d& transform);
  const Eigen::Affine3d& get(size_t idx) const;
  bool exists(size_t idx) const;
  void remove(size_t idx);
  size_t size() const { return transforms_.size(); }
  size_t numValid() const;
  std::string status(const std::string& prefix) const;

  void serialize(std::ostream& out) const;
  void deserialize(std::istream& in);

protected:
  std::vector<Eigen::Affine3d*> transforms_;
};
python code example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/usr/bin/python

import os, sys, string, argparse, smtplib
from email.mime.text import MIMEText

# -- Parse args.
parser = argparse.ArgumentParser()
parser.add_argument('--fr', nargs='+')
parser.add_argument('--to', nargs='+')
parser.add_argument('--subj', nargs='+')
parser.add_argument('--body', nargs='*')
args = parser.parse_args()

to = ', '.join(args.to)
subj = ' '.join(args.subj)
if args.body is None:
    body = ''
else:
    body = ' '.join(args.body)

print 'To:   ' + to
print 'Subj: ' + subj
print 'Body: ' + body

# -- Set up the message.
msg = MIMEText(body)
msg['Subject'] = subj
msg['To'] = to

stanford = True
if stanford:
    server = smtplib.SMTP('smtp-unencrypted.stanford.edu')
    username = args.fr
else:
    # -- Connect to hard-coded gmail account.  Gross.
    username = 'anon.aoeu@gmail.com'
    password = '<YOUR PASSWORD>'
    server = smtplib.SMTP('smtp.gmail.com:587')
    server.starttls()
    server.login(username, password)

# -- Send.
fail = server.sendmail(username, args.to, msg.as_string())
if fail:
    print fail
else:
    print 'Email sent.'

server.quit()

Lists

The indentation isn’t quite showing up correctly in my browser, but this can probably be fixed.

  • This is a list item
  • Something else
    • Foo
    • Bar

Long text

Bacon ipsum dolor sit amet sirloin corned beef jowl prosciutto flank kielbasa, fatback salami bacon shankle hamburger pork chop tongue beef. Ham hock strip steak hamburger jowl, shoulder bacon fatback. Biltong meatloaf prosciutto bacon drumstick ground round venison swine cow jerky tri-tip tongue fatback rump. Tenderloin ribeye venison pork belly shankle. Short loin ham hock tenderloin strip steak leberkas jowl pancetta swine drumstick chuck.

Turkey filet mignon hamburger ball tip brisket beef ribs corned beef tenderloin andouille capicola kielbasa. Venison shoulder hamburger, capicola swine drumstick short ribs beef ribs pig corned beef pork pork loin meatloaf. Salami andouille meatball, biltong jerky bacon ball tip. Doner shoulder ground round tri-tip turducken chicken t-bone pork shank. Bresaola pig ribeye strip steak ham hock brisket boudin flank, bacon short ribs pancetta turducken biltong meatball rump. Kielbasa pastrami cow, meatloaf bacon short ribs tail tongue swine andouille rump ground round.

Short loin fatback jerky hamburger ribeye bacon swine bresaola. Corned beef shankle pork chop, pork fatback leberkas salami chuck ribeye sausage rump bresaola meatball tri-tip capicola. Hamburger chuck tongue capicola turkey ground round short loin pork meatball andouille tail cow. Pork loin sirloin frankfurter, turducken pastrami andouille short ribs tongue shank spare ribs flank. Chicken flank tenderloin short loin capicola sausage bresaola venison boudin prosciutto swine cow jerky. Tongue biltong boudin pig fatback, ribeye beef turducken. Tongue shank pork chop sirloin jowl.

Swine ham hock ribeye, meatball tri-tip salami ham pork pastrami tail beef. Drumstick bacon prosciutto ham hock pork belly beef, strip steak pork. Boudin strip steak flank tri-tip brisket ribeye ham. Pancetta meatball short loin tri-tip hamburger swine filet mignon pig kielbasa ribeye.

Jowl swine shankle turkey ham turducken pastrami prosciutto short ribs ground round beef ribs pig. Pancetta bacon fatback boudin kielbasa turducken. Sausage t-bone prosciutto jerky bresaola ground round leberkas jowl meatball capicola chuck. Boudin jerky bresaola rump pork loin prosciutto sirloin swine drumstick.

Thanks to Bacon Ipsum.