[30-11-2018]

yank the line

Whenever you need that line – without leading spaces, and without new line character: ^y$.


[29-11-2018]

retreat


[26-11-2018]

indent

> indent -npsl -bli0 -brs -br -brf -bs -cdw -ce -cs -i2


[23-11-2018]

xz

# This one works for macOS > tar zxf archive.xz


[23-11-2018]

macOS – disable notifications

I am not sure who’s idea was it to force people to use notifications. The first thing I always do (after installing macOS) is going to System Preferences -> Notifications -> Turn on Do Not Disturb. There is no other way, unless you want to be disturbed every, freaking, minute :)


[20-11-2018]

/dev/ufs/ no such file or directory

I was struggling for quite some time with my USB backup drive attached to NAS server based on FreeBSD. From time to time, during boot time, I was getting error /dev/ufs/usbstorage no such file or directory and machine was going into single user mode. It turned out, that adding late inside /etc/fstab was enough to […]


[18-11-2018]

NetBeans – make macOS installer beautiful again

It’s fairly easy to make macOS like Application based on zip file distributed by Apache. All you need to do is to create structure like this: NetBeans.app |– Contents | |– Info.plist | |– MacOS | | `– NetBeans | `– netbeans.content `– Icon\r and make sure to run actual application inside NetBeans wrapper script […]


[31-10-2018]

vsftpd and nasty ‘vsftpd failed – probably invalid config.’ error

If you have encountered this sort of issue * Starting FTP server vsftpd * vsftpd failed – probably invalid config. try this one. Inside /etc/init.d/vsftpd replace these lines start-stop-daemon –start –background -m … n=0 while [ ${n} -le 5 ] with this one start-stop-daemon –start –background -m … sleep 1 # this one, will remove […]


[29-10-2018]

NetCAT – NetBeans 10 and testing FTP connections
– Docker based

That’s yet another post about making live easier through Docker. This time, I am focusing on FTP. Testing FTP features in PHP based project requires running FTP server. And, let’s be honest, this is a place where you can face some issues. First of all, you have to have FTP server running, you have to […]


[26-10-2018]

CLI, diff, and something like meld

If you work with remote machines, and you need to take a brief look at some changes in files it might be really painful. If need a quick glimpse into differences between two files, you can always use diff. diff file_a.txt file_b.txt 3c3 < It’s alive! — > And his name will be forty and […]


[21-10-2018]

NetBeans – profiler test pack (Docker based)

If you want to test remote profiler in NetBeans, it might be quite a struggle. Main source of the problem lays in the fact, you need remote code running. You have few options here: locally started code (you can access it via localhost), Virtual Machine with all the components (JDK, source code, profiler pack), dedicated […]


[19-10-2018]

NetBeans and arbitrary JDK version in macOS

By default, macOS picks up Java version based on highest number that is located here /Library/Java/JavaVirtualMachines. This is quite painful in case you have multiple versions of Java and willing to switch back and forth. You can, of course, export JAVA_HOME like this > export JAVA_HOME=$(/usr/libexec/java_home -v 11) > export PATH=${JAVA_HOME}/bin:${PATH} You can disable Java […]


[18-10-2018]

Thunderbird – calendar times are mixed up (Lightning add-on)

I was struggling with Lightning plugin for quite some time. The reason was that I was getting invitations with mixed up times. Sometimes, they were correct, sometimes, completely crazy. Eventually, it turned out that Thunderbird has it’s own time zone settings. Who would have guessed? If you fix this one, all the meetings will start […]


[18-10-2018]

JAR files without version in file name

are so painful. The pain comes from the fact that you have to extract MANIFEST.MF to learn what’s inside. > unzip -qc log4j.jar META-INF/MANIFEST.MF or > unzip -p log4j.jar META-INF/MANIFEST.MF or > vi log4j.jar


[17-10-2018]

Parsing for size with prefixes in C

At some point, I have decided to pass size of the log file created by stdroller. I thought it will be hard as hell to pass SI prefixes. I was all wrong. It’s a piece of cake to parse the value with format like: ./stdroller –limit=10G or ./stdroller –limit=1k, etc. All you have to do […]


[17-10-2018]

Just for the record, one can use CLI to create big files

If you need a huge file, and you need it fast # macOS/linux dd if=/dev/zero of=bigfile bs=1024 count=1048576 # macOS mkfile 1G bigfile # linux truncate -s 1G bigfile # linux fallocate -l 1G bigfile


[13-10-2018]

NetBeans 10 on macOS

At the moment, you can’t get nice looking, full-blown installer of NetBeans for macOS, yet. However, running it is fairly easy. Just make sure you have recent JDK installed – just get it from here: JDK 11 Note! Please, make sure you can survive with new licensing model preparred by Oracle. It’s quite different comparing […]


[12-10-2018]

NetCAT 10.0 – it’s already rolling

In case you haven’t heard about NetCAT program, yet, take a look here: NetCAT 10.0. NetCAT is a community acceptance testing initiative targeting NetBeans. If you work with NetBeans a lot, I guess this is the best place to support the team behind the product, and (as well) it’s the best place to get the […]


[12-10-2018]

macOS – how to get familiar with VIM

If you have never ever worked with CLI (on macOS) I suggest to start with iTerm2: https://www.iterm2.com. I just want you to know, this is my personal view, that iTerm2 is way better comparing to default Terminal – one that you can find inside /Applications/Utilities/Terminal.app. If you have never ever worked with VIM before, I […]


[29-09-2018]

Java preprocessor

If you have developed applications using C, you are probably aware of preprocessor. If you have ever worked with JNI code, you recall preprocessor’s directives for sure. You can find lots of them inside JNI based code generated through javah or javac -h. /* DO NOT EDIT THIS FILE – it is machine generated */ […]