My Recent Pastes (350 and counting)
All Pasties (over 350 and counting)
Below are summaries of the 15 most recent pasties by Charilaos Skiadas.
August 26, 2007
12:11AM EDT
by Charilaos Skiadas
View more (8 lines)
1 2 3 4 5 |
f = {"a" => "hi"}
c= {"a" => "hi"}
b = [2,1,f]
h=[2,1,f]
puts h.hash
|
August 26, 2007
12:04AM EDT
by Charilaos Skiadas
View more (30 lines)
1 2 3 4 5 |
f = {"a" => "hi"}
c= {"a" => "hi"}
a = [1,2,c]
b = [2,1,f]
puts a==b
|
August 14, 2007
8:48PM EDT
by Charilaos Skiadas
View more (14 lines)
1 2 3 4 5 |
#!/usr/bin/env ruby
templates = DATA.read.split(/^\-\-\-+$/)
3.times do |i|
puts "Template #{i+1}:"
print templates[i]
|
July 28, 2007
11:01PM EDT
by Charilaos Skiadas
1 2 3 4 |
if $repo_url.nil? or $repo_url.empty?
make_error_head( 'Warning' )
puts "format_log_xml.rb was not able to reconstruct the repository url so you won't<br />"+
"be able to click on the links. The reason for this is likely that you have last checked out from this repository with a version of svn older than 1.3.0. Please update your version of svn AND run 'svn up'."
|
July 14, 2007
5:16PM EDT
by Charilaos Skiadas
View more (9 lines)
1 2 3 4 5 |
Snippets are easy to create, but limited in their uses. A more powerful feature, that however requires a bit more work and some programming skills, but has almost unlimited capabilities, are \emph{commands}\footnote{\url{http://www.macromates.com/textmate/manual/commands}}. A command is simply a script which can process the whole document or part of it and change it, or create a new document for it, or even generate an HTML window. This HTML window can even contain links back to specific parts of the document. You can write commands in any scripting language, like Bash, Ruby, Perl, Python, etc. In fact, all of the functionality discussed in the next section is provided by TextMate commands, so there will be a lot of examples of commands there. Here we will briefly discuss the various ways in which commands can be customized.
First of all, we have a number of options about the text that the command will accept as input. It could be the entire document, the selected text, or simply nothing. Then we have many options for the output of the command. It could replace the selected text with it, place it in a new document, use it to create an HTML window, or simply discard it.
Finally, and this is something that can be done for snippets as well, you can specify a \emph{scope} for the command. This means that the command can only be executed when the caret is in that particular scope. This way, for example, we can have a number of commands that only work when inside a math environment.
|
July 14, 2007
4:55PM EDT
by Charilaos Skiadas
View more (205 lines)
1 2 3 4 5 |
\documentclass{pracjourn}
%% BEGIN PACKAGES
\usepackage{amssymb}
\usepackage{fancyvrb}
|
July 13, 2007
8:08PM EDT
by Charilaos Skiadas
View more (221 lines)
1 2 3 4 5 |
\documentclass{pracjourn}
%% BEGIN PACKAGES
\usepackage{amssymb}
\usepackage{fancyvrb}
|
July 13, 2007
7:09PM EDT
by Charilaos Skiadas
View more (192 lines)
1 2 3 4 5 |
\documentclass{pracjourn}
%% BEGIN PACKAGES
\usepackage{amssymb}
\usepackage{fancyvrb}
|
July 13, 2007
6:51PM EDT
by Charilaos Skiadas
View more (192 lines)
1 2 3 4 5 |
\documentclass{pracjourn}
%% BEGIN PACKAGES
\usepackage{amssymb}
\usepackage{fancyvrb}
|
July 13, 2007
5:17PM EDT
by Charilaos Skiadas
View more (193 lines)
1 2 3 4 5 |
\documentclass{pracjourn}
%% BEGIN PACKAGES
\usepackage{amssymb}
\usepackage{fancyvrb}
|
May 06, 2007
5:47PM EDT
by Charilaos Skiadas
View more (13 lines)
1 2 3 4 5 |
it| Item
| denotes the caret. Currently pressing cmd-} turns it into:
\begin{itemize}
|
February 20, 2007
6:17PM EDT
by Charilaos Skiadas
View more (104 lines)
1 2 3 4 5 |
nil <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> |
February 20, 2007
6:13PM EDT
by Charilaos Skiadas
View more (104 lines)
1 2 3 4 5 |
nil <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> |
February 20, 2007
5:54PM EDT
by Charilaos Skiadas
View more (125 lines)
1 2 3 4 5 |
#!/usr/bin/env ruby require 'pathname' require ENV["TM_SUPPORT_PATH"] + "/lib/dialog.rb" require ENV["TM_SUPPORT_PATH"] + "/lib/web_preview.rb" require ENV["TM_SUPPORT_PATH"] + "/lib/LaTeXUtils.rb" |
Pastie