Sourcegraph: An Open-Source Source Code Search Engine

Last updated November 11, 2018

In a recent announcement, a Code Search and Navigation tool named Sourcegraph was declared Open Source. As it makes navigating through Source Code much more convenient, the tool itself going Open Source is definitely a big plus for developers!

We’ve looked into its features and also tried to find out how it can be so helpful for developers who are used to navigate through code hosts like GitHub, GitLab and others quite regularly.

Sourcegraph Features

As stated on their GitHub page, Sourcegraph has the following features:

  • Fast global Code search
  • Intelligent Code recognition
  • Code host Enhancement on GitHub, GitLab and more
  • Extension API for easier third-party integration

You can deploy Sourcegraph on your server and configure it to work with your or your organization’s Git repositories. Once that’s done, you get a search engine where you can search all the codes.

But if you are a lone developer, like me, you can still use Sourcegraph on GitHub or GitHub alternatives like GitLab.

I am going to quickly show you how to use Sourcegraph for a better code navigation on GitHub.

Using Sourcegraph on GitHub

Let’s find out how you can easily try this tool with a Firefox or Chrome extension. Here, we’ve used Firefox:

Sourcegraph Firefox add-on

This is how it looks like with the Sourcegraph extension installed and when you view a file on the Vim repository on GitHub:

Sourcegraph source code engine

Sourcegraph extension on GitHub

Note how we can see the new Sourcegraph buttons within the GitHub interface, thanks to the installed extension. One thing to note is that one need not even login into GitHub to navigate through hosted Code and their repositories in order to make use of the helpful features of Sourcegraph.

When you click on “View File”, the entire look changes and the file is opened for you in a completely new interface within the browser itself:

Sourcegraph extension on GitHub

Without Sourcegraph, if you want to look for files with a particular format, say C++ .cpp files in this example, it is very difficult to filter and view them if we try to use GitHub’s own search engine within this repository:

Sourcegraph extension on GitHub

But once you are using this extension, see how easily you can view all such files in one go within the repository:

Sourcegraph extension on GitHub

Sourcegraph extension on GitHub

Sourcegraph can narrow down through Code Search very intelligently as explained in this video:

Code intelligence in Sourcegraph is powered by Lang Server, which enables identifying the type of Programming Language you are using:

Language support Sourcegraph

Learn more about its usefulness in the following video:

Bonus Tip on using Sourcegraph

Even without installing an extension on your browser, you can directly use Sourcegraph as an IDE on top of any repository on GitHub by just adding “sourcegraph.com/” as a prefix to the repository URL.

For example, the URL for the official Vim repository is:

github.com/vim/vim

To view the same through Sourcegraph, modify the URL as below and you’re good to go:

sourcegraph.com/github.com/vim/vim

I’ve also tested this method with GitLab and it works there too! You can try other repositories as well!

Sourcegraph Developers have a master plan behind declaring it Open Source:

Make basic code intelligence ubiquitous (for every language, and in every editor, code host, etc.)

Make code review continuous and intelligent

Increase the amount and quality of open-source code

Here are the ways they suggest you can contribute to its Development:

So this was a brief look into how Sourcegraph can make the developer’s life a lot more easier and hassle-free.

Are you a Developer? Would you like to adopt this new Open Source Tool in your day-to-day programming tasks? Let us know in the comments section below.

Source

Download Haguichi Linux 1.4.1

Haguichi is an open source application that provides users with a graphical front-end for the Hamachi (now known as LogMeIn) zero-configuration virtual private network (VPN) software under any GNU/Linux operating system.

A quick overview of its features

Key features include a straightforward, modern and easy-to-use graphical user interface, completely customizable commands, system tray integration, pop-up notifications, rich tooltips, as well as collapsible and sortable network list.

The program is translated into more than 15 languages, supports a wide range of open source desktop environments and Linux-based operating systems, and allows users to easily backup and restore their Hamachi configurations.

