Wednesday 28 June 2017

Loading and Using JavaScript in Drupal 8

Managing JavaScript in Drupal 8 with Libraries
Drupal 8’s JavaScript handling is a conceptual extension of D7’s hook_library()and the D7 Libraries API Module.
Libraries are defined in YAML format, of course. You can define one or more libraries in each file.
Define a Library
Create or edit the <some-file-name>.libraries.yml file that goes in the root of your theme or module:
this-lib-name:
 js:
 js-path/my-theme.js: {}
some-file-name can be any name really, but should be the name of your theme or module.
Drupal will aggregate JS files by default, so to avoid that if necessary:
js-path/my-theme.js: { preprocess: false }
Of course, adjust js-path as needed. See PSR-4 namespaces and autoloading in Drupal 8 for more info on pathing.

Library Options

You can optionally provide a version number per library, but Drupal doesn’t use it for anything:
this-lib-name:
  version: "1.0.1"
You can also define dependencies per library, which are followed:
this-lib-name:
  dependencies:
    - core/jquery
D8 by default loads JS into the footer; to load to the header:
this-lib-name:
  header: true

Attaching Libraries in a Theme

Reference them in your my-theme-name.info.yml file. They load globally as in on every page.
libraries:
  - core/jquery
  - my-theme-name/this-lib-name
Here we’re loading our libraries this-lib-name and core/jquery (which is no longer loaded by default).

Attaching Libraries in Twig

You can attach a JS library from a twig template. It will only load if the template loads which means you can conditionally load it based on the naming structure of the Twig template file.
{{ attach_library('my-theme-name/some-other-lib') }}

Attaching Libraries in your Module’s PHP

PHP allows you to control what libraries are loaded and when.
function mymodule_page_attachments(array &$attachments) {
  $attachments['#attached']['library'][] =
    'mymodule/some-other-lib';
}
Of course you can load any number of libraries using this, and related, hooks.

Attaching Libraries in your Theme’s PHP

If not loading everywhere by using the .yml file.
function mytheme_preprocess_page(&$variables) {
  $variables['#attached']['library'][] =
    'mytheme/some-other-lib';
}
See also related THEME_preprocess_HOOK()’s. Although some discourage using these hooks as they’re intended for preprocessing variables.

Conditional Libraries in PHP

To support D8’s caching, if you want to *conditionally* attach libraries, you need to provide cacheability metadata*.
function mytheme_or_module_preprocess_page(&$variables) {
  $variables['page']['#cache']['contexts'][] = 'url.path';
  // above line sets the cacheability metadata
 
  if (\Drupal::service('path.matcher')->isFrontPage()) {
    $variables['#attached']['library'][] =
      'mytheme_or_module/some-other-lib';
    }
}
*Metadata is comprised of a combination of up to 3 things: tags, contexts, and max-age. See the Cache API https://www.drupal.org/developing/api/8/cache for more info.

Loading External JavaScript

External “libraries” still have to be defined inside Drupal libraries*.
this-lib-name:
  js:
    https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.8/
      angular.js: { type: external }
Since Drupal will minify, if it already is, let D know:
{ type: external, minified: true }
If attributes are needed in the resulting <script> line:
{ type: external , attributes: { defer: true, async: true } }
*I “broke” the code lines for readability, but it’s not legal.

JavaScript Settings

To add “computed” settings or configuration, first you have to define a dependency on core/drupalSettings.
this-lib:
  dependencies:
    - core/jquery
    - core/drupalSettings
Then…
function mytheme_preprocess_page(&$vars) {
  $vars['#attached']['library'][] = 'mytheme/this-lib';
  $vars['#attached']['drupalSettings']['mytheme']
    ['this-lib']['some-prop'] = $some_var;
}
Then access the some-prop setting in JS with:
console.log(drupalSettings.mytheme.this-lib.some-prop);

Manipulating Libraries

The theme is able to use two new directives, libraries-extend and libraries-override to extend, remove or replace whole libraries or individual library files.
Both of these are placed in the theme’s my-theme.info.yml file.

Libraries-Extend

By “extending” a library it means the new library is always loaded with the target library, regardless of conditions.
libraries-extend:
  other_theme_or_module/some-lib:
    - mytheme/some-other-lib
Here, the some-other-lib of the theme is used to extend some-lib of some mytheme_or_module.

Libraries-Override

This directive is more powerful, but when dealing with JS (unlike CSS which may just result in poor layout/design), you can break JavaScript on your site by not paying close attention to JS code dependencies.
You can remove a whole library:
libraries-override:
  other_theme_or_module/some-lib: false
Or remove a library file:
libraries-override:
  other_theme_or_module/some-lib:
    js:
      full-path-to-library/some-file.js: false
Or replace a whole libs:
libraries-override:
  other_theme_or_module/some-lib: mytheme/some-other-lib
Or replace a library file:
libraries-override:
  other_theme_or_module/some-lib:
    js:
      full-path-to-library/some-file.js: path-to-theme-lib/some-other-file.js

Inline JavaScript

Almost always JavaScript should be included in a library.
But if you must, put the complete script tag in the html.html.twig file (yes, “html” is repeated twice.)

Dynamically Altering Libraries

Use this when you want to dynamically specify JS (or CSS) Libraries used across multiple requests.
hook_library_info_alter(&$libraries, $extension)
Allows modules and themes to change libraries' definitions.
An example of this is the Color module which uses this hook to replace CSS Libraries with the “colored” CSS libraries.

Dynamically Adding Libraries

This is most like D7’s Libraries. Use it to programmatically add an entire library definition. And they are still cached.
Modules may implement hook_library_info_build() to add dynamic library definitions
function my_module_library_info_build() {
  $libs = array();
  $libs['my-lib'] = [
    'js' => [
      'my-lib-code.js' => [],
    ],
  ]
}

Sneaky JavaScript

While you’re suppose to use libraries you could attach into HTML head and create a <script> tag directly. These are (re)built on every single request and therefore aren’t cached and can slow down Drupal, so beware.
If possible, it’s best to leave your JS file(s) static and just use JS Settings configurations.
$page['#attached']['html_head'][] = [
  [
    '#type' => 'html_tag',
    '#tag' => 'script',
      '#attributes' => [
        'src' => 'some-path/my-file.js',
      ],
  ], 'my-mode-js', // an identifier for Drupal
];

