[25-09-2018]
Have you tried to organize your songs into play lists? And that’s what you have in your little iPod shuffle? “-All songs” “-Play list one” “-Play list two” “-Play list three” “-…” Man, this was driving me nuts. Fortunately, I found out that I could have “VoiceOver” turned on. After that happened, everything becomes way […]
[25-09-2018]
There are different ways to create a log in Java Recently, I have read quite interesing article regarding logs in Java – Logger to też jest biznes. I guess, it summarize experience of most of the people who work with Java code. I guess, most of us went throuhg different means of logging: System.out, Apache […]
[22-09-2018]
Modern Fortran Explained: Incorporating Fortran 2018 by Michael Metcalf and John Reid is already on the way! I am still waiting for it to arrive. It will be some sort of back to the future ;) The oldest “modern” language with new, fancy, features ;) This time, all in red ;)
[18-09-2018]
Sometimes, you need to go back in time. Recently, I had to develop simple log roller – I wanted to be system independent. Who would have guessed you could find a straightforward solution here ;) As for the roller itself, you can find it here
[11-09-2018]
I was playing with RStudio recently. And there was this annoying “issue” with plots. I am calling it “issue” as I am not quite sure whether this is a bug or a feature. The problem was that plots were drawn outside plot area. Axises were missing, title was too high, etc. I was trying to […]
[05-09-2018]
Recently, I was little bit surprised by the output of du command. It turned out that size of a directory can vary, heavily, depending on the filesystem that is used for storing files. I was examining the size of application at different locations and what struck me were the differences in size reports. # at […]
[04-09-2018]
You can find very comprehensive launchd tutorial here: http://www.launchd.info
[14-08-2018]
It looks like you have to be extra careful while working with recent releases of JDK for macOS. If you want to get JVM’s version (while running application) there is a simple way of doing it. public class Simple { public static void main(String [] args) { System.out.println(System.getProperty("java.version")); } } However, you have to be […]
[26-07-2018]
# Get the sources mkdir -p ~/opt/src cd ~/opt/src curl -O http://ftp.gnu.org/gnu/bash/bash-4.4.tar.gz tar zxf bash-4.4.tar.gz # prepare place for installation mkdir -p ~/opt/usr # build the stuff cd ~/opt/src/bash-4.4 ./configure –prefix=$HOME/opt/usr make make install # test the thing $HOME/opt/usr/bin/bash –version use it #!/Users/your_user_name/opt/usr/bin/bash echo $BASH_VERSION
[26-07-2018]
Colors can be source of real fight between people. There is even dedicated chapter related to colors in book “Jak przestałem kochać design” by Marcin Wicha. If you want people to kill you, try the list below whenever you want to apply small changes to web page UI ;) > colors() [1] "white" "aliceblue" "antiquewhite" […]
[26-07-2018]
If you are looking for well prepared, well delivered (unfortunately little bit outdated) video training on Unit Testing, make sure to watch this one In case you still struggle with some old Objective-C based code, this one might be a good choice when you want to move old stuff towards TDD approach. You can read […]
[26-07-2018]
Sometimes, you want to look at the command (where is it located), and then, you decide to actually take a look inside the file (e.g. script). Instead of copying and pasting location, do following which perl vi `!!`
[12-07-2018]
mkdir escapefromreality mkdir lib echo ‘package escapefromreality; import java.io.File; import org.apache.commons.io.FileUtils; import org.apache.commons.text.StringEscapeUtils; import org.apache.commons.text.StringEscapeUtils.Builder; public class EscapeJavaCode { public static void main(String[] args) throws Exception { try { String strJava = FileUtils.readFileToString(new File("escapefromreality/EscapeJavaCode.java")); System.out.println( StringEscapeUtils.builder(StringEscapeUtils.ESCAPE_JAVA) .escape(strJava) .toString() ); String strXML = FileUtils.readFileToString(new File("sample.xml")); System.out.println( StringEscapeUtils.builder(StringEscapeUtils.ESCAPE_XML11) .escape(strXML) .toString() ); } catch(Exception ex) { // remember […]
[06-07-2018]
I can see people around (on various blogs) saying “- I’ve never used Vim before, and it’s so cool. I really have to learn how to use Vim!”. Just Don’t. If you are using NetBeans, Visual Studio, Eclipse, keep it that way. Don’t put yourself into this illusive thinking that by starting using Vim you […]
[23-06-2018]
Everything should be kept as simple as possible, but no simpler. Teaching kids is a hard work. By teaching I mean not lecturing, but real, efficient and full of fun explaining how things work. I still remember one of my first computer languages – LOGO. This was Atari time and we have learned principles of […]
[23-06-2018]
If you like brain teasers, there is this cool game: TIS-100. It’s a game, where you are supposed to solve Assembler based problems. You have a reduced set of instructions: moving data, basic arithmetics, few conditional jumps, and only one register – ACC. Well, in fact there are two registers, but other one is only […]
[21-06-2018]
#!/bin/bash SESSIONS_NO=`vncserver -list | grep "^:" | tr ‘\t’ ‘ ‘ | cut -f1 -d’ ‘ | wc -l` if [[ $SESSIONS_NO -ne 0 ]]; then for no in $(vncserver -list | grep "^:" | tr ‘\t’ ‘ ‘ | cut -f1 -d’ ‘); do vncserver -kill $no done else echo "There are no running […]
[20-06-2018]
If you want to start your experience with Pegasus Workflow Management System I strongly advice to use ready to go Virtual Machine available for download. You can get it here. PegasusTutorialVM-4.7.4.ova After downloading it, open VMware Fusion and choose: File -> Import… and choose PegasusTutorialVM-4.7.4.ova (you can find it wherever you have stored it – […]
[12-06-2018]
I was supposed to say This is the end Beautiful friend This is the end My only friend, the end — The Doors, The End after seeing this beautiful picture during startup. As you may guess, it was gone. Everything was gone. Apart from data: “- Thank you! My dear Backup System, thank you. I […]
[04-06-2018]
If you remember old way of reading/writing streams between JVM and external process, you probably remember how tedious it was in the past (all these Gobblers, Threads, etc.). Today, it’s way more simple. All you have to do, is inheriting JVM’s IO. Let’s say you want to run simple Python code that reads something from […]