It sports a familiar graphical user interface that allows users to connect with a single mouse click. It features supports for both IPv4 and IPv6 protocols, automatic connection during startup, automatic reconnection when the connection is lost, custom commands, and much more,

Under the hood and availability

Under the hood, we can report that the application is written in the Vala programming language. It is also very important to mention that you will need to download and install the Hamachi client before installing this software on your Linux box. Be aware that Hamachi is now know as LogMeIn.

Officially supported Linux distributions include Ubuntu, Arch Linux, openSUSE, Linux Mint, elementary OS, Fedora, and Debian GNU/Linux, for which the developers offer binary installers. A source archive is also available for download, allowing experienced users to configure, compile and install the application under any Linux-based operating system.

Bottom line

In conclusion, Haguichi is a very good graphical user interface for the Hamachi service. It supports a multitude of distributions and desktop environments, and it’s probably the only one that can offer a modern Hamachi client on GNU/Linux.

Source

How to Install VMware Workstation on Ubuntu 18.04 LTS

What is VMware Workstation?

VMware Workstation is a virtualization software developed by the company VMware company, established in 1998. VMware Workstation was launched in 2001 as a platform to install multiple instances of different operating systems, especially the client and server systems. It supports hardware compatibility for hard disks, CD Roms and USB devices, and provides a bridge between the host and virtual machines. The purpose of building such a platform was to enable system administrators to test and verify the client-server environment for software and hardware. The VMware administrator can also switch between different virtual machines at the same time.

Install VMware Workstation

This article shows how to install and launch VMware Workstation on your Ubuntu system. The commands and procedures used in this article describe the installation of VMware Workstation 15 on a Ubuntu 18.04 LTS system.

Step 1: Download the official VMware binary package

The most stable and latest version of the VMware Workstation can be downloaded from their official website. Open your Ubuntu command line, the Terminal, either through the system Dash or the Ctrl+Alt+T shortcut. Then, enter the following wget command in order to download the binary package to your system:

$ wget -O ~/vmware.bin https://www.vmware.com/go/getWorkstation-linux

This command will download the package to the current user’s home folder in a file named vmware.bin.

Step 2: Install Build Essential to your system

In order to install the VMware Workstation, you first need to have a prerequisite called Build Essential on your system. The Built Essential includes a reference to all the packages needed to compile a Ubuntu binary installation package.

Run the following command as sudo in order to install it:

$ sudo apt install build-essentialInstall Build Essential

The system will prompt you with a Y/n option to continue the installation procedure. Please enter Y to continue.

Step 3: Launch the VMware Installer

We will now launch the graphical VMware Installer through the command line, that will guide you through the rest of the installation procedure. Please run the following command to launch the installer:

$ sudo bash ~/vmware.bin

The installer will launch as follows:VMWare Workstation installer

The installer will let you make some custom settings such as specifying the default administrator for VMware, selecting the installation folder and choosing an HTTP port for the workstation server. You will be also asked to provide a License Key. You may provide this key if you have it or even wish to skip the step simply by clicking the Next button.

The following window will indicate the successful end of the Installation procedure.Installation successful

Step 4: Launch the VMware Workstation

You can launch the VMWare Workstation both through the command line and the GUI.

Enter the following command as sudo in order to launch VMware, as only the administrator can use it:Launch vmware with sudo

Or enter the VMware keyword in your system Dash and then click on VMWare Workstation icon from the search results.Start VMWare from Desktop

When you first launch VMware, it will ask if you want to enter the license key, buy it, or use the trial version of the software for 30 days.Enter license key

Select your choice and click OK.

As mentioned before, you need to be an administrator to use the VMware Workstation. Thus, the following authentication dialog will appear asking you to provide your password.

Enter the password and click the Authenticate button to start VMware.VMWare Workstation started

Click the OK button on the Information dialog.VMWare Workstation pro installed

Here, you can perform the operations such as creating and opening a new, connecting to a remote server and other customizations as an administrator.

