Aquas Home

Yet another private Blog

April 23rd, 2012

WordPress -> Tumblr

No Comments, Uncategorized, by Dave.

Just a “last update” before letting this blog die in the eternal infinity of the internet.
I am moving to tumblr. For now.

I’m kinda tired of updating the wordpress software, the themes and argue around with bplaced (who banned by account multiple times because i had some spam comments i didn’t see.) as my host.

Of course I could just move it to my private webserver, but naaah. I’ll try tumblr for now and reduce self-administration a bit.

 

Check it out – dave.cx (I hope this change motivates me a little to blog more.)

July 8th, 2011

Howto: Eclipse + Rsync

No Comments, English, Guide, by Dave.

Rsync plays a big role in my working flow:

Local Development -> Syncing to Development Server -> Testing

Opening a terminal all the time is just timewaste, so a better integration is necessesary.

 

I played a bit with the Eclipse settings and got it work :)

The external tool configuration did the job!

This will execute a static rsync whenever you hit “external tool run”.

 

But isn’t there a way to make this a bit more generic?

Of course there is. I put a run.sh in my projectroot, containing the rsync command

/usr/bin/rsync -vap /My/Project/Dir/ server:www/path/ --exclude "run.sh" --exclude ".svn" --exclude "*.pyc"

 

My externl tool config goes something like that:

 

The result is the same. You just don’t have to set up the external tool config all the time :)

Simply but a run.sh in your root and press external tool run.

 

To make the shortcut work, go to your keys config and change “run last external tool”. Make sure you removed the binding for “run”.

 

June 7th, 2011

The Spacesphere

7 Comments, Applications/Programme, Botting/Coding, English, Linux, by Dave.

After @AnnoyingNavi (http://davidcurado.com.br/projects/annoyingnavi/) and @DBZNappa it was finally time for me to create a Twitterbot

The idea came from Portal2s “Spacesphere”. The thing which always says “SPAAAACE”.

 

How did i do this?

I wrote a little python script :)

It simply searches every 5 mins the Twitter API and replies to everyone who wrote “portal2″. Due to the API Limit it can’t reach everyone, but many of them tho :)

// A little update here: 5 mins was way too fast. Lot of people got spammed again and again. To avoid this, i changed the time to 30 mins. For now.

 

// Another Update: SpaceSphere got suspended for violating the Twitter rules. I created a new account and completly rebuild the API Script to avoid spamming.

 

Technology

- Python

- Tweepy

- Linux (Cron)

 

Interested in the Script? Mail me.

 

Visit him here: http://twitter.com/#!/spacesphere

http://www.youtube.com/watch?v=BVn1oQL9sWg

 

June 1st, 2011

Mac OSX / Linux: Changing the Terminal Look & Feel

3 Comments, English, Guide, Linux, Mac, by Dave.

Hey !
Today i played a bit with the terminal settings.

I hate this:

Where the hell should i know where i am?! After a bit of googling i found out that it has to do with the “PS1″ var.

echo $PS1
gave me
\h:\W \u\$

Sounds good. h would be the machine name, followed by an “:”. W must be the working path, and u the user. After chaning the order, it indeed changed the text on a new terminal too!

PS1="\u@\h:\w\$ "
export PS1

did the job :) I have my user@machine:full working path$. That’s awesome! But still a bit ugly.
Now put it in your .bashrc / .bash_profile and you’re done.

 

But without colors it’s still a bit ugly, isn’t it?

Without long explanation, i added some color codes to my PS1 var:

PS1="\[\033[01;32m\]\u@\h:\[\033[00m\]\[\033[01;34m\]\w\[\033[00m\]\$ "

And the result…

 

Sexy! isn’t it?

April 29th, 2011

Gnome 3 vs Unity

No Comments, Applications/Programme, English, Linux, by Dave.

Today Ubuntu version 11.04 got released.

Well, it came all of a sudden with the Unity Desktop, not as expected with Gnome 3. So which one to choose? Both are pretty easy to install and bring a some fresh wind into the working flow.

Unity is shipped with Natty, Gnome 3 can be installed as a addition. I tested both a bit and want to share my opinion with you:

 

1. Installation

Both are pretty easy to install. Unity, as said before, is shipped with 11.04, so no installation is required. On 10.10 it is also possible to install them:

