summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--software/debian.page3
-rw-r--r--software/freebsd-packages.page2
-rw-r--r--software/haskell.page62
-rw-r--r--software/server-setup.page12
-rw-r--r--software/unix-tricks.page9
5 files changed, 88 insertions, 0 deletions
diff --git a/software/debian.page b/software/debian.page
index 0a1ffa5..f4a2468 100644
--- a/software/debian.page
+++ b/software/debian.page
@@ -43,3 +43,6 @@ Some gotchas from installing debian a few times:
``~/.bashrc``?
* For building stuff you want build-essential
+
+ * For the usual system man pages ("Linux Programmer's Manual"), you may need
+ to install 'manpages-dev'
diff --git a/software/freebsd-packages.page b/software/freebsd-packages.page
index 1737d42..c7d6153 100644
--- a/software/freebsd-packages.page
+++ b/software/freebsd-packages.page
@@ -40,6 +40,8 @@ These are the packages I typically install for a workstation; this is after sele
e2fsprogs
gtkchtheme
unison
+ unrar
+ ImageMagick
The following are large and/or "optional"::
diff --git a/software/haskell.page b/software/haskell.page
new file mode 100644
index 0000000..8e7d9f8
--- /dev/null
+++ b/software/haskell.page
@@ -0,0 +1,62 @@
+
+Haskell
+==================
+
+Structure
+------------
+Haskell programs consist of monads, actions, modules, ???
+
+Basic Syntax
+---------------
+
+A "type declaration":
+
+ main :: IO ()
+
+An action definition. Note that whitespace matters; the block extends to all
+lines indented to the same position as the first non-whitespace after the
+``do``:
+
+ main = do
+ stuff1
+ stuff2
+
+Lists
+--------
+Lists in haskell are homogenous: all elements must of the same type. They are
+linked lists, so cons-ing on the front is cheap and concatonating on the end
+can be expensive.
+
+Use ++ to concatonate two lists together:
+
+ ['a','b','c'] ++ ['d','e','f']
+
+Use : to cons (prepend) a single element:
+
+ 0:[1,2,3,4,5,6]
+
+Use !! to pull out an element by index (zero indexed):
+
+ ['c','a','t'] !! 1
+
+Strings are lists of characters: "baby" is equivalent to ['b','a','b','y'],
+which is equivalent to 'b':'a':'b':'y':[]. The empty set is [] and is distinct
+from [[]].
+
+A couple functions help; 'head' is like 'car' and gives the first element,
+'tail' is like 'cdr' and gives everything except the first element, 'last'
+gives the last non-empty element, and 'init' gives everything except the
+'last'. 'length' gives the number of elements, 'null' is a test to see if this
+is the empty list,
+
+Compilation
+------------
+By default the "main" action of the "Main" module is the action that is
+executed when a compiled haskell program is run by the operating system;
+this means that most haskell programs need to define these components.
+
+The `ghc` (Glasgow Haskell Compiler) is the most popular. To compile and
+execute a simple one file haskell program you will do something like:
+
+ ghc -o hello helloworld.hs
+ ./hello
diff --git a/software/server-setup.page b/software/server-setup.page
index b364f7a..0eb03eb 100644
--- a/software/server-setup.page
+++ b/software/server-setup.page
@@ -54,3 +54,15 @@ File Hierarchy
/srv/python/
Standalone python scripts and applications are stored in here (not Django
apps).
+
+Ruby on Rails Deployment
+------------------------------
+This method will mess around with nginx. It uses `<http://www.modrails.com>
+Phusion Passenger`_ on Ubuntu Server::
+
+ nano /etc/apt/sources.list # uncomment the 'universes' lines
+ sudo aptitude update
+ sudo aptitude install ruby ruby1.8-dev rubygems build-essential libopenssl-ruby libssl-dev zlib1g-dev
+ sudo aptitude install irb1.8 bzip2 unzip less screen wget curl sysinfo # Optional
+ sudo gem install passenger
+ sudo /var/lib/gems/1.8/bin/passenger-install-nginx-module
diff --git a/software/unix-tricks.page b/software/unix-tricks.page
index 533a174..41bda41 100644
--- a/software/unix-tricks.page
+++ b/software/unix-tricks.page
@@ -16,3 +16,12 @@ To fork off 10 instances of sleep with incremented lengths, 5 at a time::
$ seq 10 20 | xargs -n 1 -P 5 sleep
+Remapping a Keyboard Key to Meta
+-----------------------------------
+I like having a Meta key (aka "Windows key") for use with system keyboard
+shortcuts (change desktop etc), but some laptop keyboards don't have an extra
+button. To remap one of the Alt keys, you need to know it's code: on FreeBSD
+6.3 it was: ``Alt_R keysum 0xffea keycode 113``. To get the right mapping under
+X11, read the directions in ``/usr/X11R6/lib/X11/xkb/README``. To get the right
+mapping under the console, edit ``/usr/share/syscons/keymaps/us.iso.kbd`` and
+change 'ralt' to 'meta'.