Posts Tagged ‘wallpaper’

2011w22

Sunday, June 5th, 2011

SSH tunnelling

This Friday I finally got a valid reason to dig into how one sets up an SSH tunnel between two machines. The reason was that I was sitting at the new FFKP office lulzing about with razor, and found myself needing to test some PHP I had been working on.

So I was not at home, I am not stuffing Apache and PHP and MySQL onto my netbook just to do web dev stuff, so I needed contact with my “server” back home.

The slight problem being that since it is for development use only, I don’t expose its Apache to the Internet, only to the local network. SSH is another matter altogether.

So I thought that it shouldn’t be impossible to set up what I wanted, i.e. from my netbook, type in localhost:8080 (or whatever port number floats your boat) and be routed through the tunnel to the server.

It turns out there was this really neat write up on how to do it, already available, and even better, it was really simple:

ssh -f <user>@<remote-host> -L <local-port>:<remote-host>:<remote-port> -N

-f makes it a background process, -L tells SSH we want a tunnel, -N tells SSH that we aren’t trying to execute a command.

This is something I might even begin to remember :)

wmfs

wmfs, or window manager from scratch, seems like an awfully nice little tiling window manager.

Unfortunately I haven’t gotten the time this weekend to play with it, but perhaps a little later today?

I was warned on diaspora that there is a pretty huge-ish performance-related bug in the code right now, and since I haven’t tested it yet I can’t make any recommendations, but from the very superficial (and that will hopefully soon change) observation of the documentation, it seems like it could be a wmii-replacer.

Links

As I am attempting to learn git, I soon came to the conclusion that the best way to learn it would be to use it.

After all, the basics are not extremely different from mercurial, and while most of my projects remain single-person-projects, the basics are more than enough for me.

So I hereby solemnly swear that the next little project I start, whatever it may be, will be versioned using git instead of mercurial.

My foray into the git world also meant that I started looking at the two largest git hosting solutions (both of them free as in beer, and one free as in freedom, github and gitorious.

In doing so, I ran through the list of hosted projects, and there is so much cool stuff out there to test, and try, and learn, and play with… so many things, so little time.

  • z – jump around, which studies your usage of the various directories on your machine, learns, and then makes it easy to jump to “popular” directories easily
  • yajl, Yet Another JSON Library, and I likes me sum JSON
  • Underscore.js, a javascript “utility-belt” library
  • wormhole a jQuery plugin, which for most parts would probably be more fun than useful, but it seems to have been initially written to scratch an itch
  • Backbone.js, which I had already read about here and been wanting to play with it ever since
  • Microjs, a site for finding the javascript framework you need, in order to do what you want
  • Raphaël, a javascript library for working with SVG
  • TMS, a Temporary Mail Server, written in Python, this just must be useful for testing and debugging mail-stuff
  • tablib, another Python module, this one for parsing and converting tabular datasets between various formats, (i.e. csv, html, json, ods, xls(x), yaml)
  • twotwodo, a personal 2do list in the browser, using jQuery (javscript) for logic, and cookies for storage (so it is local to the machine, with no shared storage back-end, which can be good sometimes
  • protovis, nice javascript visualization toolkit

Two other links I find worth mentioning are:

FamFamFam has a rather nice-looking icon set (Silk), licensed using CC By 2.5 or 3.0, which I might finally get to use in a project of mine (haven’t really gotten a chance since it was a long time since I did any serious web programming.)

Finally, a blog which has helped me greatly in understanding various things is BetterExplained which has now released something new which they call aha.betterexplained.com, and I will follow this with great interest.

Revelation of the week

The one real “aha” moment this week was Friday afternoon, when Grégoire showed me that it was possible to add people from other diaspora seeds by searching for their <username>@<other-seed>.
That was good news since I was rather bummed out about razor and greg had set up shop at diasp.org leaving me with relatively few contacts on “my” seed.

Other than that, to be honest, this week has been pretty boring. I did get a whole lot done in timetrack yesterday, and found a deeper love for grep‘s -A flag, and I have been doing some serious thinking about writing my own “makefile blogging”-thingy.

Friday night right before falling asleep I got the idea to write a little script which would pick a wallpaper at random and set that as the active wallpaper at startup. Since I use wmii, and wmii uses xloadimage, given a path, I could simply put all my wallpapers in a directory and have the script symlink one at random on start up.

Galactifying my desktop

Saturday, May 16th, 2009

I stumbled across a blog post today which described how to “insert” a terminal onto your Compiz desktop. Naturally I became all giddy over the idea since all these tv-shows, which present computers where the desktop is alive with various kinds of fictional data which flow by, has totally corrupted me, so I got to work setting it up per the instructions.

My previous wallpaper (white and black, and various shades of gray) didn’t make font-color selection easy, which ended up with me replacing the old wallpaper, with the beautiful Tricia Helfer (wallpaper).

Which got me thinking further, that I could do something funny with this terminal, and since my desktop was already taking on a strong feel of Battlestar Galactica (well, number six at least) I could have the terminal reinforce that feeling.

So, terminal font-color: red. Then I had another thought. Inside the .bashrc configuration file there is a small snippet of code which sets the PS1 variable to various things. Pontus has modified his, and helped me modify my, PS1 variable so that each terminal prompt now reads:

[username] [pwd]
$

Therefore it shouldn’t be that hard for me to modify it to look for this particular terminal-instance and output an altogether different prompt, say along the lines of:

By your command
>

This turned out to be a rather hard nut to crack actually. I figured I could write a shell script which would launch the terminal, with a correct set of parameters, and one of these parameters, in turn, would be another shell script to execute upon creation of the terminal window. The first shell script could then be called upon by the session manager at login.

That was the theory anyway. Actually getting it to perform all these things was less than easy. The shell script to be executed by the terminal wouldn’t conform (although this might have been my own ignorance putting a stop to it).

I won’t drag on about all the various ways I tried to fix this, in the end Pontus arrived and saved the day ;D

His solution: create a clone of the .bashrc file, change the PS1 variable modification in it to whatever I wanted (“By your command”), then have the session manager execute the following command:

gnome-terminal --window-with-profile=trans -x bash --rcfile ~/.nrsixrc

(where .nrsixrc is the cloned .bashrc file, containing the modified PS1 variable)

For interested parties, the interesting line in .nrsixrc is this one:

PS1='\nBy your command\n> '

And here’s the result:

by_your_command1 Oi! Stop ogling the b00bies and focus your attention at the upper left corner! I don’t know about you, but I find it pretty neat.

The one thing I have a hard time figuring out however, is why the terminal won’t either die, or recover, if I by accident forget myself and try to close that terminal. It will just “hang” and my two options at that time is to either use xkill (which coincidentally will also kill the terminal with which I initialize xkill) or do a killall gnome-terminal. None of these alternatives are especially attractive, and I can for the live of me not figure out why that is. But for the time being it will do just fine.