Archive for the ‘open source’ Category
testing changes to geopress
Sunday, November 13th, 2005I’ve renamed it robopress, but haven’t changed much else.
I’d like to use maps.google instead of yahoo; a scrolling zooming map is cooler than a static map any day. If I make any progress, I’ll give the code back to Ravi.
my first AJAX type thing
Tuesday, October 18th, 2005This code is very very very stolen from Wikipedia.
I don’t know why it doesn’t work here, but it works on my journal
|
|
<script>
// Wikipedia JavaScript support functions
function showTocToggle() {
if (document.createTextNode) {
// Uses DOM calls to avoid document.write + XHTML issues
var linkHolder = document.getElementById('toctitle')
if (!linkHolder) return;
var outerSpan = document.createElement('span');
outerSpan.className = 'toctoggle';
var toggleLink = document.createElement('a');
toggleLink.id = 'togglelink';
toggleLink.className = 'internal';
toggleLink.href = 'javascript:toggleToc()';
toggleLink.appendChild(document.createTextNode(tocHideText));
outerSpan.appendChild(toggleLink);
linkHolder.appendChild(document.createTextNode(' '));
linkHolder.appendChild(outerSpan);
toggleToc();
}
}
function changeText(el, newText) {
// Safari work around
if (el.innerText)
el.innerText = newText;
else if (el.firstChild && el.firstChild.nodeValue)
el.firstChild.nodeValue = newText;
}
function toggleToc() {
var img = document.getElementById('toc').getElementsByTagName('img')[0];
var toggleLink = document.getElementById('togglelink')
if(img && toggleLink && img.style.display == 'block') {
changeText(toggleLink, tocShowText);
img.style.display = 'none';
} else {
changeText(toggleLink, tocHideText);
img.style.display = 'block';
}
}
</script>
<table>
<tr>
<td id='toc'>
<div id='toctitle'>
</div>
<img src='/images/travel/Pb/49th_May-Aug_2005/diving_in_acapulco/diving_in_acapulco-Thumbnails/3.jpg' />
</td>
</tr>
</table>
<p><script type='text/javascript'>
if (window.showTocToggle) { var tocShowText = 'show'; var tocHideText = 'hide'; showTocToggle(); }
</script></p>
000 to 999 in emacs
Thursday, September 29th, 2005There have been times that I’ve needed lists of numbers in order. Mostly for programming things. Today I created such a list using emacs via a keyboard macro.
To use it, do M-x edit-kbd-macro and then choose a key combo. (I always use C-x e). Then replace whatever is in the buffer with this text:
;; Keyboard Macro Editor. Press C-c C-c to finish; press C-x k RET to cancel. Command: last-kbd-macro Key: none Macro: C-SPC ;; set-mark-command 0 ;; self-insert-command RET ;; newline 1 ;; self-insert-command RET ;; newline 2 ;; self-insert-command RET ;; newline 3 ;; self-insert-command RET ;; newline 4 ;; self-insert-command RET ;; newline 5 ;; self-insert-command RET ;; newline 6 ;; self-insert-command RET ;; newline 7 ;; self-insert-command RET ;; newline 8 ;; self-insert-command RET ;; newline 9 ;; self-insert-command C-x r k ;; kill-rectangle C-x C-x ;; exchange-point-and-mark C-x r y ;; yank-rectangle C-b ;; backward-char C-x r t ;; string-rectangle 0 ;; self-insert-command RET ;; newline C-e ;; end-of-line RET ;; newline C-x r y ;; yank-rectangle C-b ;; backward-char C-x r t ;; string-rectangle 1 ;; self-insert-command RET ;; newline C-e ;; end-of-line RET ;; newline C-x r y ;; yank-rectangle C-b ;; backward-char C-x r t ;; string-rectangle 2 ;; self-insert-command RET ;; newline C-e ;; end-of-line RET ;; newline C-x r y ;; yank-rectangle C-b ;; backward-char C-x r t ;; string-rectangle 3 ;; self-insert-command RET ;; newline C-e ;; end-of-line RET ;; newline C-x r y ;; yank-rectangle C-b ;; backward-char C-x r t ;; string-rectangle 4 ;; self-insert-command RET ;; newline C-e ;; end-of-line RET ;; newline C-x r y ;; yank-rectangle C-b ;; backward-char C-x r t ;; string-rectangle 5 ;; self-insert-command RET ;; newline C-e ;; end-of-line RET ;; newline C-x r y ;; yank-rectangle C-b ;; backward-char C-x r t ;; string-rectangle 6 ;; self-insert-command RET ;; newline C-e ;; end-of-line RET ;; newline C-x r y ;; yank-rectangle C-b ;; backward-char C-x r t ;; string-rectangle 7 ;; self-insert-command RET ;; newline C-e ;; end-of-line RET ;; newline C-x r y ;; yank-rectangle C-b ;; backward-char C-x r t ;; string-rectangle 8 ;; self-insert-command RET ;; newline C-e ;; end-of-line RET ;; newline C-x r y ;; yank-rectangle C-b ;; backward-char C-x r t ;; string-rectangle 9 ;; self-insert-command RET ;; newline C-e ;; end-of-line C-SPC ;; set-mark-command ESC < ;; beginning-of-buffer C-x r k ;; kill-rectangle C-x r y ;; yank-rectangle 2*C-b ;; backward-char C-x r t ;; string-rectangle 0 ;; self-insert-command RET ;; newline C-e ;; end-of-line RET ;; newline C-x r y ;; yank-rectangle 2*C-b ;; backward-char C-x r t ;; string-rectangle 1 ;; self-insert-command RET ;; newline C-e ;; end-of-line RET ;; newline C-x r y ;; yank-rectangle 2*C-b ;; backward-char C-x r t ;; string-rectangle 2 ;; self-insert-command RET ;; newline C-e ;; end-of-line RET ;; newline C-x r y ;; yank-rectangle 2*C-b ;; backward-char C-x r t ;; string-rectangle 3 ;; self-insert-command RET ;; newline C-e ;; end-of-line RET ;; newline C-x r y ;; yank-rectangle 2*C-b ;; backward-char C-x r t ;; string-rectangle 4 ;; self-insert-command RET ;; newline C-e ;; end-of-line RET ;; newline C-x r y ;; yank-rectangle 2*C-b ;; backward-char C-x r t ;; string-rectangle 5 ;; self-insert-command RET ;; newline C-e ;; end-of-line RET ;; newline C-x r y ;; yank-rectangle 2*C-b ;; backward-char C-x r t ;; string-rectangle 6 ;; self-insert-command RET ;; newline C-e ;; end-of-line RET ;; newline C-x r y ;; yank-rectangle 2*C-b ;; backward-char C-x r t ;; string-rectangle 7 ;; self-insert-command RET ;; newline C-e ;; end-of-line RET ;; newline C-x r y ;; yank-rectangle 2*C-b ;; backward-char C-x r t ;; string-rectangle 8 ;; self-insert-command RET ;; newline C-e ;; end-of-line RET ;; newline C-x r y ;; yank-rectangle 2*C-b ;; backward-char C-x r t ;; string-rectangle 9 ;; self-insert-command RET ;; newline
C-c C-c to compile the code and then switch to an empty buffer. C-x e and in a couple seconds: bang
000
001
002
003
…
997
998
999
Magic.
themes
Monday, September 26th, 2005I just installed the Batavia 1.5 theme. I didn’t like the color, but I like the design, especially the little squares around the top of the calendar. Dude said it’s easy enough to change the colors, so that’s what I did. It wasn’t trivial; the feedback loop took a few steps, but I’m pretty happy with the colors now.
Wordpress
Monday, September 26th, 2005I just installed wordpress from wordpress.org at Dude’s suggestion. It looks pretty cool. At first I was like, “ain’t no way I’m gonna revamp all my journal shit, so I ain’t installing fuckin’ wordpress,” but then I thought, “ain’t no way I’m gonna revamp all my journal shit, but I could start a non-journal blog on my site, just to keep up with the times.”