Through the step by step installation instructions mentioned in this article, you can install the VMware Workstation through the official binary package and then launch it as an administrator on your Ubuntu system.

Source

Linux Today – How To Install Kali Linux Tools In Ubuntu

Nov 09, 2018, 19:00

Today I am going to do a quick demonstration of how to easily install a suite of security testing tools from Kali Linux onto a Ubuntu machine. For a bit of background information, Kali Linux is a distribution derived from Debian. Its sole purpose is to provide a suite of tools for penetration testing (pentesting) and forensics. It is provided by Offensive Security, an organization dedicated to providing security training. There is a very long list of tools available for Kali. Such tools include (but are not limited to) forensics, vulnerability checks, access checks, and stress testing.

Complete Story

Source

Download GNOME Control Center Linux 3.30.2

GNOME Control Center is an open source project that allows GNOME users to control various aspects of their desktop environment, as well as of the Linux operating system on top of which GNOME is installed. The application provides a single, easily accessible place where users can interact with GNOME’s settings. It is integrated into the GNOME desktop environment and can be accessed through the system tray area.

Easy access to main GNOME settings

The program is comprised of three main settings categories, such as Personal, Hardware and System. The Personal section includes the Background, Notifications, Online Accounts, Privacy, Region & Language, and Search entries. The Hardware category includes Bluetooth, Color, Displays, Keyboard, Mouse & Touchpad, Network, Power, Printers, Sound and Wacom Tablet. Lastly, the System category include Date & Time, Details, Sharing, Universal Access and Users.

Designed for new and experienced users

It can be easily used by new and experienced users alike, so they can successfully configure various aspects of the GNOME desktop environment. Therefore, users will be able to change the desktop wallpaper, add or remove online accounts, change privacy, language and notification settings, configure the integrated search function, enable Bluetooth support, and configure their peripheral devices.

Additionally, the application can be used to change the color profile and settings of your monitor, configure network connections, printers, wacom tablet, sound and power settings. Also, you can use it to change the default applications, set the date and time, add and remove users, or enable sharing.

Also known as Unity Control Center

Several well known Linux-based operating system forked the GNOME Control Center application, transforming it into their very own control center app. A popular example is the Ubuntu distribution, where GNOME Control Center is present in the form of Unity Control Center. Any GNOME user has interacted with the GNOME Control Center in a form or another to set various hardware components, change the wallpaper or even to add new users on their Linux system.

Source

Meet Franz, an open source messaging aggregator

If you are like me, you use several different chat and messaging services during the day. Some are for work and some are for personal use, and I find myself toggling through a number of them as I move from apps to browser tabs—here, there, and everywhere.

The Franz website explains, “Being part of different communities often requires you to use different messaging platforms. You end up with lots of different apps and browser windows trying to stay on top of your messages and chats. Driven by that, we built Franz, a one-step solution to the problem.”

Franz 5 (version 5.0.0-beta.18), available under the Apache 2 license, is an open source chat/messaging aggregator. With Franz 5, you can access a variety of messaging apps in one window and simply toggle through them. The source code for Franz can be found on GitHub.

I find Franz 5 useful for aggregating my Gmail, Trello, Hangouts, GitHub, and LinkedIn messages (so far).

Who is Franz?

Franz was created by Austrian-based Stefan Malzner, a graphic designer and game creator at Bloodirony. “Emperor Franz Joseph I of Austria [who reigned from 1848-1916] had a rough time following the downfall of the Austrian Empire,” Malzner says. “Why not give someone with the presumably exceptional communication skills of an emperor a second chance?”

Franz 5 supports many services, including GitHub, Slack, LinkedIn, Skype, and Trello.

Cooking up some recipes

If those services aren’t enough for you, Franz is extensible by adding plugins (called “recipes”). Franz 5’s plugin architecture lets you add additional services to adapt the tool as you see fit. The recipe repository can be found on GitHub.

