update links to remove .html extension

This commit is contained in:
Sami Samhuri 2012-03-31 16:45:49 -07:00
parent 874f8b9b84
commit 30aef79972
14 changed files with 19 additions and 19 deletions

View file

@ -1,11 +1,11 @@
<p><i>
This post is the last of a triplet on generating basic x86 Mach-O files
with Ruby. The
<a href="working-with-c-style-structs-in-ruby.html">
<a href="2010.01.17-working-with-c-style-structs-in-ruby">
first post</a> introduced CStruct, a Ruby class used to serialize
simple struct-like objects, while the
second describes
<a href="basics-of-the-mach-o-file-format.html">the
<a href="2010.01.18-basics-of-the-mach-o-file-format">the
structure of a simple Mach-O file</a>.
</i></p>

View file

@ -6,12 +6,12 @@ Tags: textmate, rails, hacking, commands, macro, rails, snippets, textmate
Styles: typocode
----
<p><em><strong>UPDATE:</strong> I got everything working and it's all packaged up <a href="2006.02.22-intelligent-migration-snippets-0.1-for-textmate.html">here</a>. There's an installation script this time as well.</em></p>
<p><em><strong>UPDATE:</strong> I got everything working and it's all packaged up <a href="2006.02.22-intelligent-migration-snippets-0.1-for-textmate">here</a>. There's an installation script this time as well.</em></p>
<p>Thanks to <a href="http://thread.gmane.org/gmane.editors.textmate.general/8520">a helpful thread</a> on the TextMate mailing list I have the beginning of a solution to insert text at 2 (or more) locations in a file.</p>
<p>I implemented this for a new snippet I was working on for migrations, <code>rename_column</code>. Since the command is the same in self.up and self.down simply doing a reverse search for <code>rename_column</code> in my <a href="2006.02.21-textmate-move-selection-to-self-down.html">hackish macro</a> didn't return the cursor the desired location.</p><p>That's enough introduction, here's the program to do the insertion:</p>
<p>I implemented this for a new snippet I was working on for migrations, <code>rename_column</code>. Since the command is the same in self.up and self.down simply doing a reverse search for <code>rename_column</code> in my <a href="2006.02.21-textmate-move-selection-to-self-down">hackish macro</a> didn't return the cursor the desired location.</p><p>That's enough introduction, here's the program to do the insertion:</p>
<div class="typocode"><pre><code class="typocode_ruby "><span class="comment">#!/usr/bin/env ruby</span>

View file

@ -5,7 +5,7 @@ Author: sjs
Tags: textmate, rails, hacking, hack, macro, rails, textmate
----
<p><strong>UPDATE:</strong> <em>This is obsolete, see <a href="2006.02.21-textmate-insert-text-into-self-down.html">this post</a> for a better solution.</em></p>
<p><strong>UPDATE:</strong> <em>This is obsolete, see <a href="2006.02.21-textmate-insert-text-into-self-down">this post</a> for a better solution.</em></p>
<p><a href="2006.02.18-some-textmate-snippets-for-rails-migrations.html#comment-3">Duane's comment</a> prompted me to think about how to get the <code>drop_table</code> and <code>remove_column</code> lines inserted in the right place. I don't think TextMate's snippets are built to do this sort of text manipulation. It would be nicer, but a quick hack will suffice for now.</p><p>Use <acronym title="Migration Create and Drop Table">MCDT</acronym> to insert:</p>

View file

@ -5,7 +5,7 @@ Author: sjs
Tags: typo
----
<p>I've been really frustrated with <a href="http://www.typosphere.org/">Typo</a> recently. For some reason changing my <a href="2007.04.30-funny-how-code-can-be-beautiful.html">last post</a> would cause MySQL to timeout and I'd have to kill the rogue ruby process manually before any other changes to the DB would work, instead of hanging for a minute or two then timing out. Luckily I was able to disable the post using the command line client, the bug only manifested itself when issuing an UPDATE with all the fields present. Presumably the body was tripping things up because most other fields are simple booleans, numbers, or very short strings.
<p>I've been really frustrated with <a href="http://www.typosphere.org/">Typo</a> recently. For some reason changing my <a href="2007.04.30-funny-how-code-can-be-beautiful">last post</a> would cause MySQL to timeout and I'd have to kill the rogue ruby process manually before any other changes to the DB would work, instead of hanging for a minute or two then timing out. Luckily I was able to disable the post using the command line client, the bug only manifested itself when issuing an UPDATE with all the fields present. Presumably the body was tripping things up because most other fields are simple booleans, numbers, or very short strings.
Add to that the random HTTP 500 errors which were very noticeable while I was trying to fix that post and I was about to write my own blog or switch to WordPress.

