Wednesday, May 30, 2018

unhelpful error message - google groups

While adding users to a google group, came across this error - An error (#847) occurred while communicating with the server.

Apparently this has nothing to do with internet connectivity issues. These forum posts point to a bad email id in the submitted batch. Sure enough, there was a "blogger.com" email id in the batch which was causing problems for me. Removed it, all well. 

Tuesday, May 29, 2018

Google Apps legacy documentation

Looks like legacy Google apps users can't purchase extra drive storage - Can't purchase Google Drive Storage in legacy Google Apps Free edition - https://productforums.google.com/forum/#!topic/apps/z0tUAkQl_rM

Friday, May 11, 2018

Linux Mint Live CD / DVD

Some notes for Linux Mint Live CD / DVD


  1. username is mint, and no password.
  2. sudo does not ask for password.
  3. to take a backup, can do sudo cp -R /source/folder /destination/folder
  4. to switch between screens, Ctrl+Alt+F2 or Ctrl+Alt+F7 etc - need to press Fn also on Mac keyboard.

web hosting on github

A useful option for small static websites -

https://help.github.com/articles/using-a-custom-domain-with-github-pages/

https://pages.github.com/

The limits are quite generous - https://help.github.com/articles/what-is-github-pages/

"GitHub Pages sites are subject to the following usage limits:

  • GitHub Pages source repositories have a recommended limit of 1GB .
  • Published GitHub Pages sites may be no larger than 1 GB.
  • GitHub Pages sites have a soft bandwidth limit of 100GB per month.
  • GitHub Pages sites have a soft limit of 10 builds per hour."

Sunday, May 06, 2018

C++ programming - using fstream in a cross-platform manner

Some notes about making use of fstream in cross-platform code - 

Some interesting methods are discussed at
https://stackoverflow.com/questions/9739948/write-a-file-in-a-specific-path-in-c/40980510#40980510

In Visual Studio,
disable deprecation, use _CRT_SECURE_NO_WARNINGS - 

Configuration Properties >> C/C++ >> Preporocessor >> Preprocessor Definitions >>  _CRT_SECURE_NO_WARNINGS

A working code snippet - 

    char path[80];
    char foldername[80];
    sprintf(path,"homeuser/file.txt");
    sprintf(foldername, "homeuser");
    CreateDirectoryA(foldername, NULL);
    std::ofstream file(path); //open in constructor
    std::string data("data to write to file");
    file << data;

Friday, May 04, 2018

making an alexa skill

The Amazon Echo Dot, Google Home Mini, etc are inexpensive ways to listen to streaming radio without the need for interacting with a screen. The Echo can be used with Skills to make it easy to accomplish a particular task. Though in theory, radiosai is available on tunein and it should be possible to listen via tunein, of late, it doesn't seem to work. Alexa says, "I can't listen by genre on Tunein". So, tried to make an official Radiosai skill.

There was already a Radio Sai skill, but that one was missing AfriStream and AsiaStream. So, decided to try to implement this skill, with some improvements, as an official radiosai skill.

Changes in the user interface - the screenshots given here are no longer similar to Amazon's AWS console or the Skills console. Instead of uploading the sample utterances as a text file, I manually created the utterances in the Skill console using the wizard. Also added some confirmation before playing each stream, like


var message = 'Playing Bhajan Stream.';
this.response.speak(message);
this.attributes['stream'] = 'BhajanStream';
controller.play.call(this);

and also added a stop call to the AudioPlayer -

'AMAZON.CancelIntent' : function () { 
// adding the line below to stop the audio player 
controller.stop.call(this); 
////////////// 
var message = 'Good bye.'; 
this.response.speak(message); 
this.emit(':responseReady'); 
}

It looks like only the playModeIntentHandlers are active - the others don't seem to be called. Have submitted for being made available to the public.

Edit: Update May 11 -
1. Bug fixes by the owner of this repository, looks like the SDK had some changes so the zip file needed to be changed.

2. How to build an Alexa audio streaming skill from a template - YouTube video - lots of similar resources available

3. Audio player skill sample from Amazon, for multiple streams.