In Closing

Hopefully this shed some light on D8’s JavaScript handling. Happy coding.
   Posted on  Wednesday, June 28, 2017  / 

Managing JavaScript in Drupal 8 with Libraries
Drupal 8’s JavaScript handling is a conceptual extension of D7’s hook_library()and the D7 Libraries API Module.
Libraries are defined in YAML format, of course. You can define one or more libraries in each file.
Define a Library
Create or edit the <some-file-name>.libraries.yml file that goes in the root of your theme or module:
this-lib-name:
 js:
 js-path/my-theme.js: {}
some-file-name can be any name really, but should be the name of your theme or module.
Drupal will aggregate JS files by default, so to avoid that if necessary:
js-path/my-theme.js: { preprocess: false }
Of course, adjust js-path as needed. See PSR-4 namespaces and autoloading in Drupal 8 for more info on pathing.

Library Options

You can optionally provide a version number per library, but Drupal doesn’t use it for anything:
this-lib-name:
  version: "1.0.1"
You can also define dependencies per library, which are followed:
this-lib-name:
  dependencies:
    - core/jquery
D8 by default loads JS into the footer; to load to the header:
this-lib-name:
  header: true

Attaching Libraries in a Theme

Reference them in your my-theme-name.info.yml file. They load globally as in on every page.
libraries:
  - core/jquery
  - my-theme-name/this-lib-name
Here we’re loading our libraries this-lib-name and core/jquery (which is no longer loaded by default).

Attaching Libraries in Twig

You can attach a JS library from a twig template. It will only load if the template loads which means you can conditionally load it based on the naming structure of the Twig template file.
{{ attach_library('my-theme-name/some-other-lib') }}

Attaching Libraries in your Module’s PHP

PHP allows you to control what libraries are loaded and when.
function mymodule_page_attachments(array &$attachments) {
  $attachments['#attached']['library'][] =
    'mymodule/some-other-lib';
}
Of course you can load any number of libraries using this, and related, hooks.

Attaching Libraries in your Theme’s PHP

If not loading everywhere by using the .yml file.
function mytheme_preprocess_page(&$variables) {
  $variables['#attached']['library'][] =
    'mytheme/some-other-lib';
}
See also related THEME_preprocess_HOOK()’s. Although some discourage using these hooks as they’re intended for preprocessing variables.

Conditional Libraries in PHP

To support D8’s caching, if you want to *conditionally* attach libraries, you need to provide cacheability metadata*.
function mytheme_or_module_preprocess_page(&$variables) {
  $variables['page']['#cache']['contexts'][] = 'url.path';
  // above line sets the cacheability metadata
 
  if (\Drupal::service('path.matcher')->isFrontPage()) {
    $variables['#attached']['library'][] =
      'mytheme_or_module/some-other-lib';
    }
}
*Metadata is comprised of a combination of up to 3 things: tags, contexts, and max-age. See the Cache API https://www.drupal.org/developing/api/8/cache for more info.

Loading External JavaScript

External “libraries” still have to be defined inside Drupal libraries*.
this-lib-name:
  js:
    https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.8/
      angular.js: { type: external }
Since Drupal will minify, if it already is, let D know:
{ type: external, minified: true }
If attributes are needed in the resulting <script> line:
{ type: external , attributes: { defer: true, async: true } }
*I “broke” the code lines for readability, but it’s not legal.

JavaScript Settings

To add “computed” settings or configuration, first you have to define a dependency on core/drupalSettings.
this-lib:
  dependencies:
    - core/jquery
    - core/drupalSettings
Then…
function mytheme_preprocess_page(&$vars) {
  $vars['#attached']['library'][] = 'mytheme/this-lib';
  $vars['#attached']['drupalSettings']['mytheme']
    ['this-lib']['some-prop'] = $some_var;
}
Then access the some-prop setting in JS with:
console.log(drupalSettings.mytheme.this-lib.some-prop);

Manipulating Libraries

The theme is able to use two new directives, libraries-extend and libraries-override to extend, remove or replace whole libraries or individual library files.
Both of these are placed in the theme’s my-theme.info.yml file.

Libraries-Extend

By “extending” a library it means the new library is always loaded with the target library, regardless of conditions.
libraries-extend:
  other_theme_or_module/some-lib:
    - mytheme/some-other-lib
Here, the some-other-lib of the theme is used to extend some-lib of some mytheme_or_module.

Libraries-Override

This directive is more powerful, but when dealing with JS (unlike CSS which may just result in poor layout/design), you can break JavaScript on your site by not paying close attention to JS code dependencies.
You can remove a whole library:
libraries-override:
  other_theme_or_module/some-lib: false
Or remove a library file:
libraries-override:
  other_theme_or_module/some-lib:
    js:
      full-path-to-library/some-file.js: false
Or replace a whole libs:
libraries-override:
  other_theme_or_module/some-lib: mytheme/some-other-lib
Or replace a library file:
libraries-override:
  other_theme_or_module/some-lib:
    js:
      full-path-to-library/some-file.js: path-to-theme-lib/some-other-file.js

Inline JavaScript

Almost always JavaScript should be included in a library.
But if you must, put the complete script tag in the html.html.twig file (yes, “html” is repeated twice.)

Dynamically Altering Libraries

Use this when you want to dynamically specify JS (or CSS) Libraries used across multiple requests.
hook_library_info_alter(&$libraries, $extension)
Allows modules and themes to change libraries' definitions.
An example of this is the Color module which uses this hook to replace CSS Libraries with the “colored” CSS libraries.

Dynamically Adding Libraries

This is most like D7’s Libraries. Use it to programmatically add an entire library definition. And they are still cached.
Modules may implement hook_library_info_build() to add dynamic library definitions
function my_module_library_info_build() {
  $libs = array();
  $libs['my-lib'] = [
    'js' => [
      'my-lib-code.js' => [],
    ],
  ]
}

Sneaky JavaScript