Moreover, the Franz community is adding new services to the platform. Adding new recipes is simple; the instructions are available on GitHub and listed here (Bitbucket, in this example):

  1. Clone/download the folder franz-recipe-bitbucket.
  2. Open the Franz Recipe folder on your machine:
    • Mac: ~/Library/Application Support/Franz/recipes/
    • Windows: %appdata%/Franz/recipes/
    • Linux: ~/.config/Franz/recipes/
  3. Create a dev folder, if you have not already done so
  4. Unzip and copy the franz-recipe-bitbucket folder into the recipes dev directory
  5. Restart or reload Franz

Instructions for adding your own services can be found on GitHub. To list your plugin with Franz 5, create an issue with the tag deploy, link to your repository, and write a short description of what it does.

For example, Daniel Weinberger added an issue for Android Messages suggesting a mechanism for including unread badge counts, which Poland’s Filip Malczak has been thinking of too. His repository can be found on GitHub.

Leave the messaging to Franz

I’ve been using Franz for only a few days but already rely on it to keep all my messaging corralled in one easy-to-find place. In addition to the free open source version of Franz 5, two premium levels are available on the Franz website if you need added functionality.

Source

The latest progress report for the PlayStation 3 emulator RPCS3 is out, impressive stuff

RPCS3, the open source PlayStation 3 emulator is coming along nicely. The latest progress report goes over some recent work with various improvements.

They’ve now managed to hit over 1,300 titles that you’re able to actually get in-game now, although that doesn’t mean they’re playable just yet but progress is progress. Playable titles has risen to around 1,014 now too.

It’s quite hilarious how badly some games are made, which get uncovered when developers do projects like this since they have to look into so much detail about how each and every game works. They talked a little about Afro Samurai and how it renders all geometry twice to get a stylish black outline, I’m sure there’s plenty of other games doing some terrible things.

One sweet little feature added, is the ability to load a background from games while it’s loading shaders. It’s such a small thing, but it makes it look quite a lot more professional.

They also did some new videos to show off their improvements:

Great to see work going strong on such an important project, it would be such a shame to have so many titles vanish into the abyss as technology moves on. Preservation of gaming is important, even if some rights holders don’t agree with emulation.

I wouldn’t mind playing through the Resistance titles again, so it’s pleasing to see that with their recent work some major graphical issues have been solved.

They still have a long road ahead, with some of the features they’ve worked through sounding rather tricky. They should get there eventually though, the first step is to get things working and rendering and then they can really push through on the optimisation.

See the full post here for the technical details.

Source

Download GNOME Calendar Linux 3.30.1

GNOME Calendar is a free, easy-to-use, simple, attractive and open source graphical software project that has been designed from the offset to provide a calendar application for the GNOME desktop environment.

The application aims to be a drop–in replacement of the calendar widget that is currently implemented in the main GNOME Panel, offering users a cool and modern calendar tool in style of the default calendar apps of modern operating systems.

You can view, search and create events or reminders

With GNOME Calendar, users will be able to easily and quickly view calendar events from local and remote sources, such as Google Calendar, search for events, create events, set and view event reminders, as well as to display day, week, month and year calendar views.

Users will be able to view multiple events by hovering the mouse of the respective group of events, to create multi-day events, easily navigate between months and years in the calendar, as well as to manage multiple calendars into a single instance.

Beautiful, intuitive and modern graphical user interface

As expected, the graphical user interface (GUI) of the GNOME Calendar application follows the GNOME HIG (Human Interface Guidelines) specifications, which means that it has a modern, beautiful and intuitive look and feel.

The main toolbar hosts the event navigator, the Week, Month and Year views, the integrated search functionality, the calendar manager and the app’s menu. Events can be easily created by right clicking on the day you want to create the event, entering all the necessary data on the New Event dialog.

Distributed as part of GNOME 3.16