View file

@ -5,7 +5,7 @@ Author: sjs
Tags: coding, haskell, scheme
----
It's been a little while since I wrote about Haskell and the <a href="2007.05.03-a-scheme-parser-in-haskell-part-1.html">Scheme interpreter</a> I've been using to learn and play with both Haskell and Scheme. I finished the tutorial and got myself a working Scheme interpreter and indeed it has been fun to use it for trying out little things now and then. (Normally I would use Emacs or Dr. Scheme for that sort of thing.) There certainly are <a href="http://www.lshift.net/blog/2007/06/11/folds-and-continuation-passing-style">interesting things</a> to try floating around da intranet. And also things to read and learn from, such as <a href="http://cubiclemuses.com/cm/blog/tags/Misp">misp</a> (via <a href="http://moonbase.rydia.net/mental/blog/programming/misp-is-a-lisp">Moonbase</a>).
It's been a little while since I wrote about Haskell and the <a href="2007.05.03-a-scheme-parser-in-haskell-part-1">Scheme interpreter</a> I've been using to learn and play with both Haskell and Scheme. I finished the tutorial and got myself a working Scheme interpreter and indeed it has been fun to use it for trying out little things now and then. (Normally I would use Emacs or Dr. Scheme for that sort of thing.) There certainly are <a href="http://www.lshift.net/blog/2007/06/11/folds-and-continuation-passing-style">interesting things</a> to try floating around da intranet. And also things to read and learn from, such as <a href="http://cubiclemuses.com/cm/blog/tags/Misp">misp</a> (via <a href="http://moonbase.rydia.net/mental/blog/programming/misp-is-a-lisp">Moonbase</a>).
*I'm going to describe two new features of my Scheme in this post. The second one is more interesting and was more fun to implement (cond).*

View file

@ -5,7 +5,7 @@ Author: sjs
Tags: english, life, pedantry
----
I'm currently reading <a href="http://mitpress.mit.edu/sicp/full-text/book/book.html">SICP</a> since it's highly recommended by many people, available for free, and interesting. The fact that I have a little <a href="2007.06.14-more-scheming-with-haskell.html">Scheme interpreter</a> to play with makes it much more fun since I can add missing functionality to it as I progress through the book, thereby learning more Haskell in the process. Yay!
I'm currently reading <a href="http://mitpress.mit.edu/sicp/full-text/book/book.html">SICP</a> since it's highly recommended by many people, available for free, and interesting. The fact that I have a little <a href="2007.06.14-more-scheming-with-haskell">Scheme interpreter</a> to play with makes it much more fun since I can add missing functionality to it as I progress through the book, thereby learning more Haskell in the process. Yay!
Anyway I was very pleased to see the only correct usage of the phrase "begs the question" I have seen in a while. It's a pet peeve of mine, but I have submitted myself to the fact that the phrase is so oft used to mean "begs for the following question to be asked..." that it may as well be re-defined. In its correct usage the sentence seems to hang there if you try to apply the commonly mistaken meaning to it. That's all very hazy so here's the usage in SICP (emphasis my own):

View file

