Apple keyboard symbols – how to type them

– U+2318
– U+2325
– U+21E7
– U+2303
– U+232B

If you don’t know how to type Unicode characters in mac OS, take a look here: Unicode frames in macOS.


Capture whole HTML page into PNG

1. Start Chrome
2. Open the page
3. Open DevTools (⌥⌘I)
4. Open the Command Menu (⇧⌘P)
5. Choose Capture full size screenshot


Python 3 Programming Specialization – Coursera


If you want to learn Python 3, I definitely suggest this specialization: Python 3 Programming Specialization. It consists of five courses, each focusing on different aspects of programming. It will guide you through the basics of Python 3 programming and will let you learn lost of various aspects of Python 3 based development: Python basics (primitive types, variables, loops), dealing with arrays and dictionaries, writing functions. You will learn mapping and filtering of data. During the course you will have to work with REST and JSON APIs – these are the basis for the web projects. There are sections devoted to file operations, CSV files, parsing JSON data, accessing web content from Python code – summarizing, it covers lots and lots of stuff related to Python.

Even though I work with Python on daily basis, I have decided to go through all these courses to refresh few things, to learn concepts I have never used, and to systemize my knowledge.

You can find my notes here: and . These notes will give you the felling of how many topics are covered during the course. It’s really well prepared material, I must say.

When it comes to the delivery, I think it’s a top notch lecture. Teachers go through all the concepts explaining them in details. Material is divided into short, encapsulated sections. It helps to learn if you can’t devote too much time at one go. Apart from the lectures there are exercises, practice materials, and projects that you are obliged to finish before passing each course.

There is one thing, that might be a little bit of a struggle for complete newcomers to Python 3. If you have no experience at all, I think that material complexity elevates a little bit at the very end. It might be challenging for people who are not familiar with coding. However, spending a little bit of time here and there should be enough to finish the course.

When it comes to summarizing Python 3 Programming Specialization in once sentence – definitely worth the time and money.

There are many options to write Python 3 code. You can use regular text editor (e.g. Sublime Text, TextMate or even Vim). However, I strongly suggest PyCharm (Community Edition is more than enough).


List all shared libraries loaded by the process

> cat /proc/PROC_ID/maps | sed 's/\s\s*/ /g' | cut -f6 -d' ' | grep '\.so' | sort -u

or

> lsof -p PROC_ID | grep "\.so" | sed 's/\s\s*/ /g' | cut -f9 -d' ' | sort -u

Unicode frames in macOS

If you want to type in Unicode character on macOS, it’s very simple. Just add new layout

System Preferences -> Keyboard -> Input Sources.

Now, you can type the hex number of Unicode character while keeping option (⌥) key pressed. For example, to get ╒═╕ type: ⌥+2552, ⌥+2550, ⌥+2555.


It was fun, but no, thanks …


This is the end, Beautiful friend :(

My Open Source based license for IntelliJ IDEA Ultimate came to and end. It’s time to say goodbye :(


And Now for Something Completely Different – e-Deklaracje 2019 macOS

Jeżeli walczysz z e-Deklaracjami na macOS, jest duża szansa że widziałeś komunikat jak poniżej: “Failed to load an application resource (internal error).”

Na szczęście, jest rozwiązanie tej patowej sytuacji. Winę za całość ponosi integracja e-Deklaracji i Adobe Acrobat Reader DC. Nie wiem jak u innych, ale u mnie e-Deklaracje nie współpracują z najnowszą wersją Adobe Acrobat Readera.

Rozwiązanie jest trywialne.

1. Usuń Adobe Acrobat Reader DC (a jeszcze lepiej, zrób kopię zapasową)
2. Wejdź na stronę: get.adobe.com
3. Upewnij się, że wybrałeś poniższą wersję (11.0.10)

4. uruchom e-Deklaracje

voilà! :)

P.S.

Jest jeszcze jeden mały “myk”. Przy wysyłaniu deklaracji aplikacja prosi o podanie danych z zeznania 2017 – oczywiście trzeba podać wartości z roku 2018.


Scanning remote machines in macOS

If you have issues while testing your remote services, it’s very convenient to use Network Utility in macOS.

You can start it either using Spotlight Search (⌘-space)

or you can call it directly from CLI

> /System/Library\
/CoreServices/Applications/\
Network\ Utility.app/Contents/\
MacOS/Network\ Utility

All you have to do is to scan your target machine using Prot Scan

If you want to start port listener on Linux machine, it’s good to remember you can use nc for that purpose

> nc -l 80

Quotes like this make my day ;)

So the svd and the principle components, and principle components analysis is essentially the same thing. And so if you hear, you know, you’re in a cocktail party and you hear two people talking about the svd and pca you can rest assured that they’re basically doing the same thing.

source: Exploratory Data Analysis

One is a shift pattern and the second is this kind of alternating pattern, so that’s the truth. But of course, we rarely know the truth, so we need to learn the truth from the data.

source: Exploratory Data Analysis


