Skip to content

Instantly share code, notes, and snippets.

View cpjobling's full-sized avatar

Chris P. Jobling cpjobling

View GitHub Profile
@cpjobling
cpjobling / xhtml11-template.html
Created March 12, 2010 14:47
A template for a valid XHTML 1.1 English language web page coded in the UTF-8 character encoding.
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>An XHTML 1.1 standard template</title>
<meta http-equiv="content-type"
content="text/html;charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
@cpjobling
cpjobling / blog.html
Created March 12, 2010 15:03
HTML for an example blog-post. Used in coursework for EG-146 Communication for the Internet.
<div id="post-id" class="entry">
<h1>Entry Title</h2>
<p>The blog entry.</p>
<p> ... </p>
<div class="byline">
<em>Posted by</em>:
<span class="posted-by">Author</span> date
</div>
</div>
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>HTML 5 complete</title>
<!--[if IE]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<style>
article, aside, dialog, figure, footer, header,
@cpjobling
cpjobling / Brew fails to build lua
Created March 25, 2011 17:23
As part of install of gnuplot (required by octave) dependency lua fails to build because -lreadline is missing. On checking, readline includes and is installed as a keg
me@mymac:/usr/local [git:master]
➔ brew install lua
==> Downloading http://www.lua.org/ftp/lua-5.1.4.tar.gz
File already downloaded and cached to /Users/eechris/Library/Caches/Homebrew
######################################################################## 100.0%
patching file lcode.c
patching file ldblib.c
patching file liolib.c
patching file llex.c
patching file loadlib.c
@cpjobling
cpjobling / .gitignore-rails
Created April 1, 2011 15:08
A .gitignore for Rails development on Mac OSX (via Ruby on Rails Tutorial)
.bundle
db/*.sqlite3
log/*.log
*.log
tmp/**/*
tmp/*
doc/api
doc/app
*.swp
*~
@cpjobling
cpjobling / rails3setup.sh
Created April 1, 2011 15:18
Setting up for Rails 3
# Set up Ruby and Gemset using RVM
rvm get latest
rvm install 1.8.7
rvm install 1.9.2-head
rvm --create 1.8.7@rails2tutorial
rvm --create use 1.9.2-head@rails3tutorial
rvm --default use 1.9.2-head@rails3tutorial
gem update --system
# Install rails
@cpjobling
cpjobling / html5_template.html
Created February 16, 2012 20:07
Basic HTML5 template
<!DOCTYPE html>
<html lang="en">
<head>
<title>An HTML5 standard template</title>
<meta charset="utf-8" />
<link rel="stylesheet" media="screen" href="nostyle.css" />
</head>
<body>
@cpjobling
cpjobling / html5-template.html
Created March 6, 2012 20:28
Simple bare-minimum HTML5 template (no CSS, no JavaScript)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>...</title>
</head>
<body>
</body>
</html>
@cpjobling
cpjobling / q4c_correction_2011.m
Created May 4, 2012 15:00
Solving EGLM03 Exam Q4(c) with Matlab using Ackermann's formula for a state observer
%% EGLM03 Exam 2010-11: Q4(c) Correction.
% Define system to be observed (controller canonical form)
A = [-10, -25, 0; 1, 0, 0; 0, 1, 0];
B = [1; 0; 0];
C = [0,1,2];
% Design of an observer using Ackermann's formula
At = A';
Ct = C';
Obs = [Ct, At * Ct, (At)^2 * Ct];
ObsI = inv(Obs)
@cpjobling
cpjobling / q4c_correction_2010.m
Created May 4, 2012 15:08
EGLM03 Exam 2009-10: Correction to Q4(c) calculation of observer gains using Ackermann's formula
%% EGLM03 Exam 2009-10: Q4(c) Correction.
% Define system to be observed (controller canonical form)
A = [-13, -39, -27; 1, 0, 0; 0, 1, 0];
B = [1; 0; 0];
C = [0,5,2];
% Design of an observer using Ackermann's formula
At = A';
Ct = C';
Obs = [Ct, At * Ct, (At)^2 * Ct];
ObsI = inv(Obs)