@ -5,7 +5,7 @@ Author: sjs
Tags: emacs, snippets
----
Emacs is very impressive. I only felt lost and unproductive for minutes and now it seems natural to use and get around in. I've got <a href="2007.06.14-more-scheming-with-haskell.html">ElSchemo</a> set as the default scheme, and running inferior processes interactively is an absolute dream. My scheme doesn't have readline support (which bothers me to the point where I've thought about adding it just so I can use the thing) but when running it under Emacs there's absoutely no need for anything like that since I have the power of my editor when interacting with any program.
Emacs is very impressive. I only felt lost and unproductive for minutes and now it seems natural to use and get around in. I've got <a href="2007.06.14-more-scheming-with-haskell">ElSchemo</a> set as the default scheme, and running inferior processes interactively is an absolute dream. My scheme doesn't have readline support (which bothers me to the point where I've thought about adding it just so I can use the thing) but when running it under Emacs there's absoutely no need for anything like that since I have the power of my editor when interacting with any program.
There has been a considerable amount of work done to aide in Rails development which makes Emacs especially comfortable for me. I now know why people have Emacs windows maximized on their screens. Because of its age Emacs is a handy window manager that basically eliminates the need for anything like <a href="http://en.wikipedia.org/wiki/GNU_Screen">GNU screen</a> or a window manager such as <a href="http://www.nongnu.org/ratpoison/">Rat poison</a> (which is great if you like screen), just maximize that Emacs "frame" or open one for each display and get to it. If you need a shell you just split the window and run your shell, when you're done you can easily switch back to your editing and your shell will wait in the background until you need it again. With rails-mode on I can run script/console (or switch back to it) with <code>C-c C-c s c</code>. My zsh alias for script/console is <code>sc</code> and I have other similarly succint ones for other stuff, so I took right to the shortcuts for all the handy things that I no longer have to switch applications to do:
@ -16,4 +16,4 @@ There has been a considerable amount of work done to aide in Rails development w
The Rails integration is simply stunning and I could go on all day about the mature indentation support, the Speedbar and what not, but I won't. I'm fairly sure that Emacs has taken the place of TextMate as my weapon of choice now, on all platforms. And after only 2 days!
Anyway, the point of all this was to mention the one thing that's missing: support for <a href="2006.02.22-intelligent-migration-snippets-0.1-for-textmate.html">intelligent snippets</a> which insert text at more than one point in the document (well, they appear to do so). I don't have any E-Lisp-fu to break out and solve the deficiency but if it ever bugs me enough I might try implementing it for Emacs one day. If they were useful to me outside of writing migrations I might have more incentive to do so, but I guess they aren't useful in normal editing situations (maybe I just haven't recognised the need).
Anyway, the point of all this was to mention the one thing that's missing: support for <a href="2006.02.22-intelligent-migration-snippets-0.1-for-textmate">intelligent snippets</a> which insert text at more than one point in the document (well, they appear to do so). I don't have any E-Lisp-fu to break out and solve the deficiency but if it ever bugs me enough I might try implementing it for Emacs one day. If they were useful to me outside of writing migrations I might have more incentive to do so, but I guess they aren't useful in normal editing situations (maybe I just haven't recognised the need).

View file

@ -5,7 +5,7 @@ Author: sjs
Tags: emacs, tagify
----
After <a href="2007.06.26-rtfm.html">axing</a> half of <a href="2007.06.23-emacs-for-textmate-junkies.html">wrap-region.el</a> I renamed it to <a href="/f/tagify.el">tagify.el</a> and improved it ever so slightly. It's leaner, and does more!
After <a href="2007.06.26-rtfm">axing</a> half of <a href="2007.06.23-emacs-for-textmate-junkies">wrap-region.el</a> I renamed it to <a href="/f/tagify.el">tagify.el</a> and improved it ever so slightly. It's leaner, and does more!
<code>tagify-region-or-insert-tag</code> does the same thing as <code>wrap-region-with-tag</code> except if there is no region it now inserts the opening and closing tags and sets point in between them. I have this bound to <code>C-z t</code>, as I use <code>C-z</code> as my personal command prefix.

View file

@ -7,4 +7,4 @@ Tags: emacs, rtfm
I should read the Emacs manual sometime, especially since I have it in dead-tree form. Check out <a href="http://www.gnu.org/software/emacs/manual/html_node/autotype/Inserting-Pairs.html">skeleton pairs</a> in the Emacs manual, or better yet <code>C-h f skeleton-pair-insert-maybe</code>. skeleton-pair has already been massaged to do what you most likely want if you set the correct options. Cool. I like Emacs more every day.
This renders <a href="2007.06.23-emacs-for-textmate-junkies.html">wrap-region</a> useless, which is great! I like a trim .emacs and .emacs.d.
This renders <a href="2007.06.23-emacs-for-textmate-junkies">wrap-region</a> useless, which is great! I like a trim .emacs and .emacs.d.