And Now for Something Completely Different – Reputacje



How do I work with development build on macOS – NetBeans 11.0

Whenever you download NetBeans 11.0 (development version) from the official page here: Download, you end up with a zip file that contains working copy of NetBeans. It looks like this

netbeans
|-- CREDITS.html
|-- DEPENDENCIES
|-- DISCLAIMER
|-- LICENSE
|-- NOTICE
|-- README.html
|-- apisupport
|-- bin
|-- enterprise
|-- ergonomics
|-- etc
|-- extide
|-- groovy
|-- harness
|-- ide
|-- java
|-- javafx
|-- licenses
|-- nb
|-- netbeans.css
|-- php
|-- platform
|-- profiler
|-- webcommon
`-- websvccommon

If you want to run it, you can make a symlink to netbeans/bin/netbeans, you can open the directory and double-click the executable file, you can put in on PATH. You have numerous options. However, macOS users (like me) are used to run everything from /Applications folder. This is why I have prepared very simple setup for my testing environment.

I have this small empty structure inside /Applications

NetBeans.app
|-- Contents
|   |-- Info.plist
|   |-- MacOS
|   `-- netbeans.content
`-- Icon\r

Info.plist is just an empty shell that is supposed to make macOS happy with application structure.

> cat Info.plist
<plist><dict></dict></plist>

More interesting part of this “wrapper” lays here MacOS/NetBeans. As you can see, I simply run whatever comes bundled inside development version of NetBeans.

> cat MacOS/NetBeans
#!/usr/bin/env bash

ABSPATH=$(cd "$(dirname "$0")"; pwd)

${ABSPATH}/../netbeans.content/bin/netbeans

All I have to do, each time new version of NetBeans is ready, is drag and drop content of zip file inside /Applications/NetBeans.app/Contents/netbeans.content. Since now, I can run NetBeans directly from /Applications folder.

If you don’t want to waste your time reinventing the wheel, you can always download “empty shell” here: Download

After you open it, just drag and drop NetBeans inside /Application. Then, make sure to right click it and choose: Show Package Contents. Navigate to Contents -> netbeans.contents. Drop here the whole content of netbeans directory after unpacking development version of NetBeans.


macOS and VMware Tools for Ubuntu
– sharing files between host and guest system

You can share your macOS directories between your host system and guest system while running VMFusion.

In my case, the easiest way to do it was as follows.

Download VMware Tools

You can download it here: VMware tools

Unpack the archive

After unpacking the archive you will find structure like this

VMware-Tools-core-10
|-- floppies
|   |-- pvscsi-Windows2008.flp
|   |-- pvscsi-Windows8.flp
|   `-- pvscsi-WindowsVista.flp
`-- vmtools
    |-- buildNumber.txt
    |-- isoimages_manifest.txt
    |-- isoimages_manifest.txt.sig
    |-- linux.iso
    |-- linux.iso.sha
    |-- linux.iso.sig
    |-- linux_avr_manifest.txt
    |-- linux_avr_manifest.txt.sig
    |-- version.txt
    |-- windows.iso
    |-- windows.iso.sha
    |-- windows.iso.sig
    |-- windows_avr_manifest.txt
    `-- windows_avr_manifest.txt.sig

Mount the iso file

Open VMware Fussion and make sure to mount linux.iso to your Ubuntu based VM.

Once you have selected ISO image, make sure to perform Connect CD/DVD

You should be able to see your newly mounted VMware Tools CD

Install tools

Open terminal application and run sudo su -. This way, you will become root. Now, you can create directory inside ~root and install tools.

> sudo su -
> mkdir install_vmware_tools
> cd install_vmware_tools
> find /media -name "VMwareTools*" -exec cp {} . \;
> find . -name "VMwareTools*" -exec tar -zxf {} \;
> cd vmware-tools-distrib
> ./vmware-install.pl

Proceed with installation until it is finished. Once it’s done, restart your VM machine.

Share the directory

Inside VM preferences, make sure to share directory between host and guest systems.

Inside /mnt/ you will be able to see the files you have shared between systems.


OpenVPN on macOS 10.14

If you want to install most recent version of OpenVPN on macOS you will need:

tuntap   git clone git://tuntaposx.git.sourceforge.net/gitroot/tuntaposx/tuntaposx
LZO http://www.oberhumer.com/opensource/lzo/download/
OpenSSL git clone https://github.com/openssl/openssl.git
OpenVPN     OpenVPN download
XCode XCode in AppStore

Double check you can download all the stuff. Once it’s in place, you can proceed with installation.


# Make sure to install command line tools

> xcode-select --install

# Then, you can proceed with tun/tap

> mkdir -p ~/opt/src
> cd ~/opt/src
> git clone git://tuntaposx.git.sourceforge.net/gitroot/tuntaposx/tuntaposx 

# Note for macOS 10.14 !!
# (if you are working with macOS 10.13, you don't have to do it)
#
# make sure to change following lines inside sources

# src/tun/Makefile
-INCLUDE = -I.. -I/System/Library/Frameworks/Kernel.framework/Headers
+INCLUDE_D = -I.. -I/Library/Developer
+INCLUDE_S = /CommandLineTools/SDKs/MacOSX.sdk
+INCLUDE_F = /System/Library/Frameworks
+INCLUDE_K = /Kernel.framework/Versions/A/Headers/
+INCLUDE = $(INCLUDE_D)$(INCLUDE_S)$(INCLUDE_F)$(INCLUDE_K)

# src/tap/Makefile
-INCLUDE = -I.. -I/System/Library/Frameworks/Kernel.framework/Headers
+INCLUDE_D = -I.. -I/Library/Developer
+INCLUDE_S = /CommandLineTools/SDKs/MacOSX.sdk
+INCLUDE_F = /System/Library/Frameworks
+INCLUDE_K = /Kernel.framework/Versions/A/Headers/
+INCLUDE = $(INCLUDE_D)$(INCLUDE_S)$(INCLUDE_F)$(INCLUDE_K)


> cd tuntaposx/tuntap
> make

# note that make install will put some files inside /Library
# /Library/Extensions/tap.kext
# /Library/Extensions/tun.kext
# /Library/StartupItems/tap
# /Library/StartupItems/tun

> make install

# make sure to load modules before running OpenVPN
# sudo kextload /Library/Extensions/tap.kext
# sudo kextload /Library/Extensions/tun.kext

# it might be you need to disable system integrity protection on more recent macOS installations
# if you are running macOS >=14, make sure to disable SIP
# 1. restart mac
# 2. hold command-R
# 3. run Terminal
# 4. execute command: csrutil disable

# once tun/tap is in place, you can install LZO

> cd ~/opt/src
> curl -O http://www.oberhumer.com/opensource/lzo/download/lzo-2.10.tar.gz
> tar zxf lzo-2.10.tar.gz
> cd lzo-2.10
> mkdir -p ~/opt/lzo
> ./configure --prefix=$HOME/opt/lzo
> make
> make install

# another piece of software we need is OpenSSL

> cd ~/opt/src
> git clone https://github.com/openssl/openssl.git
> cd openssl
> ./config --prefix=$HOME/opt/openssl
> make
> make install


# Install OpenVPN
# Download tar.gz from
# https://openvpn.net/index.php/download/community-downloads.html

> cd ~/opt/src
> curl -O https://swupdate.openvpn.org/community/releases/openvpn-2.4.6.tar.gz
> tar -zxf openvpn-2.4.6.tar.gz
> cd openvpn-2.4.6

# eventually, we can compile OpenVPN
# make sure to export CFLAGS and LDFLAGS in order to use
# our own installation of libs and headers

> export CFLAGS="-I/Applications/Xcode.app/Contents/Developer\
/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift-migrator\
/sdk/MacOSX.sdk/usr/include\
 -I$HOME/opt/lzo/include -I$HOME/opt/openssl/include"

> export LDFLAGS="-L$HOME/opt/lzo/lib/ -L$HOME/opt/openssl/lib"

# eventually, you can configure and install OpenVPN

> ./configure --prefix=$HOME/opt/openvpn
> make
> make install

> ~/opt/openvpn/sbin/openvpn --version
OpenVPN 2.4.6 x86_64-apple-darwin17.4.0 ...
library versions: OpenSSL 3.0.0-dev xx XXX xxxx, LZO 2.10
...
...
...

That’s it.


NetCAT 11.0

So, NetCAT 11.0 has started

Register

If you want to register, take a look here: NetCAT 11.0 Participants

Get the stuff

If you are looking for development version of NetBeans (current version is 11.0-vc4) – take a look here: 11.0-vc1, 11.0-vc2, 11.0-vc3, 11.0-vc4.

You will need JVM to run things

If you are looking for preferred JVM release, take a look here: JDK 12, JDK 11

If you want to download GlassFish, make sure to check out this one: GlassFish

Are you looking towards Web based developments?

WildFly can be found here: WildFly

If you plan to test Profiler, take a look here

If you plan to use Docker based tests for FTP and Profiler, make sure to download Docker: Download Docker

Do some tests

Test specification: Tests

Reporting bugs: JIRA based tracker for NetBeans


macOS with multiple displays-
prevent mouse from jumping to other screen

Working with multiple displays can make you suffer while moving mouse close to the edge. Suddenly you end up at the other display.

Solution is so freaking simple ;)


cat and next line continuation ‘\’

This one, gave me one, huge, headache.

> cat script.sh
#!/bin/bash
cat file \
 | sed "s|aa|bb|g"

> touch file
> ./script.sh
cat:  : No such file or directory
./script.sh: line 3: syntax error near unexpected token `|'
./script.sh: line 3: ` | sed "s|aa|bb|g"'

Yes, you are right, there is an extra space at the end of line cat file \ .


macOS + VIM + Modifer Keys… – make life easier


yank the line

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


retreat

> svn merge -r HEAD:some_revision_back_in_time .

←Older