Wednesday 12 July 2017

Raspberrypi setup

Prerequisite:

1) Raspberry Pi device with data cable.
2) Card reader
3) Micro SD card. Here is the compatible documentation
4) A monitor with an HDMI interface
5) HDMI cable
6) USB keyboard
7) USB Mouse
8) Ethernet Cable [Optional]

Following are the steps to move with: 

1) Format SD card:
    Recommended way to format  by SD Card Formatter, you can download it from here

2) Let say we have to load RASPBIAN image onto SD Card, download image from here
 
3) Now its time to load image on SD Card

4) Open a MAC terminal window and then run command: diskutil list

5) Identify your removable drive device address, it will probably be look like the ones below:



/dev/disk0

#: TYPE NAME        SIZE       IDENTIFIER

0:GUID_partition_scheme *500.3 GB   disk0


/dev/disk2

#: TYPE NAME         SIZE     IDENTIFIER

0: Macintosh HD  *378.1 GB   disk1
 Logical Volume on disk0s2
   DAB8DF9E23-A4RR-420D-00R1-FRT67WE
Unlocked Encrypted

/dev/disk3
  #:       TYPE NAME     SIZE       IDENTIFIER
  0:  FDisk_partition_scheme *7.9 GB     disk3
    1:   DOS_FAT_32 AJ     7.9 GB     disk3s1


Note that your removable drive must be DOS_FAT_32 formatted. In this example, /dev/disk3 is the drive address of an 8GB SD card.

6) Unmount your SD card via command: diskutil unmountDisk <drive address>

7) When successful, you should see a message similar to this one:

Unmount of all volumes on <drive address> was successful

8) You can now copy/load the image onto SD card, using the following command:

sudo dd bs=32m if=<image file path> of=<drive address>

Thereafter you will see the following message output and also by pressing Ctrl+t you can see like below records in/out bytes

3420+1 records in
3420+1 records out
286665744 bytes transferred in 524.761215 secs (5069924 bytes/sec)

9) Now you can eject your removable drive. You are ready to install RASPBIAN image on your device.

In Part Two we will learn about how to use SSH and VNC as a virtually desktop on MACOSX.


Friday 9 June 2017

Raspberry Pi : SSH and VNC : Virtual Desktop on your mac

In previous tutorial we have learnt How to raspberrypi setup?

Now its time to see its display for Raspberry Pi with Laptop. Below steps are with Macbook

1) Open a Terminal in RaspberryPi
   Enable SSH and VNC either from sudo rasp-config or Preferences=>Raspberry Pi Configuration => Interfaces

2) ifconfig and find ip address

3) Open Mac Terminal
  Connect via SSH ssh pi@192.168.1.236
  password: raspberry (by default)

  Now you will see you are connected to pi@raspberrypi:~ $

4) Now its time to get update packages, tightvnc server
   sudo apt-get update
   sudo apt-get install xrdp
   sudo apt-get install tightvncserver

5) cd .config

6) mkdir autostart
   nano tighvnc.desktop

   [Desktop Entry]
   Type=Application
   Name=TightVNC
   Exec=vncviewer :1
   StartupNotify=false

  save contents with above lines in same file.

7) cd /home/pi

8) Run tightvncserver

9) Download Chicken VNC client on macosx & connect with
    host:192.168.1.236
    Display: 1
    Password: raspberry(by default)

Now you are able to see Macintosh as Display for a Raspberry Pi.

Cheers!

Saturday 29 April 2017

Why Katappa killed Bahuballi?

For those who can't wait for it badly:

Background:

Bahubali owns mashismati kingdom, bhallaldeva and bijjalladeva jealous about the victory.
So they actually planned both to kill rajmata in a dramatic way and Veer bahadur kumar verma (which is very close to bahubali and his wife Devsena) has listen this gossip and  bijjalladeva slapped his father to tell don't dig into this matter and emotionally character played by bijjalladeva in front of Veer Bahadur to provoke to kill his own son (Bhallaldeva) so that they will tell Rajmata that veer bahadur came to kill Bhallaldeva from Bahubali order. 
So below is the actual story:

Katappa: Is this happening with your consent? I beg you queen mother. Ask the king to take back his command. Even integrity can take a backseat. Bahubali has no mean bone in his body. The son you raised. He grew up drinking your milk. The Dharma you taught him runs in his blood.

Rajmaata: Bahubali has to die.

Katappa: No, I can’t do it. He gave sword to rajmata as punishment for my refusal. Please sever my head

Rajmata: Will you kill him? or shall I finish this task?

Katappa: No queen mother. Your hands should not be stained by that sin. I will kill him.

Bijjaladeva: Can we trust this Dog bhalla?

Katappa: and he killed bahubali 

More you will need to watch the film the actual scene :)

Cheers!
Enjoy



Tuesday 14 February 2017

ionic2 based using Angular2 TypeScript

This tutorial is demonstrating "How to create ionic2 based app using Angular2 TypeScript"?

Here is the demo example with complete guide documentation process to install and run this demo project.

Happy Coding!

Monday 13 February 2017

Mobile and Web Client sample code with OAuth2.0 | Symfony 2 RESTful API Project with FOSUserBundle, FOSRestBundle, FOSOAuthServerBundle

OAuth is an open standard for authorization. It provides client application secure access to server resources on behalf of resource owner.

OAuth2.0 focuses on client developer simplicity while providing specific authorization flows for web, desktop applications and mobile devices.


Here is the complete guide documentation process and demo example for Mobile and Web Client:

 AJOAuth2 - iOS

MSOAuth2 - Android

authOauth - Symfony2

Above sample code on different platforms are showing the process of authenticating against an OAuth 2 provider.


Cheers!!
~ Nerd Team


Friday 3 February 2017

AFNetworking - How to handle HTTP status error codes and messages in failure block?

failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
 NSLog(@"Failure: %@", error); 
 NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *)task.response;  
 NSLog(@"%zd", httpResponse.statusCode); 
 id errorJson = [NSJSONSerialization  JSONObjectWithData:error.userInfo[AFNetworkingOperationFailingURLResponseDataError  Key] options:0 error:nil];
 NSDictionary *errorJsonDict = (NSDictionary *)errorJson; 
 if (!errorJsonDict)    
    return;
 if ([errorJsonDict isKindOfClass:[NSDictionary class]] == NO) 
     NSAssert(NO, @"Expected an Dictionary, got %@",NSStringFromClass([errorJsonDict  class])); 

  NSLog(@"%@",errorJsonDict.description); 
}

Thursday 12 January 2017

How to create your own CocoaPod | Complete Guide to make your own CocoaPod

Creating your own CocoaPod is fairly a straight forward. Running Pod lib create [pod name] will set up out library structure.

Here is the complete guide documentation process for CocoaPod PodRelease.md

I have used objective C, process for Swift pod is similar!

Happy CocoaPod!