Skip to main content

Posts

HTTPS for dummies - so how HTTPS really works in 5 mins

What is HTTPS? HTTPS (HyperText Transfer Protocol Secure) is a way of transferring data over internet in a secure manner. It's achieved through adding SSL (Secure Socket Layer)/TLS (Transport Layer Security) on top of standards HTTP. What HTTPS gives us? End-2-end encryption of data - from the browser to the server and back = even if someone reads the data you are sending, they will not be able to understand anything out of it Confirmation of the identity of the website we are accessing = you are sure that the website that looks like your bank is actually your bank (and not a phishing website) How does it work? First you need a pair of SSL certificates: One installed in your web browser (in most cases shipped together with your browser, provided by one of so-called trusted Certificate Authorities) One installed on the website (which is acquired by the website owner) Each of those SSL certificates includes the following information:  Public information: name of
Recent posts

Spark 2 on Hortonworks Data Platform 2.5 Sandbox

Since apparently there are still issues with using Spark2 from Zeppelin, you may want to switch to shell to use Spark2 with HDP 2.5. Summarizing the flow (learned it the hard way): Connect via SSH to the sandbox (e.g. Putty  on Windows) on port 2122. This will allow you to use copy-paste (vs console in VirtualBox) username: root password (default): hadoop SSH into the docker container that runs HDP ssh root@172.17.0.2 username: root password (default): hadoop Make sure you use Spark2 export SPARK_MAJOR_VERSION=2 Run Spark shell cd /usr/hdp/current/spark2-client/bin ./spark-shell

Google Drive API - some helpful tips and code

I am not sure why, but there are not a lot of examples how to use Google Drive API from Android. If you're wondering about it, or you look for a working code, here it is... I assume you've already went successfully through the Google Drive SDK Quickstart -  https://developers.google.com/drive/quickstart-android  . 1) If you're using Eclipse as your IDE and you don't enjoy the command line, for step 1 in the Quickstart, you can find the right SHA1 fingerprint in Window->Preferences -> Android -> Build . 2) In Google Cloud Console (https://cloud.google.com/console) enable both Drive API and Drive SDK 3) Enabling Google Drive for your Activity. The code assumes that the main purpose of the activity is to synchronize your content (I called it BackupActivity - to backup all the content from the app to the Google Drive). a. In your Activity put the following: // change the following to your Activity name private final static String TAG = "Ba

How to make Logitech Trackball Marble Wheel work

If you bought Trackball Marble from Logitech, the first challenge you encounter is probably related to the lack of the wheel button. Unfortunately the software provided with the device for Windows doesn't help (neither Universal or Auto Search aren't really working as I was expecting). Internet suggests mostly one option, app called Marble Mouse Scroll Wheel http://marble-mouse-scroll-wheel.software.informer.com/ To some extent it works, but I wasn't able to make it work in google maps or in picture viewer. Moreover setting where crashing very often (I am running windows 7 64 bits). Fortunately there is a way to have a semi-wheel button behavior with this trackball, but with a different software - X-Mouse Button Control: http://www.highrez.co.uk/downloads/XMouseButtonControl.htm Setup Mouse button 4 and 5 as wheel up and wheel down. Then also update Logitech SetPoint settings to replace the behavior of those button to default. Voila - now you can emulate wheel

Android Notifications - lesson learned from implementation

Recently some Conf Call Dialer users asked to add notifications to the application, so (since it seems to be a good idea) I've spent few hours implementing them in the app. Everything went smoothly, except of one rather funny problem, after executing NotificationManager.notify, notifications were not showing up and I was getting all the time the following warning in the LogCat (12345 is the id assigned to the notification): notify: id corrupted: sent 12345, got back 0 My code seemed to be rather simple (mostly copy paste from the javadoc, with some app specific logic added): NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(this). setContentTitle(event.subject).setContentText(event.timeFrom + " " + additionalText); // ... NotificationManager mNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); mNotificationManager.notify(notificationId, mBuilder.build()); Googling didn't help, so I compare

Azure Storage Explorer - for all your Azure Storage management needs

If you are like me a heavy Azure user you may try the following tool that in an easy (and faster than the management UI) way allows you to manage content of your storages. Works like a dream, setup takes like 10 seconds. http://azurestorageexplorer.codeplex.com/

Rendering AdMob view on Canvas (SurfaceView) in android

If you're wondering how put a working AdMob view into your SurfaceView and are tired of looking in the Internet for solution (somehow most suggestions that I found on forums didnt work), here it is... Assumptions: A. We request the ad on creation (you may want to refresh it later though...) B. The AdView is put on the bottom of the screen C. It's a production ready code, but if you want to test it - add testDevices to the adRequest D. You've already set AndroidManifest properly as described in the Getting Started tutorial 1. In the activity that initializes your SurfaceView add a field representing your adView, for example: private AdView adView; 2. In the onCreate method of the same activity put the following code: // window manager preparation WindowManager.LayoutParams windowParams = new WindowManager.LayoutParams(); windowParams.gravity = Gravity.BOTTOM; windowParams.x = 0; windowParams.y = 0; windowParams.height = WindowManager.Lay