Cool Images

Wow, this guy has really got some nice work to show! His work reminds me of Salvador Dali, who's work has been a real inspiration to me.

Since I am also a big fan of Tetris I linked one of Erik's works here. Tetris huh, I think my mind got seriously broken in my early teens when I was practically always playing it. I sometimes still see tetraminos everywhere I go.

Sunday, 26 July 2009 at 08:33 | /misc | permanent link to this entry

Turning 0x23 Today

Yep, today is my birthday. :-)

Thursday, 23 July 2009 at 12:09 | /personal | permanent link to this entry

Micro Snake

Wow, it would seem I've started a series of miniature games. Yesterday I released Micro Snake on Freshmeat. Like last time, it's a very small implementation with as few dependencies as possible, made for playing on dumb ASCII/ANSI vt100 terminals.

The project is a refactor of an original DOS game by Simon Huggins. Thank you Simon for allowing me to reuse your work!

Like most code I publish these days it's under the ISC License.

Download the code and try it out!

Thursday, 23 July 2009 at 12:07 | /hacks | permanent link to this entry

HowTo Resize an Irssi Session in Screen

Press Ctrl-a Shift-f

Dead. Simple.

Tuesday, 14 July 2009 at 23:27 | /unix | permanent link to this entry

ANSI Escape Sequences

Here follows a listing of ANSI escape sequences that I use in some of my various projects. Most of the contents of this post is a rip off an original by Will Guaraldi Kahn-Greene.

Cursor Controls
\e[#;#H or \e[#;#f moves cursor to line #, column #
\e[#A moves cursor up # lines
\e[#B moves cursor down # lines
\e[#C moves cursor right # spaces
\e[#D moves cursor left # spaces
\e[#;#R reports current cursor line & column
\e[s save cursor position for recall later
\e[u Return to saved cursor position
Erase Functions
\e[2J clear screen and home cursor
\e[K clear to end of line
Color and Text Formatting
\e[#(;#)m Text formatting sequence numbers are separated by a ; and ends with an m. The # is one of the following.
Attributes
0 normal display
1 bold
4 underline (mono only)
5 blink on
7 reverse video on
8 nondisplayed (invisible)
Foreground Colors
30 black
31 red
32 green
33 yellow
34 blue
35 magenta
36 cyan
37 white
Background Colors
40 black
41 red
42 green
43 yellow
44 blue
45 magenta
46 cyan
47 white
Examples
\e[0;30m Black
\e[0;34m Blue
\e[0;32m Green
\e[0;36m Cyan
\e[0;31m Red
\e[0;35m Purple
\e[0;33m Brown
\e[0;37m Gray
\e[1;30m Dark Gray
\e[1;34m Light Blue
\e[1;32m Light Green
\e[1;36m Light Cyan
\e[1;31m Light Red
\e[1;35m Light Purple
\e[1;33m Yellow
\e[1;37m White
Screen Modes
\e[=#;7h or
\e[=h or
\e[=0h or
\e[?7h
put screen in indicated mode where # is:
0 40 x 25 black & white
1 40 x 25 color
2 80 x 25 b&w
3 80 x 25 color
4 320 x 200 color graphics
5 320 x 200 b & w graphics
6 640 x 200 b & w graphics
7 to wrap at end of line
\e[=#;7l or
\e[=l or
\e[=0l or
\e[?7l
resets mode # set with above command

For more details on VT100 and ANSI see vt100.net or ascii-table.com.

Monday, 06 July 2009 at 13:50 | /programming | permanent link to this entry

Some neat Code

Saturday, 04 July 2009 at 21:58 | /misc | permanent link to this entry