This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TEX_FILES = FileList["*.tex", "figures/*", "*.bib", "*.cls"] | |
MAIN = "thesis" # name of main file without .tex suffix | |
MAIN_TEX = "#{MAIN}.tex" | |
OUT_PDF = "#{MAIN}.pdf" | |
file OUT_PDF => TEX_FILES do | |
%x{pdflatex -interaction=batchmode #{MAIN_TEX} >/dev/null 2>&1} | |
%x{makeindex #{MAIN} >/dev/null 2>&1} | |
%x{bibtex #{MAIN} >/dev/null 2>&1} | |
%x{pdflatex -interaction=batchmode #{MAIN_TEX} >/dev/null 2>&1} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
char* strrev(char* start, char* end) | |
{ | |
char *i = start; | |
char *j = end; | |
while (i < j) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*Main> rmChar 'a' "Hallo" | |
"Hllo" | |
Is given by: | |
characterDrop a x = (a /= x) | |
rmChar :: Char -> String -> String | |
rmChar a xs = filter (characterDrop a) xs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Individual Practical | |
==================== | |
Part 1 - 21/10/10 | |
Operating Systems | |
================= | |
Practical - 12/11/10 | |
Essay - 26/11/10 | |
Algorithms & Data Structures |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def ask(question, default=nil, valid = /.*/, multiline=false) | |
output = question | |
output << " [#{default}]" unless default.nil? | |
output << " (Optional)" if valid =~ "" | |
output << ": " | |
puts output | |
matches = false | |
answer = default |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def ask(question, default=nil, valid = /.*/, multiline=false) | |
output = question | |
output << " [#{default}]" unless default.nil? | |
output << " (Optional)" if valid =~ "" | |
output << ": " | |
puts output | |
matches = false | |
answer = default |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def detect_terminal_size | |
if (ENV['COLUMNS'] =~ /^\d+$/) && (ENV['LINES'] =~ /^\d+$/) | |
[ENV['COLUMNS'].to_i, ENV['LINES'].to_i] | |
elsif (RUBY_PLATFORM =~ /java/ || !STDIN.tty?) && command_exists?('tput') | |
[`tput cols`.to_i, `tput lines`.to_i] | |
else | |
command_exists?('stty') ? `stty size`.scan(/\d+/).map { |s| s.to_i }.reverse : nil | |
end | |
rescue | |
nil |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Music/iTunes/iTunes Music/Music/ | |
|-- +44 | |
| `-- When Your Heart Stops Beating | |
|-- 3 Doors Down | |
| |-- 3 Doors Down | |
| |-- Away From the Sun | |
| |-- Seventeen Days | |
| `-- The Better Life | |
|-- 30 Seconds To Mars | |
| |-- 30 Seconds To Mars |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[cb@titan:~/Presentations/at-tools-talk on master] | |
$ ack --text cen | |
01_title/01_title.md | |
1:!SLIDE center | |
02_intro/01_what.md | |
9:!SLIDE center | |
15:* cen | |
03_cen/01_cen.md |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git: | |
Setup | |
----- | |
git clone <repo> | |
clone the repository specified by <repo>; this is similar to "checkout" in | |
some other version control systems such as Subversion and CVS | |
Add colors to your ~/.gitconfig file: | |