While you’re suppose to use libraries you could attach into HTML head and create a <script> tag directly. These are (re)built on every single request and therefore aren’t cached and can slow down Drupal, so beware.
If possible, it’s best to leave your JS file(s) static and just use JS Settings configurations.
$page['#attached']['html_head'][] = [
  [
    '#type' => 'html_tag',
    '#tag' => 'script',
      '#attributes' => [
        'src' => 'some-path/my-file.js',
      ],
  ], 'my-mode-js', // an identifier for Drupal
];

In Closing

Hopefully this shed some light on D8’s JavaScript handling. Happy coding.

Posted in: , , Read Complete Article»

Thursday 4 February 2016

10 good reasons why you should install Gnu/linux

10 good reasons why you should install Gnu/linux, In the end, you can decide for yourself whether they're reason enough to migrate from other operating systems.



 1: Viruses/malware

This reason is always at the top of my list. Sometimes we don't focus on the things about the virus/malware while installing unknown software or inserting flash drive in USB, you can't know where they're getting those applications or attachments from. You can make sure those machines have antivirus and anti-spyware, but why even take the chance? When you are using the Gnu/Linux operating system, this concern becomes moot.

 

2: Security

This can be summed up easily. If you don't give any one the root password, they can't run with root privileges. Of course, you hit a little snag when using a distribution like Ubuntu. For any sudo-based operating system, you will need to edit the /etc/sudoers file to give user privileges they need.

 

3: Cost effectiveness

Let's say you have a younger user who is getting a hand-me-down machine that needs an OS reinstall. If you don't have that copy of Windows around, you're stuck purchasing a new copy. This can also be applied to any number of applications you might have to pay for. Avoid these costs altogether by handing that child the same machine running Gnu/Linux. You won't have pay for the OS license or any application that child might need or want. On top of that, they'll have the Add/Remove Software tool ,where they can hunt around and find just about anything they would need... all on their own! You can also run a modern distribution on much less hardware than you will need for Vista or Windows 7.

 

4: Age-specific tools

Did you know there are distributions/software groups designed specifically for young adults and children? There is Sugar, geared for K-6, Edubuntu, for ages 3-18, LinuxKidX, for ages 2-15, Foresight Kids, for ages 3-12, and many others. These age-specific tools are well suited for the group they target with graphics and language tuned for the age range. And some of the distributions geared specifically for younger kids lock the operating system down tightly so that only certain tasks can be run.

 

5: Netbooks / Low-end configuration devices

The Gnu/Linux operating system can run on low configuration devices and netbooks. You can install either a full-blown OS or a netbook-specific OS, along with whatever software you need on the netbook, making it an excellent choice for you. Gnu/Linux runs with no lag on low configuration or old Pc's. Puppy Linux can run on 333MHz CPU and 64MB Disk Spac. However having 256MB RAM and a 512MB swap file is more realistic.

 

6: Agile learners

If you put a Linux-based machine in front of a young user, you won't hear complaints like, "Why can't it run Quicken!" or "I need my custom payroll app to run on this!" Most of the people will master the Linux operating system quickly (and adroitly), with a minimal learning curve. Young minds adapt so well, you won't have any trouble adjusting to any differences. You could probably sit with a Gentoo box running CDE or AfterStep and in less time it took you to know what Linux means.

 

7: Staying in step

I know this one will bring out the ire in many readers. I'm not saying any operating system is used more than any other. But Linux is used worldwide. Many countries as a whole have adopted Linux. The future of Linux is very bright — and it seems to be getting brighter. So why not give you a head start on what could possibly be the future of the PC? This also applies for those fledgling IT pros out there. If Windows is so user friendly, you spending most of their time on Linux should have no problem grasping Windows. Gnu/Linux passes 1600 Games which competes with windows in gaming. In fact, I would argue that it will enhance the your ability to fully grasp the operating system and how the PC really works.

 

8: Learning opportunities

Open source emboldens education. It practically screams, "Open me up and learn!" What better way to help youngsters learn than by giving them the ability to do just that? With really curious people, the desire to learn is extraordinary — so why lock them down with closed source software? When a people is exposed to open source software and an open source operating system, the educational opportunities are limitless.

 

9: A lesson in community

Teaching you the value of open source software helps them understand community. Although you aren't likely to open up the source code of the applications they're using, in today's constantly evolving, community-driven world, they need every advantage they can get as they grow up. Having a sound understanding of open source will help them to understand, at an early stage, what it means to really work with and for a team. Using Linux indirectly teaches you the benefit of volunteering — something many of us need to learn more about. 



10: Content filtering

Linux has numerous ways to handle content filtering for you. From the manual editing of the /etc/hosts file, you can filter content in Linux far more granularly than you can in Windows — and just as easily. Add to this the ability to lock down what you can and can't do (without having to add third-party software), and Linux quickly becomes a safe computing environment for you.

 

Your take

Would you trust your security with Linux? Do you think Linux could help — or hinder — your learning on a PC? Which operating system do you think is the best choice for you? Linux? Windows? OS X? Join the discussion and share your thoughts.
   Posted on  Thursday, February 04, 2016  / 

10 good reasons why you should install Gnu/linux, In the end, you can decide for yourself whether they're reason enough to migrate from other operating systems.



 1: Viruses/malware

This reason is always at the top of my list. Sometimes we don't focus on the things about the virus/malware while installing unknown software or inserting flash drive in USB, you can't know where they're getting those applications or attachments from. You can make sure those machines have antivirus and anti-spyware, but why even take the chance? When you are using the Gnu/Linux operating system, this concern becomes moot.

 

2: Security

This can be summed up easily. If you don't give any one the root password, they can't run with root privileges. Of course, you hit a little snag when using a distribution like Ubuntu. For any sudo-based operating system, you will need to edit the /etc/sudoers file to give user privileges they need.

 

3: Cost effectiveness

Let's say you have a younger user who is getting a hand-me-down machine that needs an OS reinstall. If you don't have that copy of Windows around, you're stuck purchasing a new copy. This can also be applied to any number of applications you might have to pay for. Avoid these costs altogether by handing that child the same machine running Gnu/Linux. You won't have pay for the OS license or any application that child might need or want. On top of that, they'll have the Add/Remove Software tool ,where they can hunt around and find just about anything they would need... all on their own! You can also run a modern distribution on much less hardware than you will need for Vista or Windows 7.

 