View file

@ -7,7 +7,7 @@ Tags: elschemo, haskell, scheme
I've been developing a Scheme
interpreter in Haskell called
<a href="2007.06.24-floating-point-in-elschemo.html">ElSchemo</a>.
<a href="2007.06.24-floating-point-in-elschemo">ElSchemo</a>.
It started from <a href="http://halogen.note.amherst.edu/~jdtang/scheme_in_48/tutorial/overview.html">Jonathan's excellent Haskell
tutorial</a>
which I followed in order to learn both Haskell and Scheme. Basically

View file

@ -9,7 +9,7 @@ Tags: Emacs
*Update #2 [2007.08.10]: Editing cheats and diffs have been implemented.*
*Update #3 [2007.08.21]: I <a href="2007.08.21-cheat-productively-in-emacs.html">added completion</a> to cheat.el. The file linked on this page is still the latest version.*
*Update #3 [2007.08.21]: I <a href="2007.08.21-cheat-productively-in-emacs">added completion</a> to cheat.el. The file linked on this page is still the latest version.*
We all know and love <a href="http://cheat.errtheblog.com/">cheat</a>. Now you can cheat without leaving Emacs (and without using a shell in Emacs).

View file

@ -5,7 +5,7 @@ Author: sjs
Tags: Emacs
----
By now you may have heard about <a href="http://cheat.errtheblog.com/">cheat</a>, the command line cheat sheet collection that's completely open to editing, wiki style. A couple of weeks ago I posted <a href="2007.08.10-cheat-from-emacs.html">cheat.el</a> which allows one to cheat from within Emacs. There's an update. However, before I get to cheat.el there's a small detour.
By now you may have heard about <a href="http://cheat.errtheblog.com/">cheat</a>, the command line cheat sheet collection that's completely open to editing, wiki style. A couple of weeks ago I posted <a href="2007.08.10-cheat-from-emacs">cheat.el</a> which allows one to cheat from within Emacs. There's an update. However, before I get to cheat.el there's a small detour.
Cheat is not just about Ruby! A few examples of cheats available are:
@ -25,4 +25,4 @@ So what's new in this version of cheat.el? <strong>Completion!</strong> The on
Download it now: <a href="/f/cheat.el">cheat.el</a>
For any newcomers, just drop this into <code>~/.emacs.d</code>, <code>~/.elisp</code>, or any directory in your <code>load-path</code> and then <code>(require 'cheat)</code>. For more info check the <a href="2007.08.09-cheat-from-emacs.html">original article</a> for a rundown on the cheat commands.
For any newcomers, just drop this into <code>~/.emacs.d</code>, <code>~/.elisp</code>, or any directory in your <code>load-path</code> and then <code>(require 'cheat)</code>. For more info check the <a href="2007.08.09-cheat-from-emacs">original article</a> for a rundown on the cheat commands.

View file

@ -70,5 +70,5 @@ but I decided to just go with what I have already so I can get on with the
more interesting and fun tasks.</p>
<p><i>Next in this series: <a
href="2010.01.18-basics-of-the-mach-o-file-format.html">Basics
href="2010.01.18-basics-of-the-mach-o-file-format">Basics
of the Mach-O file format</a></i><p>

View file

@ -7,7 +7,7 @@ Tags: mach-o, os x, compiler
<p><i>This post is part of a series on generating basic x86 Mach-O files
with Ruby. The
<a href="2010.01.17-working-with-c-style-structs-in-ruby.html">
<a href="2010.01.17-working-with-c-style-structs-in-ruby">
first post</a> introduced CStruct, a Ruby class used to serialize
simple struct-like objects.</i></p>
@ -65,7 +65,7 @@ Mach header fire up a shell and type <tt>otool -h /bin/zsh</tt> (on a
Mac).</p>
<p>Using
<a href="2010.01.17-working-with-c-style-structs-in-ruby.html">
<a href="2010.01.17-working-with-c-style-structs-in-ruby">
CStruct</a> we define the Mach header like so:</p>
<script src="http://gist.github.com/280635.js"></script>