sudo apt-get install gnome3-session does the job for gnome 3.

sudo apt-get install unity does it for unity.

Gnome requires just the Gnome3-Session package, Unity therefore installs some addition.

Gnome3 gets the Point here.

 

2. Use Them

Both can be activated the same way: Log out and choose from the sessionbar ‘Unity’ or ‘GNOME 3′, whatever you want.

 

2.1 General Look & Feel

In Gnome 3, the bottombar got removed, the topmenus with all the application stuff are gone and a clock glances at the center of the Bar. A new button called “Activities” got added to the top left site of the screen.. When hovering or clicking it, the Gnome Shell pops up:

The Shell is the first really new thing to gnome3. It bundles all the Stuff you need together. For example it gives you a nice searchbar and some menus including all your Applications. Also it lists you all recent used Files and gives you overview of all your available desktops.

Accessing the Settings (Systempreferences & Co.) is not included in the gnome3 shell. They can be found when clicking on the Username.

 

Unity is a bit more childish. A colorful dock glances at the left side of the screen. The bottombar got removed and the Topbar a bit cleaned up. It is now used as Globalmenu for all your Applications (like on Mac). At the top left site, like in gnome 3, a single button got added. When clicking it, a Application launcher pops up. Every Applicationsymbol is big and very colofull, like it’s optimized for a touchscreen.

Settings are not included in the overlay. They can be found when clicking the “turn off” button.

 

2.2 Working Flow

Well, both are very brilliant Desktop Systems, but when working with them, they aim different persongroups.

Due to the missing bottombar, you can’t see your active Windows. You always have to open the Gnome Shell. Even when switching between Applications, you need the shell (or just juse Tab + alt). Notifications (like new message) are shown on the bottom site of the Screen. Starting Applications became really quick:  Just open the shell, type your Appname in the bar and hit enter. Done. As alternative, you can expand the application tab and just scroll through your apps.

Playing with multiple virtual desktops is brilliant: You can add as many desktops as you want (out of the shell) and delete them the same way. Just with a Plus and a Minus button. Moving windows to other desktops can be done with the shell too.

 

Unity has it’s dock. Open applications are marked with a arrow and clicking them brings them to the top. Applications can be started as easy as in gnome. Just open the overlay, type in your appname and hit enter. Done. Browsing through your applications is easy. Each app is sorted by it’s category which can be used as filter. When having a app in fullscreen, the dock hides itself. If the mouse hits the left site of the screen, it pops up again.

Unity comes with 4 virtual desktops, which can be switched, as in gnome2, with strg + alt + arrow. When using unity, you need to know lots of shortcuts. For example windows button + 1 will start the first application in your dock.

 

2.3 Eyecandy

I’m a big fan of effects and beautiful designs. So this plays a big role for me.

Gnome 3 is made simple. Lots of the menus have rounded edges, the shell a nice design and applications are using a fadein animation (to popup). Minimizing them will make them fly out of the screen. When opening the shell with hovering of the button, a few waves popup.

 

Unity is built on compiz, so you can expect a bit more. Each window has some strong shadows (like on mac again). Minimizing make them fly to the dock, maximizing lets them pop out of the background. The scrollilng bar got really sexy. The overlay has a really nice design. Big symbols are great and  the search bar feels pretty smooth (it has a loading icon!). You can maximize the overlay to fullscreen to give a bigger look of all your apps. Due to the global menu, everything looks cleaned up a bit more. Even the close button is (on fullscreen) on the topbar!

 

3. Conclusion

Both are really great desktop systems! Gnome 3 targets a bit more ‘nerdier’ people. You need to tab through your apps or using the shell again and again, which becomes pretty annoying. Having apps on fullscreen is a bit buggy, you can’t open some of the menus or rightclick (for example in netbeans).

When using just one or two windows, the clean environment takes advantage. No other apps can take your attention, because you just don’t see them (except the notification). A pity is, that you need you’re mouse a bit too much, for example when browing through your applications.

 

Unity therefore targets more the ‘basic’ users. It looks great and has lots of functionality. It nearly feels like your working with a mac! That’s great! The selfhiding dock helps you concentrating on your work. To take full advantage of unity, you need to know the shortcuts. But once they are learned, you can work really really fast and nearlyl don’t need the mouse again!

 