4: Age-specific tools

Did you know there are distributions/software groups designed specifically for young adults and children? There is Sugar, geared for K-6, Edubuntu, for ages 3-18, LinuxKidX, for ages 2-15, Foresight Kids, for ages 3-12, and many others. These age-specific tools are well suited for the group they target with graphics and language tuned for the age range. And some of the distributions geared specifically for younger kids lock the operating system down tightly so that only certain tasks can be run.

 

5: Netbooks / Low-end configuration devices

The Gnu/Linux operating system can run on low configuration devices and netbooks. You can install either a full-blown OS or a netbook-specific OS, along with whatever software you need on the netbook, making it an excellent choice for you. Gnu/Linux runs with no lag on low configuration or old Pc's. Puppy Linux can run on 333MHz CPU and 64MB Disk Spac. However having 256MB RAM and a 512MB swap file is more realistic.

 

6: Agile learners

If you put a Linux-based machine in front of a young user, you won't hear complaints like, "Why can't it run Quicken!" or "I need my custom payroll app to run on this!" Most of the people will master the Linux operating system quickly (and adroitly), with a minimal learning curve. Young minds adapt so well, you won't have any trouble adjusting to any differences. You could probably sit with a Gentoo box running CDE or AfterStep and in less time it took you to know what Linux means.

 

7: Staying in step

I know this one will bring out the ire in many readers. I'm not saying any operating system is used more than any other. But Linux is used worldwide. Many countries as a whole have adopted Linux. The future of Linux is very bright — and it seems to be getting brighter. So why not give you a head start on what could possibly be the future of the PC? This also applies for those fledgling IT pros out there. If Windows is so user friendly, you spending most of their time on Linux should have no problem grasping Windows. Gnu/Linux passes 1600 Games which competes with windows in gaming. In fact, I would argue that it will enhance the your ability to fully grasp the operating system and how the PC really works.

 

8: Learning opportunities

Open source emboldens education. It practically screams, "Open me up and learn!" What better way to help youngsters learn than by giving them the ability to do just that? With really curious people, the desire to learn is extraordinary — so why lock them down with closed source software? When a people is exposed to open source software and an open source operating system, the educational opportunities are limitless.

 

9: A lesson in community

Teaching you the value of open source software helps them understand community. Although you aren't likely to open up the source code of the applications they're using, in today's constantly evolving, community-driven world, they need every advantage they can get as they grow up. Having a sound understanding of open source will help them to understand, at an early stage, what it means to really work with and for a team. Using Linux indirectly teaches you the benefit of volunteering — something many of us need to learn more about. 



10: Content filtering

Linux has numerous ways to handle content filtering for you. From the manual editing of the /etc/hosts file, you can filter content in Linux far more granularly than you can in Windows — and just as easily. Add to this the ability to lock down what you can and can't do (without having to add third-party software), and Linux quickly becomes a safe computing environment for you.

 

Your take

Would you trust your security with Linux? Do you think Linux could help — or hinder — your learning on a PC? Which operating system do you think is the best choice for you? Linux? Windows? OS X? Join the discussion and share your thoughts.

Thursday 24 December 2015

Act now to save Net Neutrality in Inida from false internet so called "FREE BASICS"

 WHAT FACEBOOK WON’T TELL YOU
0r
THE TOP 10 FACTS ABOUT FREE BASICS

Facebook is trying to misguide people by campaigning for "Free basics" on the name of Digital equality, asking people to send emails to TRAI supporting that. 
 
Please don't fall in the trap, Internet.org is repackaged as FreeBasics, it won't provides whole internet for free for eveyone and it is restricting the Net Neutraility where internet should be avilable for everyone whithout restrictions and hence the democratic spirit of Internet.


 How you can help

  • Click here to send an email to TRAI in support of Net Neutrality.
  • Click here to mail your MP to support Net Neutrality.


   Posted on  Thursday, December 24, 2015  / 

 WHAT FACEBOOK WON’T TELL YOU
0r
THE TOP 10 FACTS ABOUT FREE BASICS

Facebook is trying to misguide people by campaigning for "Free basics" on the name of Digital equality, asking people to send emails to TRAI supporting that. 
 
Please don't fall in the trap, Internet.org is repackaged as FreeBasics, it won't provides whole internet for free for eveyone and it is restricting the Net Neutraility where internet should be avilable for everyone whithout restrictions and hence the democratic spirit of Internet.


 How you can help

  • Click here to send an email to TRAI in support of Net Neutrality.
  • Click here to mail your MP to support Net Neutrality.


Posted in: , , Read Complete Article»

Thursday 17 December 2015

MediaTek announces open-source development platform for IoT devices

MediaTek Labs has announced the launch of the MediaTek LinkIt Smart 7688, a development platform enabling rapid development of advanced Wi-Fi based devices such as IP cameras, surveillance devices, smart appliances and Wi-Fi gateways that make use of cloud services.

Two versions of the platform's hardware development kit (HDK) are available: the LinkIt Smart 7688, which includes a microprocessor unit (MPU) based on the MediaTek MT7688AN system-on-chip (SOC), and the LinkIt Smart 7688 Duo, which in addition to the MPU includes a microcontroller unit (MCU) and is Arduino compatible. Both development boards feature built-in Wi-Fi, 128MB RAM and 32MB flash, and a wide variety of options for connecting peripherals.

The MediaTek LinkIt Smart 7688 and 7688 Duo development boards are available to ship globally. The LinkIt Smart 7688 costs US$12.90, while the LinkIt Smart 7688 Duo costs US$15.90. A fully open-source version of the Wi-Fi driver is in development and expected to be made available by MediaTek Labs in the coming months, the company added. 

"MediaTek Labs is focused on stimulating innovation in IoT and is pleased to extend its LinkIt family of development platforms to the open-source and web developer communities, enabling broader product development for a more connected world," said Marc Naddell, VP of MediaTek Labs. 

"The new LinkIt Smart 7688 development platform will appeal to a wide range of developers because of its open-source software compatibility, support for several popular programming languages and use of Linux."
   Posted on  Thursday, December 17, 2015  / 

