From 30aef799721202ce1d70230a5424267f1d3f52e7 Mon Sep 17 00:00:00 2001 From: Sami Samhuri Date: Sat, 31 Mar 2012 16:45:49 -0700 Subject: [PATCH] update links to remove .html extension --- drafts/mach-o-symbol-and-relocation-tables.html | 4 ++-- published/2006.02.21-textmate-insert-text-into-self-down.md | 4 ++-- published/2006.02.21-textmate-move-selection-to-self-down.md | 2 +- published/2007.05.01-typo-and-i-are-friends-again.md | 2 +- published/2007.06.14-more-scheming-with-haskell.md | 2 +- published/2007.06.15-begging-the-question.md | 2 +- published/2007.06.20-reinventing-the-wheel.md | 4 ++-- published/2007.06.25-emacs-tagify-region-or-insert-tag.md | 2 +- published/2007.06.26-rtfm.md | 2 +- published/2007.08.02-elschemo-boolean-logic-and-branching.md | 2 +- published/2007.08.09-cheat-from-emacs.md | 2 +- published/2007.08.21-cheat-productively-in-emacs.md | 4 ++-- .../2010.01.17-working-with-c-style-structs-in-ruby.html | 2 +- published/2010.01.18-basics-of-the-mach-o-file-format.html | 4 ++-- 14 files changed, 19 insertions(+), 19 deletions(-) diff --git a/drafts/mach-o-symbol-and-relocation-tables.html b/drafts/mach-o-symbol-and-relocation-tables.html index 48a0267..a34fd4f 100644 --- a/drafts/mach-o-symbol-and-relocation-tables.html +++ b/drafts/mach-o-symbol-and-relocation-tables.html @@ -1,11 +1,11 @@

This post is the last of a triplet on generating basic x86 Mach-O files with Ruby. The - + first post introduced CStruct, a Ruby class used to serialize simple struct-like objects, while the second describes - the + the structure of a simple Mach-O file.

diff --git a/published/2006.02.21-textmate-insert-text-into-self-down.md b/published/2006.02.21-textmate-insert-text-into-self-down.md index 73fd22d..4cb5522 100644 --- a/published/2006.02.21-textmate-insert-text-into-self-down.md +++ b/published/2006.02.21-textmate-insert-text-into-self-down.md @@ -6,12 +6,12 @@ Tags: textmate, rails, hacking, commands, macro, rails, snippets, textmate Styles: typocode ---- -

UPDATE: I got everything working and it's all packaged up here. There's an installation script this time as well.

+

UPDATE: I got everything working and it's all packaged up here. There's an installation script this time as well.

Thanks to a helpful thread on the TextMate mailing list I have the beginning of a solution to insert text at 2 (or more) locations in a file.

-

I implemented this for a new snippet I was working on for migrations, rename_column. Since the command is the same in self.up and self.down simply doing a reverse search for rename_column in my hackish macro didn't return the cursor the desired location.

That's enough introduction, here's the program to do the insertion:

+

I implemented this for a new snippet I was working on for migrations, rename_column. Since the command is the same in self.up and self.down simply doing a reverse search for rename_column in my hackish macro didn't return the cursor the desired location.

That's enough introduction, here's the program to do the insertion:

#!/usr/bin/env ruby
diff --git a/published/2006.02.21-textmate-move-selection-to-self-down.md b/published/2006.02.21-textmate-move-selection-to-self-down.md
index cba55d3..5e96fcb 100644
--- a/published/2006.02.21-textmate-move-selection-to-self-down.md
+++ b/published/2006.02.21-textmate-move-selection-to-self-down.md
@@ -5,7 +5,7 @@ Author: sjs
 Tags: textmate, rails, hacking, hack, macro, rails, textmate
 ----
 
-

UPDATE: This is obsolete, see this post for a better solution.

+

UPDATE: This is obsolete, see this post for a better solution.

Duane's comment prompted me to think about how to get the drop_table and remove_column 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.

Use MCDT to insert:

diff --git a/published/2007.05.01-typo-and-i-are-friends-again.md b/published/2007.05.01-typo-and-i-are-friends-again.md index 76243a1..b83a660 100644 --- a/published/2007.05.01-typo-and-i-are-friends-again.md +++ b/published/2007.05.01-typo-and-i-are-friends-again.md @@ -5,7 +5,7 @@ Author: sjs Tags: typo ---- -

I've been really frustrated with Typo recently. For some reason changing my last post 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. +

