Search This Blog

Sunday, March 29, 2015

OsX - default partition table

What is the default partition type on OsX 10.10 Yosemite?

Partition table: GUID partition table (gpt)
partition type: hfs+


Wednesday, March 18, 2015

OsX - choose the right Java version for Intellij 14 CE


/Applications/IntelliJ IDEA 14 CE.app/Contents/bin/inspect.sh

2015-03-18 21:02:24.425 idea[962:382297] No matching VM found.
[JavaAppLauncher Error] CFBundleCopyResourceURL() failed loading MRJApp.properties file
[JavaAppLauncher Error] CFBundleCopyResourceURL() failed while getting Resource/Java directory
[LaunchRunner Error] No main class specified
[JavaAppLauncher Error] CallStaticVoidMethod() threw an exception
Exception in thread "main" java.lang.NullPointerException
at apple.launcher.LaunchRunner.run(LaunchRunner.java:113)
at apple.launcher.LaunchRunner.callMain(LaunchRunner.java:51)
at apple.launcher.JavaApplicationLauncher.main(JavaApplicationLauncher.java:61)


Download the newest "Apple Java" from here.
Download the regular Oracle Java.


Remember to set the JAVA_HOME variable in .bash_profile correctly:
export JAVA_HOME= /Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home

You can also edit the file: /Applications/IntelliJ IDEA 14 CE.app/Contents/Info.plist

and change 1.6 to 1.8



Friday, March 6, 2015

Friday, February 27, 2015

Ubuntu 14.04 LTS Chrome - enable touch mode (Android-like support)

1. Check you Chrome flags configuration - go to chrome://flags

Enable touch events Mac, Windows, Linux, Chrome OS
Enable pinch scale. Windows, Linux, Chrome OS
Enable pinch virtual viewport. Windows, Linux, Chrome OS, Android
Enable touch based text editing Windows, Linux, Chrome OS

2. Check the no. of your touch-panel

xinput list

for me it gave:

Atmel Atmel maXTouch Digitizer           id=10 [slave  pointer  (2)]

3. Start your chrome browser with the following script


#!/bin/bash
sudo killall chrome
#xinput list  # list input devices 
google-chrome --touch-devices=10 &




Tuesday, February 17, 2015

Android SMS to HTML backup / exporter

The application SMS to HTML exporter that I recently published for  the Android platform enables the user to easily export all his/her messages into a convenient HTML format that can be sent to a desirable email address instantly.

The fresh, material-design inspired and simple user interface should get anyone going in moments.

The application can be downloaded from Google-Play: here

or just copy-paste this address:
https://play.google.com/store/apps/details?id=com.bkosarzycki.smstohtmlexporter

Screenshots:






Tuesday, February 3, 2015

Git - show number of project lines of code for a specific user


To see number of:

  • added lines
  • removed lines
  • total lines of code
for a specific user, use the following:


git log --author="Name Surname" --pretty=tformat: --numstat | gawk '{ add += $1; subs += $2; loc += $1 - $2 } END { printf "added lines: %s removed lines: %s total lines: %s\n", add, subs, loc }' -



Android project - count lines of code

In the project directory execute the following command. It searches for all *.java files and counts their lines of code - ignoring _*.java files which are generated by Android Annotations.



find . -name '*.java' -not -name '*_.java' | xargs wc -l