MediaTek Labs has announced the launch of the MediaTek LinkIt Smart 7688, a development platform enabling rapid development of advanced Wi-Fi based devices such as IP cameras, surveillance devices, smart appliances and Wi-Fi gateways that make use of cloud services.

Two versions of the platform's hardware development kit (HDK) are available: the LinkIt Smart 7688, which includes a microprocessor unit (MPU) based on the MediaTek MT7688AN system-on-chip (SOC), and the LinkIt Smart 7688 Duo, which in addition to the MPU includes a microcontroller unit (MCU) and is Arduino compatible. Both development boards feature built-in Wi-Fi, 128MB RAM and 32MB flash, and a wide variety of options for connecting peripherals.

The MediaTek LinkIt Smart 7688 and 7688 Duo development boards are available to ship globally. The LinkIt Smart 7688 costs US$12.90, while the LinkIt Smart 7688 Duo costs US$15.90. A fully open-source version of the Wi-Fi driver is in development and expected to be made available by MediaTek Labs in the coming months, the company added. 

"MediaTek Labs is focused on stimulating innovation in IoT and is pleased to extend its LinkIt family of development platforms to the open-source and web developer communities, enabling broader product development for a more connected world," said Marc Naddell, VP of MediaTek Labs. 

"The new LinkIt Smart 7688 development platform will appeal to a wide range of developers because of its open-source software compatibility, support for several popular programming languages and use of Linux."

Thursday 19 November 2015

Now Microsoft's Visual Studio Source Code is Open-Source for GNU/Linux, OS X, and Windows

Visual Studio Code is now licensed under the MIT license


During the Connect(); 2015 developer event that took place on November 18, 2015, in New York City, USA, Microsoft had the great pleasure of announcing that its Visual Studio Code integrated development environment software is now open source.

Immediately after the huge announcement, Microsoft published the Visual Code Studio sources on the GitHub project hosting website, urging the community to contribute to the development of the software in any way they can. "You spoke and we listened. With this release, VS Code development is now open source on GitHub," said Microsoft.
The cross-platform web and cloud development code editor (IDE) is now distributed for free as an open-source application on GitHub, licensed under the MIT license for all supported operating systems, including GNU/Linux, Mac OS X, and, of course, Microsoft Windows.
The latest available release at the moment of writing this article is version 0.10.1, but Microsoft announced that it put the software in Beta and declared it "the most significant release since the launch," and just by looking at the release notes, we can notice that Visual Studio Code Beta is a massive update with numerous new features.
Among the most important ones, we can mention support for TextMate snippets, debug console improvements, easy variable selection, debug environment configuration, node.js debugging, improved debug hover behavior, improved syntax highlighting, environment variable substitution, and new difference view settings.
   Posted on  Thursday, November 19, 2015  / 

Visual Studio Code is now licensed under the MIT license


During the Connect(); 2015 developer event that took place on November 18, 2015, in New York City, USA, Microsoft had the great pleasure of announcing that its Visual Studio Code integrated development environment software is now open source.

Immediately after the huge announcement, Microsoft published the Visual Code Studio sources on the GitHub project hosting website, urging the community to contribute to the development of the software in any way they can. "You spoke and we listened. With this release, VS Code development is now open source on GitHub," said Microsoft.
The cross-platform web and cloud development code editor (IDE) is now distributed for free as an open-source application on GitHub, licensed under the MIT license for all supported operating systems, including GNU/Linux, Mac OS X, and, of course, Microsoft Windows.
The latest available release at the moment of writing this article is version 0.10.1, but Microsoft announced that it put the software in Beta and declared it "the most significant release since the launch," and just by looking at the release notes, we can notice that Visual Studio Code Beta is a massive update with numerous new features.
Among the most important ones, we can mention support for TextMate snippets, debug console improvements, easy variable selection, debug environment configuration, node.js debugging, improved debug hover behavior, improved syntax highlighting, environment variable substitution, and new difference view settings.

Thursday 12 November 2015

Steam for Linux Passes 1600 Games Exactly Three Years After Launch

Steam has changed the Linux ecosystem forever


Steam for Linux has been around for three years, and it completely changed the landscape, bringing a lot of games to Gnu/Linux and signaling to the industry that this OS is ready to become a gaming platform for who want to Switch to Gnu/Linux.
The launch of Steam for Linux back in November 2012 has done much more than just convince a lot of developers to port their games to the open source OS. It sent a clear signal to the entire community, not just gaming, that it’s time to look at Gnu/Linux more carefully and start building products for it and expecting more Gnu/Linux laptops for next upcoming years.
Let’s just take the example of Nvidia and AMD. Both companies had drivers for Linux users, but they were in a really poor state, and they didn’t seem to care. The advent of gaming changed all that and we now have much more frequent driver releases, and it’s clear that the developers from these companies have a lot more work to do. Also, Nvidia is working to port the available middleware as well.

Where is Steam for Gnu/Linux going?

Right now, there are over 1600 games (1618) on the Steam for Linux, and the number of releases increases all the time. More developers choose to port the titles for Linux users, developers change their engines to export for Linux, and feature parity between Windows and Linux graphics will be a fact once the new Vulkan (OpenGL spiritual successor) is released.
We can’t really say that Steam for Linux is a success, as it’s still too early to tell. What we do know is that Valve is also heavily investing a new Linux operating system named SteamOS, based on Debian, and it has big plans for the future.
Valve is playing the long game and they don’t seem to expect fast results. As it stands right now, the Linux users account for about 1%, but they do hope that’s going to change in the future, albeit not the immediate one.
   Posted on  Thursday, November 12, 2015  / 

Steam has changed the Linux ecosystem forever


Steam for Linux has been around for three years, and it completely changed the landscape, bringing a lot of games to Gnu/Linux and signaling to the industry that this OS is ready to become a gaming platform for who want to Switch to Gnu/Linux.
The launch of Steam for Linux back in November 2012 has done much more than just convince a lot of developers to port their games to the open source OS. It sent a clear signal to the entire community, not just gaming, that it’s time to look at Gnu/Linux more carefully and start building products for it and expecting more Gnu/Linux laptops for next upcoming years.
Let’s just take the example of Nvidia and AMD. Both companies had drivers for Linux users, but they were in a really poor state, and they didn’t seem to care. The advent of gaming changed all that and we now have much more frequent driver releases, and it’s clear that the developers from these companies have a lot more work to do. Also, Nvidia is working to port the available middleware as well.

Where is Steam for Gnu/Linux going?

Right now, there are over 1600 games (1618) on the Steam for Linux, and the number of releases increases all the time. More developers choose to port the titles for Linux users, developers change their engines to export for Linux, and feature parity between Windows and Linux graphics will be a fact once the new Vulkan (OpenGL spiritual successor) is released.
We can’t really say that Steam for Linux is a success, as it’s still too early to tell. What we do know is that Valve is also heavily investing a new Linux operating system named SteamOS, based on Debian, and it has big plans for the future.
Valve is playing the long game and they don’t seem to expect fast results. As it stands right now, the Linux users account for about 1%, but they do hope that’s going to change in the future, albeit not the immediate one.

Saturday 7 November 2015

Microsoft Names End Date For Windows, 7 Is Going Away, Keep Calm and Switch to Gnu/Linux


A new message inviting Windows users to adopt Gnu/Linux is making the rounds online

There are a lot of malicious Linux messages on the Internet against Microsoft, Apple, and others, but some of them are actually very well done, friendly, and could be easily adopted as a motto.

These types of messages are bound to increase in frequency as we approach the end of life for Windows XP, on April 8. Even if the message is not specifically targeted at Windows, everyone seems to assume that this is the case.

Fans of an older Windows operating system have reason to feel the pang of nostalgia today: Microsoft has quietly announced the end date for Windows 7. This end date will affect the sale of computers with the operating system pre-installed, but the announcement also lists two further dates when support will be cancelled.

According to their Windows Lifecycle Fact Sheet page, the sale of new Windows 7 Professional machines from authorized retailers will end on October 31, 2016; the sale of Windows 7 Home machines ended last year in October. The end of the support for the OS was January of this year for the mainstream support, with the end of extended support coming around in January of 2020.

Interestingly, Windows 8 has a weird end of life schedule, too. Windows 8 pre-installed machines will leave the market before the end of the run for Windows 7 Pro, as retail sales of the devices will cease on June 30, 2016. Windows 8.1 machines get to hang on a little longer, ending on the same date as the sales of Windows 7 Pro machines, October 31. The end of mainstream support for 8.1 will be in January of 2018, with extended support ending in January of 2023.

Here’s an interesting mention from the Fact Sheet that comes with no fanfare or explanation: Windows 10 mainstream support is slated to end in five years; extended support will end in ten years. While this probably only indicates that Microsoft is preparing for service pack updates–as the case with the Windows 8 and Windows 8.1 dates, meaning we can expect a different time frame for any versions like Windows 10.1 or later–it does call into question the “software as a service” shift that was to take place with the new OS. The early reports from industry experts had a “the last software you’ll ever need” feel to their assessment due to the changing SaaS model of charging for new cloud-based features.

The Gnu/Linux community is expecting that a number of Windows users will choose to stop using Windows products and switch to a Gnu/Linux distribution. That is very unlikely, but it hasn't stopped people from constantly inviting users to try Linux and from modifying well-known memes in order to get the message across. Xiaomi's long-rumored Gnu/Linux laptop will be entering production in the first part of 2016, which will be serious competition with windows.

If you have seen any more interesting and funny Linux messages, don't be shy and leave a comment in the section below.
   Posted on  Saturday, November 07, 2015  / 


A new message inviting Windows users to adopt Gnu/Linux is making the rounds online

There are a lot of malicious Linux messages on the Internet against Microsoft, Apple, and others, but some of them are actually very well done, friendly, and could be easily adopted as a motto.

These types of messages are bound to increase in frequency as we approach the end of life for Windows XP, on April 8. Even if the message is not specifically targeted at Windows, everyone seems to assume that this is the case.

Fans of an older Windows operating system have reason to feel the pang of nostalgia today: Microsoft has quietly announced the end date for Windows 7. This end date will affect the sale of computers with the operating system pre-installed, but the announcement also lists two further dates when support will be cancelled.

According to their Windows Lifecycle Fact Sheet page, the sale of new Windows 7 Professional machines from authorized retailers will end on October 31, 2016; the sale of Windows 7 Home machines ended last year in October. The end of the support for the OS was January of this year for the mainstream support, with the end of extended support coming around in January of 2020.

Interestingly, Windows 8 has a weird end of life schedule, too. Windows 8 pre-installed machines will leave the market before the end of the run for Windows 7 Pro, as retail sales of the devices will cease on June 30, 2016. Windows 8.1 machines get to hang on a little longer, ending on the same date as the sales of Windows 7 Pro machines, October 31. The end of mainstream support for 8.1 will be in January of 2018, with extended support ending in January of 2023.

Here’s an interesting mention from the Fact Sheet that comes with no fanfare or explanation: Windows 10 mainstream support is slated to end in five years; extended support will end in ten years. While this probably only indicates that Microsoft is preparing for service pack updates–as the case with the Windows 8 and Windows 8.1 dates, meaning we can expect a different time frame for any versions like Windows 10.1 or later–it does call into question the “software as a service” shift that was to take place with the new OS. The early reports from industry experts had a “the last software you’ll ever need” feel to their assessment due to the changing SaaS model of charging for new cloud-based features.

The Gnu/Linux community is expecting that a number of Windows users will choose to stop using Windows products and switch to a Gnu/Linux distribution. That is very unlikely, but it hasn't stopped people from constantly inviting users to try Linux and from modifying well-known memes in order to get the message across. Xiaomi's long-rumored Gnu/Linux laptop will be entering production in the first part of 2016, which will be serious competition with windows.

If you have seen any more interesting and funny Linux messages, don't be shy and leave a comment in the section below.

Tuesday 27 October 2015

Xiaomi Linux Laptop To Enter Production Early Next Year