I've been really frustrated with Typo recently. For some reason changing my last post 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. diff --git a/published/2007.06.14-more-scheming-with-haskell.md b/published/2007.06.14-more-scheming-with-haskell.md index 95c51b0..007edc3 100644 --- a/published/2007.06.14-more-scheming-with-haskell.md +++ b/published/2007.06.14-more-scheming-with-haskell.md @@ -5,7 +5,7 @@ Author: sjs Tags: coding, haskell, scheme ---- -It's been a little while since I wrote about Haskell and the Scheme interpreter 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 interesting things to try floating around da intranet. And also things to read and learn from, such as misp (via Moonbase). +It's been a little while since I wrote about Haskell and the Scheme interpreter 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 interesting things to try floating around da intranet. And also things to read and learn from, such as misp (via Moonbase). *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).* diff --git a/published/2007.06.15-begging-the-question.md b/published/2007.06.15-begging-the-question.md index 5aee8b2..20a1288 100644 --- a/published/2007.06.15-begging-the-question.md +++ b/published/2007.06.15-begging-the-question.md @@ -5,7 +5,7 @@ Author: sjs Tags: english, life, pedantry ---- -I'm currently reading SICP since it's highly recommended by many people, available for free, and interesting. The fact that I have a little Scheme interpreter 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 SICP since it's highly recommended by many people, available for free, and interesting. The fact that I have a little Scheme interpreter 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): diff --git a/published/2007.06.20-reinventing-the-wheel.md b/published/2007.06.20-reinventing-the-wheel.md index 98c6d98..44a1247 100644 --- a/published/2007.06.20-reinventing-the-wheel.md +++ b/published/2007.06.20-reinventing-the-wheel.md @@ -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 ElSchemo 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 ElSchemo 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 GNU screen or a window manager such as Rat poison (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 C-c C-c s c. My zsh alias for script/console is sc 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 intelligent snippets 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 intelligent snippets 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). diff --git a/published/2007.06.25-emacs-tagify-region-or-insert-tag.md b/published/2007.06.25-emacs-tagify-region-or-insert-tag.md index 3fe88b9..36feb3d 100644 --- a/published/2007.06.25-emacs-tagify-region-or-insert-tag.md +++ b/published/2007.06.25-emacs-tagify-region-or-insert-tag.md @@ -5,7 +5,7 @@ Author: sjs Tags: emacs, tagify ---- -After axing half of wrap-region.el I renamed it to tagify.el and improved it ever so slightly. It's leaner, and does more! +After axing half of wrap-region.el I renamed it to tagify.el and improved it ever so slightly. It's leaner, and does more! tagify-region-or-insert-tag does the same thing as wrap-region-with-tag 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 C-z t, as I use C-z as my personal command prefix. diff --git a/published/2007.06.26-rtfm.md b/published/2007.06.26-rtfm.md index c9e9e4d..1aae5a0 100644 --- a/published/2007.06.26-rtfm.md +++ b/published/2007.06.26-rtfm.md @@ -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 skeleton pairs in the Emacs manual, or better yet C-h f skeleton-pair-insert-maybe. 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 wrap-region useless, which is great! I like a trim .emacs and .emacs.d. +This renders wrap-region useless, which is great! I like a trim .emacs and .emacs.d. diff --git a/published/2007.08.02-elschemo-boolean-logic-and-branching.md b/published/2007.08.02-elschemo-boolean-logic-and-branching.md index 8d7ddab..91de819 100644 --- a/published/2007.08.02-elschemo-boolean-logic-and-branching.md +++ b/published/2007.08.02-elschemo-boolean-logic-and-branching.md @@ -7,7 +7,7 @@ Tags: elschemo, haskell, scheme I've been developing a Scheme interpreter in Haskell called -ElSchemo. +ElSchemo. It started from Jonathan's excellent Haskell tutorial which I followed in order to learn both Haskell and Scheme. Basically diff --git a/published/2007.08.09-cheat-from-emacs.md b/published/2007.08.09-cheat-from-emacs.md index 86b16e7..31c8718 100644 --- a/published/2007.08.09-cheat-from-emacs.md +++ b/published/2007.08.09-cheat-from-emacs.md @@ -9,7 +9,7 @@ Tags: Emacs *Update #2 [2007.08.10]: Editing cheats and diffs have been implemented.* -*Update #3 [2007.08.21]: I added completion to cheat.el. The file linked on this page is still the latest version.* +*Update #3 [2007.08.21]: I added completion to cheat.el. The file linked on this page is still the latest version.* We all know and love cheat. Now you can cheat without leaving Emacs (and without using a shell in Emacs). diff --git a/published/2007.08.21-cheat-productively-in-emacs.md b/published/2007.08.21-cheat-productively-in-emacs.md index 08598ae..4f03724 100644 --- a/published/2007.08.21-cheat-productively-in-emacs.md +++ b/published/2007.08.21-cheat-productively-in-emacs.md @@ -5,7 +5,7 @@ Author: sjs Tags: Emacs ---- -By now you may have heard about cheat, the command line cheat sheet collection that's completely open to editing, wiki style. A couple of weeks ago I posted cheat.el 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 cheat, the command line cheat sheet collection that's completely open to editing, wiki style. A couple of weeks ago I posted cheat.el 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? Completion! The on Download it now: cheat.el -For any newcomers, just drop this into ~/.emacs.d, ~/.elisp, or any directory in your load-path and then (require 'cheat). For more info check the original article for a rundown on the cheat commands. +For any newcomers, just drop this into ~/.emacs.d, ~/.elisp, or any directory in your load-path and then (require 'cheat). For more info check the original article for a rundown on the cheat commands. diff --git a/published/2010.01.17-working-with-c-style-structs-in-ruby.html b/published/2010.01.17-working-with-c-style-structs-in-ruby.html index e9db440..a9bb0a2 100644 --- a/published/2010.01.17-working-with-c-style-structs-in-ruby.html +++ b/published/2010.01.17-working-with-c-style-structs-in-ruby.html @@ -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.

Next in this series: Basics +href="2010.01.18-basics-of-the-mach-o-file-format">Basics of the Mach-O file format

diff --git a/published/2010.01.18-basics-of-the-mach-o-file-format.html b/published/2010.01.18-basics-of-the-mach-o-file-format.html index 37ea089..52739d0 100644 --- a/published/2010.01.18-basics-of-the-mach-o-file-format.html +++ b/published/2010.01.18-basics-of-the-mach-o-file-format.html @@ -7,7 +7,7 @@ Tags: mach-o, os x, compiler

This post is part of a series on generating basic x86 Mach-O files with Ruby. The - + first post introduced CStruct, a Ruby class used to serialize simple struct-like objects.

@@ -65,7 +65,7 @@ Mach header fire up a shell and type otool -h /bin/zsh (on a Mac).

Using - + CStruct we define the Mach header like so: