Archive for Şubat 2009

javascript dark color scheme for Geany
Şubat 4, 2009

Geany is a clever and lightweight editor. I’ve been using it recently for small projects. I was using the dark color scheme (http://code.google.com/p/geany-dark-scheme/) for my stuff, but I noticed today that javascript support is missing, when I needed to do some js work.

Here is the javascript dark color scheme file. I’ve basically copied the original file from /usr/share/geany/filetypes.javascript to ~/.geany/filedefs/ beside other dark-scheme files, and copied color definitions from C dark-scheme file.

# For complete documentation of this file, please see Geany's main documentation
[styling]
# foreground;background;bold;italic
default=0xffffff;0x1E1E1E;false;false
commentline=0x747474;0x1E1E1E;false;false
comment=0x747474;0x1E1E1E;false;false
commentdoc=0x747474;0x1E1E1E;false;false

number=0x7ECDFF;0x1E1E1E;false;false

word=0xFFCB4F;0x1E1E1E;true;false

word2=0xAAFF57;0x1E1E1E;true;false

string=0xA18651;0x1E1E1E;true;false
character=0xA18651;0x1E1E1E;true;false

uuid=0xffffff;0x1E1E1E;false;false

preprocessor=0xB2A886;0x1E1E1E;true;false

operator=0x98BAC5;0x1E1E1E;true;false
identifier=0xffffff;0x1E1E1E;false;false

stringeol=0xffffff;0xffffff;true;false

verbatim=0xDBB260;0x1E1E1E;false;false

regex=0xAAFF57;0x1E1E1E;false;false

commentlinedoc=0x747474;0x1E1E1E;false;false
commentdockeyword=0xffffff;0x1E1E1E;false;false
commentdockeyworderror=0x747474;0x1E1E1E;false;false

globalclass=0x7EB35B;0x1E1E1E;false;false

[keywords]
# all items must be in one line
primary=abs abstract acos anchor asin atan atan2 big bold boolean break byte case catch ceil char charAt charCodeAt class concat const continue cos Date debugger default delete do double else enum escape eval exp export extends false final finally fixed float floor fontcolor fontsize for fromCharCode function goto if implements import in indexOf Infinity instanceof int interface isFinite isNaN italics join lastIndexOf length link log long Math max MAX_VALUE min MIN_VALUE NaN native NEGATIVE_INFINITY new null Number package parseFloat parseInt pop POSITIVE_INFINITY pow private protected public push random return reverse round shift short sin slice small sort splice split sqrt static strike string String sub substr substring sup super switch synchronized tan this throw throws toLowerCase toString toUpperCase transient true try typeof undefined unescape unshift valueOf var void volatile while with

[settings]
# default extension used when saving files
extension=js

# the following characters are these which a "word" can contains, see documentation
#wordchars=_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789

# if only single comment char is supported like # in this file, leave comment_close blank
comment_open=//
comment_close=

# set to false if a comment character/string should start at column 0 of a line, true uses any
# indentation of the line, e.g. setting to true causes the following on pressing CTRL+d
#command_example();
# setting to false would generate this
#    command_example();
# This setting works only for single line comments
comment_use_indent=true

# context action command (please see Geany's main documentation for details)
context_action_cmd=

[build_settings]
# %f will be replaced by the complete filename
# %e will be replaced by the filename without extension
# (use only one of it at one time)
compiler=
run=
Reklamlar

building a living room pc: remote audio with mpd + gmpc
Şubat 3, 2009

I built a headless living room pc a few weeks ago. Chose a Q6600 2.4 quad-core with 4gb ram, an HTPC case, microatx motherboard, and on board video 🙂 My main reasoning was to use it for music, some virtual machines, and playing around, although I couldn’t spend much time it until now..

At first I moved most of my music archive on my laptop to it, and set up NFS for my laptop, configured autofs on my laptop and managed it to try mounting only when I’m on my home LAN, so I can continue to use rhythmbox. Today I found the time to configure an audio server on the quadcore, and have it remotely controlled from my laptop.

The solution’s name is mpd; music player daemon [http://www.musicpd.org]

MPD runs as a daemon on the server, with local access to all music files. You can control it remotely with various clients (also there are PHP clients that can be installed on the same server with MPD and allow HTTP access).

As for clients, first I tried an ncurses client ncmpc, which I found to be useful at first. Then I tried various GNOME clients, one is Ario, the other is Sonata. When I gave up my hope on both of them and just let it go with using one of them; I discovered gmpc on a blog post.

Well, mpd + gmpc is what you need if you want to have a remote music server on your home LAN.

Note that mpd is not a streaming solution, files exist on mpd server, and client just controls the server on what to play next. But don’t think the daemon is dumb; daemon holds playlist and everything you need, you can just open a client, configure what you want to listen, and close it, and you’ll have the music playing.