Tag Archives: 2016

About firefox services.

As you know the firefox broser come with services.
Using keys Ctr+Shift+A will show the tab of extensions and services, see this image:
firefox services
You can find all services here.
The status of this mozilla services can be found here.

Posted in All, web, Windows 10. Tagged with , , , .

Test your FLASH Player.

This is a short tutorial about how to test your FLASH Player.
If the update is working or not from vary reasonable reasons, then you can use this link to test it.
This will open one web page and you need to press the Check button.
The output will show you if the FLASH Player is updated.
This issue is important security part of your website.
Also you can see all Security Bulletins and Advisories here.
I hope this tutorial will help much.

Posted in All, Flash, web. Tagged with , , , .

WebRTC – one simple first example webcam – part 002.

As you know already the WebRTC allow us provides browsers and mobile applications with Real-Time Communications (RTC) capabilities via simple APIs.The WebRTC components have been optimized to best serve this purpose.
You also need to put tunneling WebRTC over TCP because that tunneling it matters.
But today I will show you just a simple first example about webcam and WebRTC.
The HTML5 file is very simple:

You need to have a video tag with id for identification tag named “player”. You can put anything you like into areas of id’s, but that will reflect the part of javascript.
The autoplay segment code will start the running part of video tag.
You see the HTML file come with two references to files: webcam.css and webcam.js.
The webcam.css will allow you to add a more stylized part of HTML file and that will reflect the output.
The webcam.js will allow you to make WebRTC communications over internet…
Let’s start with css file:

The body and player parts are used to make changes into HTML output.
The body is a default for HTML tag body and for id’s is used # and the named id’s.
For example: If you named your tags like word, next, pass, all the id’s will be #word, #next, #pass, #all.
Anyway. this allow you just stylized your HTML output.
To have a real communication then you need javascript.
This javascript can be part of HTML files into two ways.
First is to put into HTML5 and that has some limits.
The next step is to use another javascript that is loaded by HTML file.
My example uses the best HTML format HTML5 encoding.
You can see into my example the HTML load the webcam.js script into area of head tag.
Let’s see the javascript file:

I create an object named mediaOptions. The objects can be also created like that format: var car = new Object();
I used achieved with: var mediaOptions = { audio: false, video: true };
This variable object will can be started or not.
This is part of two if statements and will return the getUserMedia function.
The next step is to give all infos and data to make all running:
navigator.getUserMedia(mediaOptions, success, function(e) {

function success(stream){
var video = document.querySelector(“#player”);
video.src = window.URL.createObjectURL(stream);

The MediaStream object that contains the media stream is allow by success and the callback of getUserMedia.
That function – success put into video tag the output of your webcam.
Your browser allow you to see the webcam by running this: HTML5, javascript and css.
If you read my old webrtc-first-steps-part-001 example you will see is more complex.
The main reason was to see the global area and then to understand how simple is to write code.
Most part of my previous tutorial are also very important parts.
That will increase the strength into areas. This source code is also good, but not great.
To have a good secure then you need to use more … (like tunneling).

Posted in All, HTML 5, javascript, web, WebRTC. Tagged with , , , , , .

Using python to make authentication into GMail API.

Is simple to do with python. The script I make is simple without classes.
Let’s start with first steps:
You need to create your project and then one credential with json file.
See the next image to see how is your json file. My json file is renamed to client_secret.json and is used by python script.
The json file is into same folder with my python script.
After first run the script will make one json file named: gmail-python-quickstart.json.
Is simple way to get and put credentials to solve authentification to google.
Another step is to add GMail API library to your project. This allow you to use the functions from the GMail API.
The python script is very simple to do. Follow the part of this script.
Is need to use some python modules. One reason is to deal with email format, see email python module.
Some python modules are used to make authentication to google: oauth2client and apiclient.
I used argparse python module , but is no need to add arguments to the script.
The result of this script will send a email to: your@yahoo.com.
The email is created by CreateMessage function.
About the special value “me” that come from Google API and is for user.

Posted in All, Google API, Programming, Python. Tagged with , , , , , , , .

Using Atom editor.

I like a good editor with features for speed typing and development. I also like to keep the base of typing skills over my development work.
First I used sublime editor and is a great editor but is overpriced for me $70 and the free edition don’t has all of features. If you just want to build Atom from source, you can also do that with build instructions for Mac, Windows, Linux and FreeBSD.
Now I used Atom – version 1.11.2 and working great with windows 10. This editor can be used for development of javascript, html, text, python etc. I liked because has a good ergonomic view and typing.
Let’s see the starting of this editor.
atom editor
As we can see you can install packages, use theme, styling, change the init script, use snippet.
You can read the Atom Flight Manual – here.
Let’s start with some basic features:
The easiest way to install packages is open up your Atom editor then go to Packages -> Setting View -> Install Packages. You can see some basic packages can be used:
1 : tree-view – showing file view’s in tree manner on left side of editor;
2 : autcomplete – just press CTRL + Space keys while typing and it will show you the match;
3 : autocomplete-plus – this will show the suggestion based on what you are typing and what is your previous typed words by Typing CTRL+Space keys;
4 : Javascript Snippets – can be activated by typing cd and pressing TAB key;
5 : autocomplete html – can create lot’s of useful snippets of HTML by pressing TAB key ;
For example if you want to install python language, just go to Installed Packages and search language-python.
The editor come with snippet idea to reduce the repetitive part of your work.
You can used from atom editor or create your own snippet.
Snippets are regularly-used chunks of code you can quickly insert into your editor area.
Use File -> Snippets… and will open the snippets.cson file.
If you just use a blank file then you have few snippets: legal and lorem.
When you save the file with one extension then the snippets will come with that extension.
For example html files will have many snippets: todo, fix, xxx, idea, hack.
To see all available snippets for your current file type, just hit Alt+Shift+S keys.
The next step is to know some basic shortcuts of this editor:
Ctrl+, Preferences
Ctrl+Shift+p Toggle command palette
Ctrl+b Browse list of open files
Ctrl+Alt+r Reload Atom
Ctrl+Shift+l Change synatx highlighting
Alt+Shift+s Show available code snippets
Ctrl+Shift+m Markdown preview
Ctrl+Alt+i Toggle Developer Tools

File Management
Ctrl+n New file
Ctrl+Shift+n New Window
Ctrl+p Open file (type the name to perform a search)
Ctrl+o Open file
Ctrl+Shift+o Open folder
Ctrl+s Save
Ctrl+Shift+s Save as
Ctrl+w Close tab
Ctrl+Shift+w Close window

Editing Lines
Ctrl+g Go to line
Ctrl+l Select line
Ctrl+Shift+d Duplicate line
Ctrl+Shift+k Delete line
Ctrl+Arrow Up/Arrow Down Move line up/down
Ctrl+/ Toggle comment line
Ctrl+Enter New line below
Ctrl+[/] Indent / outdent selected lines
Ctrl+j Join lines

Editing Words and Brackets
Alt+b / f Move to beginning / end of current word
Alt+Shift+b / f Select to beginning / end of current word
Ctrl+Backspace OR Alt+h Delete to beginning of current word
Ctrl+Delete OR Alt+d Delete to end of current word
Ctrl+Alt+. Complete bracket
Ctrl+m Go to matching bracket
Ctrl+Alt+m Select code inside matching brackets

Code Folding
Ctrl+k, then Ctrl+1 … 9 Fold all code at indent level 1 … 9
Ctrl+Alt+/ Fold / unfold code
Ctrl+Alt+f Fold selected code
Ctrl+Alt+[/] Fold / unfold all code

Find and Replace
Ctrl+f Find in current file
Ctrl+Shift+f Find in project
F3 Find next
Shift+F3 Find previous
Ctrl+Enter Replace all
Ctrl+Alt+/ Use Regex in search
Ctrl+Alt+c Match case in search
Ctrl+Alt+s Search only in selection
Ctrl+Alt+w Match whole word

Ctrl+Shift+=/- Increase / decrease text size
Ctrl+0 (zero) Reset text size
F11 Toggle fullscreen

Tree View
Ctrl+0 (zero) or Alt+\ Toggle focus Tree View
Ctrl+k, then b or Ctrl+\ Toggle tree view
j/k Select next/previous item
h/l OR Arrow Right/Arrow Left Expand / collapse selected directory
Alt+ Arrow Left/Arrow Right OR Ctrl+Alt+[/] Recursively expand / collapse directories
Enter Open selected item
m OR F2 Move selected item
Backspace OR Delete Delete current item
d Duplicate selected item
Ctrl+1 … 9 Open selected item in pane 1 … 9
a Add new file
Shift+a Add new folder
i Toggle display of VCS ignored files

Github Integration
Alt+g, then b Open on Github: blame
Alt+g, then c Open on Github: copy-url
Alt+g, then g Open on Github: repository
Alt+g, then h Open on Github: history
Alt+g, then i Open on Github: issues
Alt+g, then o Open on Github: file
Alt+g, then r Open on Github: branch-compare

Manage Diffs
Alt+g, then d Toggle list of diffs in file
Alt+g, then Arrow Down/Arrow Up Move to next/previous diff in file

Posted in All, Windows 10. Tagged with , .