The final version of GNOME Calendar, which will be integrated by default in GNOME 3.16, will handle iCalendar (ICS) files, as well as to support attachments, attendees, alarms, different timezones for events, recurring events, Day and List views.

Source

systemd unit file creating a service

Service management is something you don’t even think of when you use your Linux workstation or Linux server everyday, but when it’s not there you will really hate it. When you create for example a new server program that needs to run 24/7, doing this challenge without service management is a nightmare where you create in fact a small service system yourself, which will be obviously not as good as the manager developed by a full team during years, anyway.

With its services, systemd makes all of this easier, really easier. As soon as you want something monitoring your application and easy control of it, systemd is the way to go, and that’s what I’m going to explain here!

To add a new service, well, you need to answer this question. As always in systemd, it depends if the service is only for your user or the whole system. We’ll focus on how systemd works for whole system services.

The exact location depends of why and how the service got installed. If the service is installed by a package manager, it will be generally in /usr/lib/systemd/system. For software you develop or the ones that doesn’t support systemd by itself, you will put the service file in /usr/local/lib/systemd/system. Please keep in mind though that some distributions doesn’t support this folder in /usr/local. Finally, if you want to configure an existing systemd service, /etc/systemd/system is the way to go.

Inside these folders you can find multiple file extension such as *.socket, *.target or *.service. Obviously we’re going to focus on the last. systemd uses the filename as the name of the service when starting it or stopping it etc. So generally filenames in service only contains alphanumeric characters along with hyphens and underscores. During development I recommend to create it in your documents and then copy it to systemd location when done, that would avoid you problems if you save in middle of editing.

OK so please create your service file in your documents. Now we’re ready to review how to write this file.

[Unit]
Description=Penguins Web Application HTTP server (running in port 8080)
WantedBy=multi-user.target

[Service]
Type=simple
ExecStart=/usr/bin/python3 /usr/local/bin/penguin-web-app/main.py
Restart=always

The file format is in fact close to ini. I know it may be weird given ini files are often found in Windows but that’s how it works. The service file is first divided in 2 sections: [Unit] and [Service]. Each section configures a specific aspect of systemd: [Unit] contains elements shared by all systemd unit files while [Service] is only for configuration specific to setting up a new service.

Then the section is configured with properties such as Description= or ExecStart=. The value is separated from property name by the equal sign = without any space.

Let’s go back to the file shown above. It describes a service designed to run a web app written in Python about penguins. systemd will restart it whenever the process exits and starts the server upon server’s start-up if you enable it with systemctl enable command. Cool eh?

But you’re maybe your next web app isn’t about penguins — and that’s a shame — and it’s not written in Python. In this case you’ll want to learn more about the possible configurations.

Properties of Systemd Services

Let’s first focus about the properties in [Unit]:

Description= is just about giving a clear description of what service is doing. It’s displayed in service list, service logs so you want it to be descriptive but it should stay in one line and one sentence.

WantedBy= allows to say to systemd: when this thing is started, starts me as well. Generally you’ll put the name of a target. Examples of common targets:

  1. multi-user.target: when server is OK and is ready to run command line applications
  2. graphical.target: when GNOME or KDE is ready
  3. network-up.target: when server is connected properly to a network

OK for the beginning these properties of [Unit] is enough. Let’s take a look on [Service] now.

Type= helps systemd in how to know if a service is running. Here are common types:

  1. simple is probably the most commonly used: systemd considers the process you launch as the one doing the service. If the process stops, it considers the service stopped as well, etc.
  2. forking is preferred for applications that were written to be a server but without the help of a service management system. Basically it expects the launched process to fork and that fork is considered the final process for the service. In order to be more accurate, you may also help systemd with a PID file, where the PID of the process to track is written by the launched application.

ExecStart= is probably the most important for a service: it precises what application to launch when starting the service. As you can see in the Penguin service, I have used /usr/bin/python3 and not python3 straight away. It’s because systemd documentation explicitly recommends to use absolute paths in order to avoid any surprises.