Xiaomi’s long-rumoured Linux laptop will enter production in the first part of 2016, a new report claims.
Industry watcher Digitimes’ sources also reveal that China’s Xiaomi plans to launch two notebooks: one sporting a 12.5-inch display and another with a 13.3-inch display.
A difference in screen size is not the only distinction as each device will be made by a separate ODM:
The model with a 12.5-inch screen will be manufactured by Inventec (who make laptops for Acer, Toshiba and HP), with an initial order of 250,000 units.
The slightly larger device is to be made by Compal Electronics (known for manufacturing Apple devices, and various PlayStation, Xbox and Nintendo games consoles), with Xiaomi placing an order for 300,000 units.
Industry analysts say Xiaomi is now the world’s third biggest smartphone vendor – but Xiaomi is much more than a smartphone maker.
It also makes the world’s second most popular wearable device, the Mi Band, and offers Smart TVs, routers, IoT home products and even an air purifier – ! – as part of its ‘lifestyle strategy’.
It’s very much a case of when Xiaomi makes a laptop, not if.
Manufacturing sources speaking to Digitimes earlier in the year said the company was developing a 15.6-inch notebook with its ODM partners. No firm production plans were set at the time.
Now those sources claim there are two laptops, neither of which is 15-inch in size, but production of which is to commence in the first half of 2016.
‘Xiaomi is considering selling its new notebooks as part of a smartphone bundle’
The manufacture and design of electronics is always subject to change and revision. What a source hears one month can be contradicted a few weeks later as component costs fluctuate, manufacturing availability changes, and market trends prompt a rethink.
With word of the Xiaomi laptop entering production, it’s clear a direction has now been settled on.
Xiaomi’s notebooks will, according to the same sources, be priced cheaply but offer high performance, just like the company’s smartphones.
In fact, Xiaomi is said to be considering selling its new notebooks as a bundle with a new smartphone – a way to not only reinforce its overall lifestyle strategy, but ensure its new notebooks get off to a stellar start.
And with a new, untested Linux-based OS onboard, it may well need the push.
If anyone stands a chance of taking Linux mainstream in China it’s Xiaomi.
   Posted on  Tuesday, October 27, 2015  / 

Xiaomi’s long-rumoured Linux laptop will enter production in the first part of 2016, a new report claims.
Industry watcher Digitimes’ sources also reveal that China’s Xiaomi plans to launch two notebooks: one sporting a 12.5-inch display and another with a 13.3-inch display.
A difference in screen size is not the only distinction as each device will be made by a separate ODM:
The model with a 12.5-inch screen will be manufactured by Inventec (who make laptops for Acer, Toshiba and HP), with an initial order of 250,000 units.
The slightly larger device is to be made by Compal Electronics (known for manufacturing Apple devices, and various PlayStation, Xbox and Nintendo games consoles), with Xiaomi placing an order for 300,000 units.
Industry analysts say Xiaomi is now the world’s third biggest smartphone vendor – but Xiaomi is much more than a smartphone maker.
It also makes the world’s second most popular wearable device, the Mi Band, and offers Smart TVs, routers, IoT home products and even an air purifier – ! – as part of its ‘lifestyle strategy’.
It’s very much a case of when Xiaomi makes a laptop, not if.
Manufacturing sources speaking to Digitimes earlier in the year said the company was developing a 15.6-inch notebook with its ODM partners. No firm production plans were set at the time.
Now those sources claim there are two laptops, neither of which is 15-inch in size, but production of which is to commence in the first half of 2016.
‘Xiaomi is considering selling its new notebooks as part of a smartphone bundle’
The manufacture and design of electronics is always subject to change and revision. What a source hears one month can be contradicted a few weeks later as component costs fluctuate, manufacturing availability changes, and market trends prompt a rethink.
With word of the Xiaomi laptop entering production, it’s clear a direction has now been settled on.
Xiaomi’s notebooks will, according to the same sources, be priced cheaply but offer high performance, just like the company’s smartphones.
In fact, Xiaomi is said to be considering selling its new notebooks as a bundle with a new smartphone – a way to not only reinforce its overall lifestyle strategy, but ensure its new notebooks get off to a stellar start.
And with a new, untested Linux-based OS onboard, it may well need the push.
If anyone stands a chance of taking Linux mainstream in China it’s Xiaomi.

Saturday 24 October 2015

10 Linux GUI tools for sysadmins




Has administering Linux via the command line confounded you? Here are 10 GUI tools that might make your life as a Linux administrator much easier.
linuxadminhero.jpg

If you're a system administrator, it's reached a point where Linux has become a must-know. This is especially true when you're working in a larger environment. Many organizations have migrated from Windows, where everything is managed with a point-and-click GUI. Fortunately, Linux has plenty of GUI tools that can help you avoid the command line (although every serious sysadmin should become familiar with the commands).

What are some good GUI tools that can simplify your Linux sysadmin tasks? Let's take a look at 10 of them.

1: MySQL Workbench

MySQL Workbench is one of my favorite tools for working with MySQL databases. You can work locally or remotely with this well designed GUI tool. But MySQL Workbench isn't just for managing previously created databases. It also helps you design, develop, and administer MySQL databases. A newer addition to the MySQL Workbench set of tools is the ability to easily migrate Microsoft SQL Server, Microsoft Access, Sybase ASE, PostgreSQL, and other RDBMS tables, objects, and data to MySQL. That alone makes MySQL Workbench worth using.

2: phpMyAdmin

phpMyAdmin is another MySQL administration tool... only web based. Although it doesn't offer the bells and whistles of MySQL Workbench, it's a much more user-friendly tool. With phpMyAdmin you can create and manage MySQL databases via a standard web browser. This means you can install phpMyAdmin on a headless Linux server and connect to it through any browser that has access to the machine.

3: Webmin

Webmin is a web-based one-stop-shop tool for administering Linux servers. With Webmin you can manage nearly every single aspect of a server—user accounts, Apache, DNS, file sharing, security, databases, and much more. And if what you need isn't included with the default installation, a massive number of third-party modules are available to take up the slack.

4: YaST

YaST stands for Yet Another Setup Tool. It enables system configuration for enterprise-grade SUSE and openSUSE and serves as both the installation and configuration tool for the platform. With YaST you can configure hardware, network, and services and tune system security, all with an easy-to-use, attractive GUI. YaST is installed by default in all SUSE and openSUSE platforms.

5: Shorewall

Shorewall is a GUI for configuring iptables. Yes, there are other GUIs for tuning the security of your system, but many of them don't go nearly as deep as Shorewall. Where an app like UFW is one of the best security tuners for the desktop, Shorewall is tops for the server. With this particular security GUI, you can configure gateways, VPNs, traffic controlling, blacklisting, and much more. If you're serious about your firewall, and you want a GUI for the job, Shorewall is what you want.

6: Apache Directory

Apache Directory is about the only solid GUI tool for managing any LDAP server (though it is designed particularly for ApacheDS). It's an Eclipse RCP application and can serve as your LDAP browser, schema editor, ApacheDS configuration editor, LDIF editor, ACI editor, and more. The app also contains the latest ApacheDS, which means you can use it to create a DS server in no time.

7: CUPS

CUPS is the Linux printer service that also happens to have a web-based GUI tool for the management of printers, printer classes, and print queues. It is also possible to enable Kerberos authentication and remote administration. One really nice thing about this GUI is its built-in help system. You can learn nearly everything you need to manage your print server.

8: cPanel

cPanel is one of the finest web-based administration tools you'll use. It lets you configure sites, customers' sites and services, and quite a bit more. With this tool you can configure/manage mail, security, domains, apps, apps, files, databases, logs—the list goes on and on. The only drawback to using cPanel is that it's not free. Check out the pricing matrix to see if there's a plan to fit your needs.

9: Zenmap

Zenmap is the official front end for the Nmap network scanner. With this tool, both beginners and advanced users can quickly and easily scan their network to troubleshoot issues. After scanning, you can even save the results to comb through them later. Although you won't use this tool to directly administer your system, it will become invaluable in the quest for discovering network-related issues.

10: Cockpit

Cockpit was created by Red Hat to make server administration easier. With this web-based GUI you can tackle tasks like storage administration, journal inspection, starting/stopping services, and multiple server monitoring. Cockpit will run on Fedora Server, Arch Linux, CentOS Atomic, Fedora Atomic, and Red Hat Enterprise Linux.
   Posted on  Saturday, October 24, 2015  / 




Has administering Linux via the command line confounded you? Here are 10 GUI tools that might make your life as a Linux administrator much easier.
linuxadminhero.jpg

If you're a system administrator, it's reached a point where Linux has become a must-know. This is especially true when you're working in a larger environment. Many organizations have migrated from Windows, where everything is managed with a point-and-click GUI. Fortunately, Linux has plenty of GUI tools that can help you avoid the command line (although every serious sysadmin should become familiar with the commands).

What are some good GUI tools that can simplify your Linux sysadmin tasks? Let's take a look at 10 of them.

1: MySQL Workbench

MySQL Workbench is one of my favorite tools for working with MySQL databases. You can work locally or remotely with this well designed GUI tool. But MySQL Workbench isn't just for managing previously created databases. It also helps you design, develop, and administer MySQL databases. A newer addition to the MySQL Workbench set of tools is the ability to easily migrate Microsoft SQL Server, Microsoft Access, Sybase ASE, PostgreSQL, and other RDBMS tables, objects, and data to MySQL. That alone makes MySQL Workbench worth using.

2: phpMyAdmin

phpMyAdmin is another MySQL administration tool... only web based. Although it doesn't offer the bells and whistles of MySQL Workbench, it's a much more user-friendly tool. With phpMyAdmin you can create and manage MySQL databases via a standard web browser. This means you can install phpMyAdmin on a headless Linux server and connect to it through any browser that has access to the machine.

3: Webmin

Webmin is a web-based one-stop-shop tool for administering Linux servers. With Webmin you can manage nearly every single aspect of a server—user accounts, Apache, DNS, file sharing, security, databases, and much more. And if what you need isn't included with the default installation, a massive number of third-party modules are available to take up the slack.

4: YaST

YaST stands for Yet Another Setup Tool. It enables system configuration for enterprise-grade SUSE and openSUSE and serves as both the installation and configuration tool for the platform. With YaST you can configure hardware, network, and services and tune system security, all with an easy-to-use, attractive GUI. YaST is installed by default in all SUSE and openSUSE platforms.

5: Shorewall

Shorewall is a GUI for configuring iptables. Yes, there are other GUIs for tuning the security of your system, but many of them don't go nearly as deep as Shorewall. Where an app like UFW is one of the best security tuners for the desktop, Shorewall is tops for the server. With this particular security GUI, you can configure gateways, VPNs, traffic controlling, blacklisting, and much more. If you're serious about your firewall, and you want a GUI for the job, Shorewall is what you want.

6: Apache Directory

Apache Directory is about the only solid GUI tool for managing any LDAP server (though it is designed particularly for ApacheDS). It's an Eclipse RCP application and can serve as your LDAP browser, schema editor, ApacheDS configuration editor, LDIF editor, ACI editor, and more. The app also contains the latest ApacheDS, which means you can use it to create a DS server in no time.

7: CUPS

CUPS is the Linux printer service that also happens to have a web-based GUI tool for the management of printers, printer classes, and print queues. It is also possible to enable Kerberos authentication and remote administration. One really nice thing about this GUI is its built-in help system. You can learn nearly everything you need to manage your print server.

8: cPanel

cPanel is one of the finest web-based administration tools you'll use. It lets you configure sites, customers' sites and services, and quite a bit more. With this tool you can configure/manage mail, security, domains, apps, apps, files, databases, logs—the list goes on and on. The only drawback to using cPanel is that it's not free. Check out the pricing matrix to see if there's a plan to fit your needs.

9: Zenmap

Zenmap is the official front end for the Nmap network scanner. With this tool, both beginners and advanced users can quickly and easily scan their network to troubleshoot issues. After scanning, you can even save the results to comb through them later. Although you won't use this tool to directly administer your system, it will become invaluable in the quest for discovering network-related issues.

10: Cockpit

Cockpit was created by Red Hat to make server administration easier. With this web-based GUI you can tackle tasks like storage administration, journal inspection, starting/stopping services, and multiple server monitoring. Cockpit will run on Fedora Server, Arch Linux, CentOS Atomic, Fedora Atomic, and Red Hat Enterprise Linux.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License .