New Users will feel lot more comfortable with unity then with gnome3 and even professional users can take with shortcuts the full unity power.

I like both but unity is just more my thing. It looks great and does everything i want.

 

- Thanks for reading!

April 27th, 2011

XNA and osu!Dance

No Comments, Applications/Programme, C#, Games, Windows, by Dave.

Hmm, quite 2 weeks ago, i started playing with Microsofts XNA Gamestudio.

At last, i got an idea what i could create (For Practising): osu!Dance

Well, there is this Game called osu (http://osu.ppy.sh) and another game called Stepmania (http://www.stepmania.com/)… Why don’t put them together?

osu! has already a Taiko and a Catch the Beat Gamemode. A DDR / Stepmania Gamemode would be the perfect addition. (Not build in, of course.)

 

 

Oke let’s see what we have:

Stepmania has 4 Arrow Rows. Arrows spawn in these rows during the whole Song at a certain Milliseccound. It is possible to get 2 or more Arrows at the same Time…

osu! has it’s own Fileformat called .osu. So i have to take that one. Beats can spawn at different Coordinates on the Screen at a certain Milliseccound. It’s not possible to get more then one at the same Time (would be impossible to click). In osu! you can add Hitsounds on your Beats. There are 3 of them: Whistle, Clap and Finish. If we add the “no Hitsound” hitsound to them, we have 4. Would be ok.

 

So what to take?

Take the position of the Beat to get the Row where the Arrow should spawn, or the Hitsound? :o  Or maybe something different? How to solve that Problem with more Arrows at the same Time? Maybe two different Hitsounds on a Beat? But then the ‘normal Hitsound’ Arrow can’t spawn at the same time as a other does… Maybe with the new Combo Thing?

 

So many Questions…

 

Well, I’m out here, gonna try to code a Prototype and see where it ends.

Stay tuned :)

April 10th, 2011

A Restart

1 Comment, Life, Linux, Mac, Windows, by Dave.

After years of work, it’s time: A complete OS Reinstallation.

Goodbye OS X, goodbye Ubuntu, Goodbye Windows and Hello Fresh installed PCs <3

 

Reinstalling all my Apps at the Moment, but it feels great! No laggs, fast boot and everything is clean.

(I even take the Time and clean my Room. Free Space really helps with the Concentration.)

 

Let’s see how long this will stay.

 

April 5th, 2011

Simple PHP Frontpagecontroller

No Comments, Applications/Programme, English, PHP, by Dave.

Heya!

i love coding with the MVC Pattern, especially in PHP. But i hate using for every simple crap i do a whole Framework.

Here’s a little Walkaround i’ve just created. It simply implement the Frontcontroller Pattern. As orientation, i took the Zend Standards.

 

Download my Zip archive and unpack it anywhere you want. It includes a simple index.php, a FrontpageController Class, a 404.html and the controller/ Folder.

As you can guess, all your controller goes inside the controller Dir.

 

Example:

Let’s create a File called testController.php in your controller/ Dir. The Name for Controllers are always <name>Controller.php. Open it up and create the Class Sceleton:

1
2
3
4
5
6
7
<?php
class testController
{
  public function init($request)
  {
  }
}

The init() Function is called, right after the Controller got created. It gives you all the POST and GET Requested Data inside the $request array. $request['post'] contains all the post stuff, $request['get'] all the get Stuff.

 

Actions are, like in Zend, defined by their name + Action.

1
2
3
4
5
6
7
8
9
10
11
12
<?php
class testController
{
  public function init($request)
  {
  }
 
  public function helloAction()
  {
    echo "Hello World Action";
  }
}

To call your Controller, open up the Browser and navigate to index.php?controller=<yourController>&action=<yourAction>. (I was too lazy to mod_rewrite it). In my example: index.php?controller=test&action=hello

If the Controller test wasn’t found, the 404.html will be executed. Put your 404 Template there :)

 

Hope it helps a bit.

Download:

April 4th, 2011

A new Home… ~

4 Comments, Life, by Dave.

Finally i did it!
I deactivated my old Blog (aqua5.wordpress.com) and imported some of the Posts to this one.
Installed the awesome IStudio and started creating a new Home here.

Tabs aren’t set up yet, but it’s just a matter of time.

Thanks for Visiting! :)