But that’s also for another reason. Other services’ management system tend to be based on Shell scripts. However systemd, for performance reason, doesn’t run a shell by default. So you can’t provide directly a shell command in ExecStart=. You can however still use a shell script by doing:

ExecStart=/usr/bin/bash /usr/local/bin/launch-penguin-server.sh

Not that hard right? Note that if you need to run some process to signal your service to stop cleanly, ExecStop= exists, as well as ExecReload= for reloading services.

Restart= allows you to explicitly tell when the service should be restarted. This is one of the important features of systemd: it ensures that your service stays up as long as you wish to, so pay close attention to this option.

Restart= Meaning
always systemd will keep restarting it whenever it terminates or crashes. Well, until you do systemctl stop service-name.service.

It’s perfect for servers and online services as you prefer few useless restarts over having to manually restart the service without any reason.

on-abnormal When the service process crashes, restart the service. However, if the application exits cleanly, don’t restart it.

It’s more useful for cron-jobs like services that needs to do a task reliably but don’t need to run all the time.

on-failure Much like on-abnormal, but it also restarts the service when the application exits cleanly but with a non-zero exit code. Non-zero exit codes generally means an error happened.
no systemd will not restart the service automatically.

Generally useful to get access to other systemd features such as logging without the restart feature.

WorkingDirectory= can enforce a working directory when launching your application. The value must be an absolute directory path. Working directory is used when you use relative paths in your application’s code. For our penguins service, it could be:

WorkingDirectory=/srv/penguin-web-app/

Then, security is important so you generally want to not launch your service with root privileges. User= and Group= enables you to set the user or group name or UID/GID under which your application will be launched. For example:

User=penguin-web
Group=penguin-web

EnvironmentFile= is a powerful option. Applications running as services often needs configuration and environment files allows to set that configuration in two ways:

  1. The application can read directly the environment variable.
  2. But also you can set different command line arguments to your application without changing the service file.

The syntax of this file is simple: you type the environment variable name, the equal sign = and then its value. Then you put the absolute path of your environment file into EnvironmentFile property.

So example:

EnvironmentFile=/etc/penguin-web-app/environment

And the /etc/penguin-web-app/environment file contains:

Then our penguins web app will have access to LISTEN_PORT environment variable and listen to the expected port.

Save and Start the Newly Created Systemd Service

So if you followed my advice, you edited your service file in your home directory. Once you’re satisfied, copy that file to /usr/local/lib/systemd/system, assuming your distribution supports that path. The filename of your service file will be its service name. This filename have to end with .service. For example, for our penguins server, it would be penguin-web-app.service.

Then, you have to tell systemd you added a new service, so you need to type this command:

$ sudo systemctl daemon-reload

Okay now systemd is aware of your new service, assuming your file doesn’t contain a syntax error. After all, it’s your first file so it’s likely you’ll make mistakes. You have to run this command above on every update in your service file.

Now, time to start the service:

$ sudo systemctl start penguin-web-app.service

If it fails with a Unit not found error such as this one:

$ sudo systemctl start penguin-web-app.service
Failed to start penguin-web-app.service: Unit not found.

It means that your distribution doesn’t support the directory or you didn’t named correctly your service file. Be sure to check out.

If you set up your service with WantedBy= and wants that your service starts automatically, you have to enable it, with this command:

$ sudo systemctl enable penguin-web-app.service

The cool thing with a service is that it runs in background. The problem: how to know if it runs properly and if it’s running if it’s running in background? Don’t worry, systemd team thought about that too and provided a command to see if it runs properly, since how much time, etc:

$ systemctl status penguin-web-app.service

Conclusion

Congrats! You can now have your applications managed without you caring about restarting it manually every time. Now, I recommend you to read our other article about systemd logs: Master journalctl: understand systemd logs. With that you can use the powerful logging system on your new service and build more reliable servers!

Source

WP2Social Auto Publish Powered By : XYZScripts.com