Home » Posts tagged "Maximus" (Page 2)

Tmux scripting

I’ve been using tmux for a while no to manage my terminal sessions. One thing I kept on doing was after starting tmux that I would be manually adding windows, splitting them and issuing commands in each pane such as echoing the contents of log files with tail -f.

I had heard about scripting tmux before but never really looked into it yet, until now. Since I solely use the key bindings I had to figure out how to issue these commands without them. Turns out this is pretty easy and it’s documented in the man page.

Here’s an example of a tmux script I just added to Maximus-Web.

#!/bin/bash
SESSION=$USER

tmux -2 new-session -d -s $SESSION

# Setup a window for tailing log files
tmux new-window -t $SESSION:1 -n 'Logs'
tmux split-window -h
tmux select-pane -t 0
tmux send-keys "tail -f /vagrant/maximus.log" C-m
tmux select-pane -t 1
tmux send-keys "tail -f /vagrant/maximus-worker.log" C-m
tmux split-window -v
tmux resize-pane -D 20
tmux send-keys "tail -f /vagrant/maximus-mojo.log" C-m
# Setup a CoffeeScript compiler/watchdog pane
tmux select-pane -t 0
tmux split-window -v
tmux resize-pane -D 20
tmux send-keys "coffee -o /vagrant/root/static/js/ -cw /vagrant/root/coffee/" C-m

# Setup a MySQL window
tmux new-window -t $SESSION:2 -n 'MySQL' 'mysql -uroot'

# Set default window
tmux select-window -t $SESSION:1

# Attach to session
tmux -2 attach-session -t $SESSION

You can view the (up to date) origin of this script at GitHub.

So what exactly does this script do?

  1. It creates a new tmux session.
  2. It creates a new window called ‘Logs’ which is split into a grid of 2×2 with the bottom 2 panes being smaller in size (height). In every pane a command is executed. For example in pane 0 the command tail -f /vagrant/maximus.log gets executed.
  3. A second window called ‘MySQL’ is created which runs the mysql -uroot command.
  4. Then we switch back to the first window (actually second, as tmux pane numbers start with 0) which is the window that shows us the contents of these log files.
  5. Finally we attach to the tmux session.

The added benefit of this small script is that from now on all I have to do is run it and my tmux session will be configured for this specific project (Maximus in this case).

I’ve also found some other useful tmux resources as well which are listed below:

HTML2PDF Web Service - Convert HTML to PDFUsing HTML2PDF Web Service you can design in HTML and CSS, and convert the resulting page to PDF. Free trial available!

Any interest in a module manager for Monkey?

Having done a module manager for BlitzMax called Maximus I’ve received one question several times: will you also make a module manager for Monkey?

My answer at the time was ‘no’. Simply because I didn’t use Monkey nor was I planning to. To be honest, I’m still not planning on using Monkey myself. But there are lots of people who do use Monkey and with the (my assumption) amount of available modules I think Monkey would benefit from a module manager.

Sure, Monkey has a module page which lists some modules, but that’s just a listing. When in time there are more and more modules being released for Monkey it’ll become more tedious and painful to manage all your (installed) Monkey modules.

So I’d like to know if Monkey users have any interest in a module manager which for users will allow them to easily install and update modules. For module authors it’ll be an easy way to publish a module to a central repository (like Maximus does).

That way everyone can benefit from a central repository hosting these modules.

Why am I asking if there’s any interest in this? I’ve got some ideas and I think it’ll make up for a nice summer project. I’m interested to hear peoples opinions on this which I can use to decide to start it all up.

——————————————————————————————————————————

This is a cross post from a topic I started at the BlitzMax forum. Which has also been copied to the Monkey forum. I decided to put it on here as well.


Maximus 1.1.1 released

Earlier today I released Maximus 1.1.1. Maximus is a BlitzMax module manager. With Maximus it’s possible to easily install and update BlitzMax modules which are provided by 3rd party module developers.

Version 1.1.1 improves the usability for the GUI users. If maximus-gui can’t find your BMXPATH it will now present you with a directory dialog in which you can select your BlitzMax installation directory. Another improvement is in communicating back to the user when a certain action has finished.

Binaries for both Windows and Linux are available from maximus.htbaa.com/client as well as an installer for Windows.


Maximus 1.1.0 released

Maximus has just reached milestone 1.1.0. Maximus is a module manager for BlitzMax. Its purpose is to ease management and installation of BlitzMax modules, giving the developer more time to spend on developing, and not manually installing and downloading modules and their dependencies.

The most notable new addition to this release is a full fledged graphical user interface in the form of Maximus GUI. This makes Maximus a lot more user friendly for those who aren’t too keen on a command line interface (CLI). Maximus still comes as a CLI application, but for those who prefer a GUI there’s maximus-gui to use.

Users who want to upgrade to 1.1.0 and make use of the GUI version (as well as some other minor changes) should download the Maximus client.

Also, for this release I would like to thank Jens for providing me with version 5.4 of Logic GUI. Maximus GUI has been build with it and couldn’t have been developed this quickly without it. If you’re a BlitzMax programmer that uses MaxGUI you should, without question, buy Logic GUI.

Maximus GUI

I’m currently working on a Graphical User Interface for Maximus after receiving several requests for it. I’m building it with Logic GUI 5.1 and the basic functionality is already in place. The whole GUI is based on MaxGUI.

Here’s a picture of it running under Windows 7:

Here’s a picture of it running under Xubuntu 11.04: