Saturday, December 12, 2015

MacVim with MacPorts and Xcode 7.2 failure

If the install of MacVim with MacPorts fails with error, that says something like this in the log:

"Could not find service "com.apple.CoreSimulator.CoreSimulatorService" in domain ......"

The solution would be change permissions on the: /Applications/Xcode.app/Contents/Developer/Library/PrivateFrameworks/CoreSimulator.framework/Versions/A/XPCServices/com.apple.CoreSimulator.CoreSimulatorService.xpc

with:
sudo chmod g-w com.apple.CoreSimulator.CoreSimulatorService.xpc

Enjoy!

Wednesday, May 27, 2015

JDK 7 on Mac OS X

It's been some time since I touched Java on Mac OS X, was mostly busy with native (C/C++) cross-platform development recently.
Here is just another note for myself before I forget.

After you install Java 7 on Mac OS X and you try to run java (or javac) it will still pick up the java 1.6 from /System/Library/Java/JavaVirtualMachines/1.6.0.jdk.

In order to fix this go to 
/System/Library/Frameworks/JavaVM.framework/Versions
and remove the CurrentJDK symlink.

Then create the new one to point to the JDK 1.7, in my case with the command:
sudo ln -s /Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/ CurrentJDK

Now check the version: 
$ java -version
java version "1.7.0_79"
.............

Enjoy!


Wednesday, May 20, 2015

tcpdumping


Just a bookmark for myself, when wireshark is not avail.
This collects the full payload, only from the host  x.x.x.x and https port
and writes into the out.pcap file:

tcpdump -s 0 -w out.pcap -A host x.x.x.x and tcp port https

Wednesday, April 09, 2014

When char bites ...

Got bitten by the char arithmetics in C today, while porting some native code to Android NDK.
Good reminder that the chars are not defined as signed or unsigned in the C standard and treated as unsigned by the ARM compiler for example.
To fix this problem it's better to use either something like int8_t from stdint.h or the compiler flag:
 -funsigned-char

Good luck!

Wednesday, November 13, 2013

Running Technique Videos

Just stumbled upon the series of videos yesterday.
I could not find the part one,  but the rest is quite interesting. 
I never had the a proper coaching for running and it looks like there are lots of things that I can improve.

Running Technique Video - Part 2

Running Technique Video - Part 3

Running Technique Video - Part 4

Running Technique Video - Part 5

Enjoy!