So today I bumped into https://mattermost.eclipse.org
This is like slack (sort of modern IRC) but open source.
I also found that is has a Linux Native client:
To get it to work, I just downloaded it, extracted it and ran the included “Mattermost” binary.
Connecting it to Eclipse was mildly counter intuitive.
When faced witht he ‘Teams’ dialogue, I thought I had to type in Name OR URL, but it turns out you type in both. The name is just an alias ex “Eclipse”, and for URL you put in:
After you joined, you can find some channels to join. In my case:
Now when someone wants to chat with you, you can give them the URL:
I have a pci-e based storage working at close to 1000mb/s (Mac Pro). I do lots of GCC/make compilations. What if you want things even faster than with a pcie? Then ramdisk is your friend.
- With Regular SSD: 2 minutes and 37 seconds (on my co-worker’s machine w/Fedora)
- With my pci-e disk: 2 minutes and 35 seconds (my Mac w/Fedora)
- With Ramdisk: 1 minute and 15 seconds (my Mac w/Fedora)
So we have ~50% improvement in compilation time. For me, it’s worth the effort.
To set one up: Follow this guide
sudo mkdir /mnt/ramdisk
sudo mount -t tmpfs -o size=2G tmpfs /mnt/ramdisk
To see how much of it is still available:
You might want to write an rsync script to copy folders onto the ramdisk that you want fast-access to. Ex a git repo that you compile frequently, some application binaries that you run. But obviously avoid putting data onto the disk.
This article explains how to install a package to add a right-click menu to open the terminal from Nautilus.
I find myself copying the path of a folder quite a lot. (mostly to use in Terminal)
Getting hold of the path is somewhat cumbersome thou.
Here is a 5 minute guide on adding a context menu option to do the job for you:
The deal with SWT is that you geneally create a jar that runs nativley on a single platform.
This means that if you want to create an application that works on windows/mac/linux in both 32/64 bit, then you need to compile/package jar 6 files and distribute one file per platform.
This is very cumbersome for small projects where you want a single file that runs on every platform.
The solution is to bundle the jars and load them dynamically with Mchr3k’s SWT Jar loader.
The next challenge is how to get this business working in Eclipse. Well, there is a guide for this.
Basically, you create a project with the name “HelloWorld”, you have to
download the swt jar’s and rename them to match os/version and then you
have to add a build.xml file. This takes about 30 minutes.
I followed the guide and actually got it to work.
To make life easier, I created a git-repo with a template project. You can clone it and start a SWT project with that.
I used swt 4.4 in the project. In the future you might want to update it. To do so:
- Download the latest jar files from Eclipse’s download site .
- click on the most recent version, e.g ‘4’4,
- then search for “SWT Binary and Source”
- download the Windows 32/64 Versions, linux x86/x86_64/GTK+ versions, Mac OS X versions
- open the archives and extract the ‘swt.jar’ files
- match the jar files to the jar files in the project ./gui folder. But append new version. (4.4 -> 4.x)
- Edit the build.xml file,
- change the “swtversion=”4.4″” to the newer version.
- Also update <fileset dir=”./gui” includes=”swt-*-4.4.jar” />
You can run the generated jar file with ‘java -jar crossSWT.jar”:
Here I had to launch the jar with a special paramater:
java -jar -XstartOnFirstThread crossSWT.jar
I don’t use windows :-), but rumors has it works on windows also.
When developing SWT widgets, we need to test them on various GTK versions to ensure backwards compatibility.
There are some tricks and perks involved.
Get Gtk sources
Configure Eclipse to use the gtk you compiled
- Edit your run-configuration of the code snippet that you want to run.
- Navigate to “Environmental Variables”
- Click on “Add”, type in:
path: #your_compiled_gtk //e.g /home/lufimtse/src/gtk3_10/gtk/.libs
- Name your configuration (I reccomend appending gtk version, e.g “ControlExample (g3-10)”)
- It should look something like this:
- Now run the configuration and you should see your application rendered in gtk*.*.
You may note that it won’t have any styling:
- The lack of styling is due to the fact that there is no theaming.
Now sometimes you might want the compiled gtk to use your system theame to see impact of themes on looks.
To do so, do as above except run the configuration as following:
./configure --prefix=/usr --sysconfdir=/etc --enable-broadway-backend --enable-x11-backend --disable-wayland-backend
In the interest of comparison: (left native look, right bare look)
- Lastly, in your source code, you might want to verify that you’re running the compiled gtk and not your own. Use this line of code:
System.out.println("GTK Version: " + OS.gtk_major_version() + "." + OS.gtk_minor_version() + "." + OS.gtk_micro_version());
I often need to pipe commands into the clipboard. E.g when I type “pwd” to get the present working directory, I would normally select the line and then copy it into my clipboard.
After a while this became tedious so I wrote a script to make life easier. I created a bash script called “toclip”…