MongoDB basics — Create, Show and Drop Collections

MongoDB basics — Create, Show and Drop Collections

MongoDB is a NoSQL database. This means that unlike relational databases there’s no set in stone schema with various row and columns or fields with well-defined data types. Analogue to traditional SQL database tables, MongoDB has collections. Where there were once rows in a SQL table, MongoDB has documents. Data is queried across all collections and documents using key-value pairs, which you will soon see.

The utility of MongoDB is its ease of use, scalability and the JSON like syntax with which the stored data is represented. On the other hand, if you wish to do crazy operations on your datasets like JOINs you may find MongoDB cumbersome and traditional SQL databases are better suited for that.

In any case, this article would not presume any familiarity with databases whatsoever. We will just assume that you have MongoDB installed on your server/desktop (it is available on Windows, Mac and Linux). With that installed we will create our sample database and see MongoDB in action.

Prerequisites

  1. MongoDB installation. You can follow the official documentation to install your current Operating System. OR
  2. Optionally, you can sign up for MongoDB atlas. They offer a free tier with 512MB of persistent storage. Perfect environment for experimentation or small projects.
  3. If you wish to not install any software whatsoever, you can visit Katacoda and use their web-based interface as an ephemeral sandboxed environment.

Getting Started

Assuming you have MongoDB server installed and a shell connected to the server we can start exploring a few features of it. But first a few terminologies — A mongodb server has a list of databases dbs in it. Each database can have multiple collections in it.

So for example, a University can have a personnel database which can then have various collections for different departments like one collection for Mathematics, one for Biology and so on.

Source

how to convert rpm to deb and deb to rpm using alien command on linux ?

You can use alien command to convert *.deb to *.rpm file. Also, if you have a *.rpm file that you want to install on a Debian or Ubuntu, you can convert the *.rpm to *.deb file using alien command as explained in this article.

Install alien command on Debian / Ubuntu

Install alien command on Ubuntu as shown below.

# sudo apt-get install alien

Install alien command on RHEL

#rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm

# yum update && yum install alien

1. Convert RPM to DEB

Use alien command to convert rpm to deb file

The following example converts the linuxconf-devel rpm file to linuxconf-devel deb file. Once you generate the deb file, you can install it on Ubuntu or Debian.

ravi@linuxforfreshers.com:~$ sudo alien -d –script -k anydesk-2.9.1-2.x86_64.rpm

anydesk_2.9.1-2_amd64.deb generated

Note: You’ll also notice that alien has counted up the version number. If you want to keep the original version number, you must use the -k switch:

Use alien to convert deb to rpm file

Use alient -r option to convert a deb file to rpm file. The following example converts libsox deb file to libsox rpm file. Once you generate the rpm file, you can install it on Red Hat, or CentOS.

ravi@linuxforfreshers.com:~/Downloads$ sudo alien -r anydesk_2.9.1-1_amd64.deb

Warning: Skipping conversion of scripts in package anydesk: postinst postrm

Warning: Use the –scripts parameter to include the scripts.

anydesk-2.9.1-2.x86_64.rpm generated

In above example i am not used -k so it will update the version automatically.

ravi@linuxforfreshers.com:~$sudo alien -r –scripts -k anydesk_2.9.1-3_amd64.deb

anydesk-2.9.1-3.x86_64.rpm generated

Where -r, –to-rpm Generate a Red Hat rpm package

–scripts Include scripts in package.

-d, –to-deb Generate a Debian deb package (default).

-k, –keep-version Do not change version of generated package.

If u want more help check man alien.

 

Source

FFMpeg Install On CentOS 7

FFmpeg is a video editing software that can be used to convert audio and video streams in linux. Compiling ffmpeg from source can be quite complex, so there are a couple alternatives, either installing from yum or a static build already created. If you are looking for a more recent release than you should follow the static built as opposed to installing from a repository. More information can be found about ffmpeg on their site

Installing FFmpeg from a repository

First install the epel-release

yum -y install epel-release

Install the nux repository

rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm

Install ffmpeg and ffmpeg -devel packages

yum install ffmpeg ffmpeg-devel -y

Make sure it works:

# ffmpeg -version
ffmpeg version 2.6.8 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-4)
configuration: –prefix=/usr –bindir=/usr/bin –datadir=/usr/share/ffmpeg –incdir=/usr/include/ffmpeg –libdir=/usr/lib64 –mandir=/usr/share/man –arch=x86_64 –optflags=’-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong –param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic’ –enable-bzlib –disable-crystalhd –enable-gnutls –enable-ladspa –enable-libass –enable-libcdio –enable-libdc1394 –enable-libfaac –enable-nonfree –enable-libfdk-aac –enable-nonfree –disable-indev=jack –enable-libfreetype –enable-libgsm –enable-libmp3lame –enable-openal –enable-libopenjpeg –enable-libopus –enable-libpulse –enable-libschroedinger –enable-libsoxr –enable-libspeex –enable-libtheora –enable-libvorbis –enable-libv4l2 –enable-libx264 –enable-libx265 –enable-libxvid –enable-x11grab –enable-avfilter –enable-avresample –enable-postproc –enable-pthreads –disable-static –enable-shared –enable-gpl –disable-debug –disable-stripping –shlibdir=/usr/lib64 –enable-runtime-cpudetect
libavutil 54. 20.100 / 54. 20.100
libavcodec 56. 26.100 / 56. 26.100
libavformat 56. 25.101 / 56. 25.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 11.102 / 5. 11.102
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100

That is it for installing with a repository.

Installing a static prebuilt version of FFmpeg

Get the installer script:

wget https://raw.githubusercontent.com/q3aql/ffmpeg-install/master/ffmpeg-install

Make it executable

chmod a+x ffmpeg-install

Install a release version

./ffmpeg-install –install release

Make sure it works:

# ffmpeg -version
ffmpeg version 3.3.2-static http://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 5.4.1 (Debian 5.4.1-11) 20170519
configuration: –enable-gpl –enable-version3 –enable-static –disable-debug –disable-ffplay –disable-indev=sndio –disable-outdev=sndio –cc=gcc-5 –enable-fontconfig –enable-frei0r –enable-gnutls –enable-gray –enable-libass –enable-libfreetype –enable-libfribidi –enable-libmp3lame –enable-libopencore-amrnb –enable-libopencore-amrwb –enable-libopenjpeg –enable-libopus –enable-librtmp –enable-libsoxr –enable-libspeex –enable-libtheora –enable-libvidstab –enable-libvo-amrwbenc –enable-libvorbis –enable-libvpx –enable-libwebp –enable-libx264 –enable-libx265 –enable-libxvid –enable-libzimg
libavutil 55. 58.100 / 55. 58.100
libavcodec 57. 89.100 / 57. 89.100
libavformat 57. 71.100 / 57. 71.100
libavdevice 57. 6.100 / 57. 6.100
libavfilter 6. 82.100 / 6. 82.100
libswscale 4. 6.100 / 4. 6.100
libswresample 2. 7.100 / 2. 7.100
libpostproc 54. 5.100 / 54. 5.100

Thats it for installing a static build.

Jun 21, 2017LinuxAdmin.io

Source

Shutter Removed From Ubuntu 18.10 And Debian Unstable, New PPA Available

Shutter screenshot tool

Shutter screenshot tool was removed from Debian Unstable and Ubuntu 18.10 (to be released tomorrow) recently.
The popular screenshot tool, which uses Gtk2 and Perl, was one of the very few packages that blocked Debian (and Ubuntu) from removing the obsolete libgnome2-perl and libgnome2-vfs-perl from the repository archive. Since Shutter doesn’t work without these packages, it was removed from the Debian Unstable and Ubuntu 18.10 repositories.

This comes after some of its optional dependencies were removed from Ubuntu 18.04 and Debian Buster 6 months ago, which caused the application editing / annotation features to stop working unless the users manually installed these packages from an older Ubuntu or Debian version.

While Shutter is still under development, getting a new developer back in 2017, it doesn’t seem there’s been any progress to porting it to use non-deprecated Perl modules and/or Gtk3. Until this happens, Shutter won’t make it back into Debian and Ubuntu. If you can help with this, check out the project page on Launchpad.

Another way you could help is by creating Snap and/or Flatpak packages for Shutter. Since such packages include the libraries required to run an application, this would be ideal for Shutter, which uses old libraries. There are currently no Snap or Flatpak packages for Shutter.

There are some alternatives out there to Shutter, like Ksnip and Flamshot which you may want to check out.

How to continue using Shutter in Ubuntu, Linux Mint or Debian

So what can you do if you still want to use Shutter? Since I use Shutter daily, I created a PPA for it and its dependencies, so others who prefer it to other screenshot tools can continue to use it. I would have built a Snap or Flatpak but I don’t have the time right now to look into how to create such packages.

The PPA includes the latest version of Shutter (newer than the one available in Ubuntu 18.04), its required dependencies for Ubuntu 18.10, and its optional dependencies.

You can use this PPA not only in Ubuntu 18.10, but also in Ubuntu 18.04 / Linux Mint 19 or 19.x, not only because there’s a newer Shutter version in the PPA with some bug fixes, but because it provides the missing optional Shutter dependencies. These dependencies add support for editing / annotating images in Shutter, as well a AppIndicator support, which allows the Shutter tray icon to be visible in Ubuntu 18.04 without having to enable the tray, thanks to the built-in AppIndicator support.

You can add the PPA and install Shutter in Ubuntu 18.04 or 18.10 / Linux Mint 19 / 19.x by using these commands:

sudo add-apt-repository ppa:linuxuprising/shutter
sudo apt-get update
sudo apt install shutterUpdate: I also added the gnome-web-photo package to the PPA. This package allows Shutter to take full website screenshots, and it’s missing from Ubuntu 18.04 and newer / Linux Mint 19 and newer. You can install it after adding the PPA using:

sudo apt install gnome-web-photo
After it’s installed restart Shutter and click on the website screenshot button (or select Web from the indicator / tray icon), then enter the URL of the website and Shutter will take a screenshot in a couple of seconds.

In Debian Unstable you’ll need to download Shutter from an older version, along with its optional libgoo-canvas-perl and libgoocanvas3 (and libgoocanvas-common) dependencies.

Source

Looks like the downhill freeriding game ‘Descenders’ is going to get multiplayer and more tricks

Descenders, the rather good extreme downhill freeriding game from RageSquid looks to be getting some fun updates soon.

Firstly, the developers teased out this new image:

That seems to have quite a different style to the current maps available, considering the game has traditionally been about downhill freeriding while doing tricks. This design looks much more flat, with it resembling a skatepark with the ramp design. It’s going to be interesting to see what becomes of this, although they’re not giving out too many details they only said “Might even be an upcoming map for Descenders with new tricks incoming? Who knows?”.

Additionally, they recently held a “Descenders community day” where they had community members join them, to test some recent features. The biggest surprise was seeing multiplayer, which would make it seriously fun! You can see some snippets in the below video:

It also shows a few new tricks being done as well, which was one of my major requests so it’s great to see them do it.

It’s already a really fun game, but with new tricks coming, new maps and multiplayer at some point it’s going to be pretty amazing.

If you’re interested, you can pick it up from Humble Store and Steam.

Source

13 Keyboard Shortcut Every Ubuntu 18.04 User Should Know

Knowing keyboard shortcuts increase your productivity. Here are some useful Ubuntu shortcut keys that will help you use Ubuntu like a pro.

You can use an operating system with the combination of keyboard and mouse

Note: The keyboard shortcuts mentioned in the list is intended for Ubuntu 18.04 GNOME edition. Usually, most of them (if not all) should work on other Ubuntu versions as well, but I cannot vouch for it.

Ubuntu keyboard shortcuts

Useful Ubuntu keyboard shortcuts

Let’s have a look at some of the must knowkeyboard shortcut for Ubuntu GNOME. I have not included universal keyboard shortcuts like Ctrl+C (copy), Ctrl+V (paste) or Ctrl+S (save).

Note: Super key in Linux refers to the key with Windows logo. I have used capital letters in the shortcuts but it doesn’t mean you have to press the shift key. For example, T means ‘t’ key only, not Shift+t.

You can also watch a video of these Ubuntu shortcuts in action. And if you like the video, subscribe to our YouTube channel for more Ubuntu and Linux related videos.

1. Super key: Opens Activities search

If you have to use just one keyboard shortcut on Ubuntu, this has to be the one.

You want to open an application? Press the super key and search for the application. If the application is not installed, it will even suggest applications from software center.

You want to see the running applications? Press super key and it will show you all the running GUI applications.

You want to use workspaces? Simply press the super key and you can see the workspaces option on the right-hand side.

2. Ctrl+Alt+T: Ubuntu terminal shortcut

Ubuntu Terminal ShortcutUse Ctrl+alt+T to open terminal

You want to open a new terminal. The combination of three keys Ctrl+Alt+T is what you need. This is my favorite keyboard shortcut in Ubuntu. I even mention it in various tutorials on It’s FOSS when it involves opening a terminal.

3. Super+L or Ctrl+Alt+L: Locks the screen

Locking screen when you are not at your desk is one of the most basic security tips. Instead of going to the top right corner and then choosing the lock screen option, you can simply use the Super+L key combination.

Some systems also use Ctrl+Alt+L keys for locking the screen.

4. Super+D or Ctrl+Alt+D: Show desktop

Pressing Super+D minimizes all running application windows and shows the desktop.

Pressing Super+D again will open all the running applications windows as it was previously.

You may also use Ctrl+Alt+D for this purpose.

5. Super+A: Shows the application menu

You can open the application menu in Ubuntu 18.04 GNOME by clicking on the 9 dots on the left bottom of the screen. However, a quicker way would be to use Super+A key combination.

It will show the application menu where you can see the installed applications on your systems and can also search for them.

You can use Esc key to move out of the application menu screen.

6. Super+Tab or Alt+Tab: Switch between running applications

If you have more than one applications running, you can switch between the applications using the Super+Tab or Alt+Tab key combinations.

Keep holding the super key and press tab and you’ll the application switcher appearing. While holding the super key, keep on tapping the tab key to select between applications. When you are at the desired application, release both super and tab keys.

By default, the application switcher moves from left to right. If you want to move from right to left, use the Super+Shift+Tab key combination.

You can also use Alt key instead of Super here.

Tip: If there are multiple instances of an application, you can switch between those instances by using Super+` key combination.

7. Super+Arrow keys: Snap windows

This is available in Windows as well. While using an application, press Super and left arrow key and the application will go to the left edge of the screen, taking half of the screen.

Similarly, pressing Super and right arrow keys will move the application to the right edge.

Super and up arrow keys will maximize the application window and super and down arrow will bring the application back to its usual self.

8. Super+M: Toggle notification tray

GNOME has a notification tray where you can see notifications for various system and application activities. You also have the calendar here.

Notification Tray Ubuntu 18.04 GNOMENotification Tray

With Super+M key combination, you can open this notification area. If you press these keys again, an opened notification tray will be closed.

You can also use Super+V for toggling the notification tray.

9. Super+Space: Change input keyboard (for multilingual setup)

If you are multilingual, perhaps you have more than one keyboards installed on your system. For example, I use Hindi on Ubuntu along with English and I have Hindi (Devanagari) keyboard installed along with the default English one.

If you also use a multilingual setup, you can quickly change the input keyboard with the Super+Space shortcut.

10. Alt+F2: Run console

This is for power users. If you want to run a quick command, instead of opening a terminal and running the command there, you can use Alt+F2 to run the console.

Alt+F2 to run commands in UbuntuConsole

This is particularly helpful when you have to use applications that can only be run from the terminal.

11. Ctrl+Q: Close an application window

If you have an application running, you can close the application window using the Ctrl+Q key combination. You can also use Ctrl+W for this purpose.

Alt+F4 is more ‘universal’ shortcut for closing an application window.

It not work on a few applications such as the default terminal in Ubuntu.

12. Ctrl+Alt+arrow: Move between workspaces

Workspace switchingWorkspace switching

If you are one of the power users who use workspaces, you can use the Ctrl+Alt+Up arrow and Ctrl+Alt+Down arrow keys to switch between the workspaces.

13. Ctrl+Alt+Del: Log out

No! Like Windows, the famous combination of Ctrl+Alt+Del won’t bring task manager in Linux (unless you use custom keyboard shortcuts for it).

Log Out UbuntuLog Out

In the normal GNOME desktop environment, you can bring the power off menu using the Ctrl+Alt+Del keys but Ubuntu doesn’t always follow the norms and hence it opens the logout dialogue box when you use Ctrl+Alt+Del in Ubuntu.

Use custom keyboard shortcuts in Ubuntu

You are not limited to the default keyboard shortcuts. You can create your own custom keyboard shortcuts as you like.

Go to Settings->Devices->Keyboard. You’ll see all the keyboard shortcuts here for your system. Scroll down to the bottom and you’ll see the Custom Shortcuts option.

Add custom keyboard shortcut in Ubuntu

You have to provide an easy-to-recognize name of the shortcut, the command that will be run when the key combinations are used and of course the keys you are going to use for the shortcut.

What are your favorite keyboard shortcuts in Ubuntu?

There is no end to shortcuts. If you want, you can have a look at all the possible GNOME shortcuts here and see if there are some more shortcuts you would like to use.

You can, and you should also learn keyboard shortcuts for the applications you use most of the time. For example, I use Kazam for screen recording, and the keyboard shortcuts help me a lot in pausing and resuming the recording.

What are your favorite Ubuntu shortcuts that you cannot live without?

Source

Download Telegram Desktop Linux 1.4.4

Telegram Desktop is an open source, multiplatform, modern and free graphical application that allows any Linux user to easily and quickly talk with friends, co-workers and family members who use the Telegram messenger, from the comfort of their GNU/Linux desktops.

Telegram is a revolutionary messaging system that can be easily described as fast, highly secure, cloud-based, distributed, free, open source, encrypted, powerful, and cross-platform, available on all the important mobile devices (Android, iOS (iPhone/iPad), Windows Phone) and operating systems (Linux, Mac OS X and Microsoft Windows).

With Telegram you will be able to connect from remote locations, synchronize your conversations on all of your devices, create groups of up to 200 members, send documents of any type, send encrypted information that cannot be intercepted by government agencies, store media files in the cloud, as well as to choose to destruct certain messages.

Supports 64-bit and 32-bit Linux distributions

As its name suggests, the Telegram Desktop application has been tailored for desktop users, allowing them to log into their Telegram accounts, in addition to the mobile app, and chat with their buddies in a more comfortable matter.

For your convenience, the software is distributed as pre-built binaries that work on computers supporting either of the 32-bit (x86) or 64-bit (x86_64) hardware architectures. The source code of the app is available via GitHub.

Installing Telegram Desktop is out of the question, as after downloading the file that corresponds to your hardware platform, and unpack it, you will only have to double-click on the Telegram file to open the app.

Getting started with Telegram Desktop

Click the big blue ‘Start Messaging’ button to login. The application will ask for your telephone number, which if it is already registered, the application will open and you can start chatting. If the phone number is not registered with Telegram, you can register it from within the app in two simple steps.

From the settings screen, you will be able to add a photo of you, so your contacts can easily recognize you, as well as to choose a unique username, enable or disable desktop notifications, message previews, sounds, automatic updates, viewing of the sender’s name, and other chat options.

Unfortunately, there’s no system tray area integration, and we prefer to install the application system wide instead of running it from a folder. If these two issues will be implemented in upcoming versions, Telegram Desktop will become our favorite chat software and we will give it five stars.

Source

​Revised Linux Code of Conduct is Now Officially Part of Linux | Linux.com

Some organizations might not include their Code of Conductin the software source code tree, but the Linux developers aren’t your ordinary group. In the Linux 4.19 announcement, Greg Kroah-Hartman, Linux’s leader for this release and maintainer of the stable branch, added in the Code of Conduct and some minor changes.

Kroah-Hartman explained why the Linux developers felt they needed to add a Code of Conduct:

We all need to remember that, every year new people enter our community with the goal, or requirement, to get stuff done for their job, their hobby, or just because they want to help contribute to the tool that has taken over the world and enabled everyone to have a solid operating system base on which to build their dreams.

.. That goal has been, is now, and will continue to be to produce the best possible code. Some in the community have feared that a Code of Conduct would force Linux to accept poor-quality code just to fulfill some kind of quota. In his keynote speech at the Open Source Europe Summit in Scotland, Jon Corbet, Linux kernel developer and editor of LWN, replied to this: “These fears will prove to be unfounded.”

Read more at ZDNet

Source

NodeJS with Redis | Linux Hint

Redis is widely used as a caching server. At times, Redis is used as a database as well. It stores the data in a computer’s memory (RAM) directly. The advantage is that it can access the data very fast. The disadvantage is that the data it stores is temporary. If you reboot your computer, then all the data will be gone.

In this article, I will show you how to use Redis with Node.js. I will be using Node.js 10.x on Debian 9 Stretch in this article. But any modern version of Node.js should work. So, let’s get started. To get started you must have the following requirements:

  • js and NPM installed on your computer.
  • Redis installed on your computer.

You should be able to find articles on installing Node.js and NPM on your desired Linux distribution on LinuxHint.com. I’ve written a dedicated article on installing Redis on Ubuntu/Debian.

Starting Redis:

You can check whether redis service is running with the following command:

$ sudo systemctl status redis

As you can see, redis service is running.

If redis service is not running in your case, start it with the following command:

$ sudo systemctl start redis

Initializing the Project Directory:

First, create a project directory (let’s call it node-redis) with the following command:

Now navigate to the project directory ~/node-redis

Now create a package.json file:

Installing Redis Node.js Module:

There are many Redis clients for Node.js. The official website of Redis recommends redis. You can easily install the redis Node.js module using NPM (Node Package Manager).

To install redis Node.js module, run the following NPM command:

$ npm install redis –save

redis Node.js module should be installed.

Connecting to Redis using Node.js:

In this section, I am going to show you how to connect to Redis data store using Node.js.

First, create a new file connect.js in your project directory and type in the following commands in it:

Here, line 1 imports the redis module.

Line 2 creates a Redis client. As I am running Redis on the same computer as the Node.js programs are running, I didn’t have to specify the hostname or IP address and port where the Redis server is running. If you’re running Redis server on a different computer or server, then you will have to specify it here.

For example, let’s say, your Redis server is running on port 6379 on a computer which has the IP address 192.168.10.87, then you would write line 2 as:

let client = redis.createClient(6379, ‘192.168.10.87’);

Line 4-6 is used to print a message to the console if we can connect to the Redis server.

Line 9-10 is used to print a message to the console if we are unable to connect to the Redis server.

Now, run the connect.js Node.js script as follows:

As you can see, I am connected to the Redis server.

Storing Data in Redis Using Node.js:

In this section, I will show you how to store data (key-value pairs) in Redis data store with Node.js

First, create set1.js file in your project directory and type in the following lines in it:

Here, line 1 and 2 are the same as in connect.js.

On line 4, I set the callback function of the connect event to storeData. So, when our Redis client is connected to the Redis server, the function storeData is called.

On line 6-10, the callback function storeData is defined.

On line 7 and 8, I used set(key, value) method of RedisClient object to set the key name and country to value Mary Smith and USA respectively.

Now, run set1.js as follows:

As you can see, the key-value pairs are set.

Retrieving Data from Redis Using Node.js

In this section, I will show you how to retrieve data from Redis data store using Node.js.

First, create a new file get1.js in your project directory and type in the following lines:

Here, on line 4, getData function is set as a callback function for the connect event of RedisClient.

On line 6-9, the getData function is defined.

On line 7, I called the get(key, callback) method of RedisClient object. name here is the key of the value you want to retrieve. get() method calls the printValue callback function before it finishes running.

On line 11-18, the error first style callback function printValue() is defined. It accepts 2 arguments, error and result. If any error occurs, then it’s printed on the console and the function exits. If there’s no error, then the value for the certain key is printed on the console.

On line 8, the same thing happens.

Now, run get1.js as follows:

As you can see, the values for the keys name and country is retrieved from the Redis data store.

Storing Objects in Redis with Node.js:

You can store JavaScript objects in Redis data store.

First, create a new file set2.js in your project directory and type in the following lines in it.

Here, everything is the same as in set1.js file that I already explained earlier. The only difference is, I used client.hmset(key, object) method of RedisClient object in setData() callback function.

In line 7-10, I used client.hmset() method to store a JavaScript object in the Redis data store against the key C011.

Now run set2.js Node.js script as follows:

As you can see, the object is stored.

Retrieving Objects from Redis with Node.js:

In this section, I am going to show you how to retrieve objects from Redis data store.

Fist, create a new file get2.js in your project directory and type in the following lines in it.

Here, everything is the same as in get1.js script I explained earlier.

You can retrieve a JavaScript object very easily with client.hgetall(key, callback) method of RedisClient as in line 7-9.

Now run get2.js Node.js script as follows:

As you can see, the JavaScript object is retrieved from the Redis data store.

I showed you how to setup Redis with Node.js in this article. Now you should be able to read the redis Node.js module documentation at http://redis.js.org and learn more about it. Thanks for reading this article.

Source

How to Design a Logo Online – DesignEvo Logo Maker Review – NoobsLab

The logo creates a small window through which people recognize the identity of your company. Now to create a logo is a very important step for building brand identity, especially if you start an online business. Find yourself that you do not have any knowledge of Photoshop or any other design program, then think about hiring a professional designer to design your own logo, but find that you have a limited budget. Is there any other way to do it? In the post, we will talk about a free online logo service called

DesignEvo

Unlike other graphic design software, DesignEvo works online without downloading so you can design a special logo directly in your browser. DesignEvo contains thousands of professionally designed templates that can be easily modified to matches your brand, your company or your website.

DesignEvo is easy to use, and any computer user with internet knowledge can design his own logo. To get started, click the “Make a Free Logo” button on the homepage. It will take you to a new page where you will find more than 7000 ready-to-use templates. There are many categories available such as agriculture, animals, pets, technology, food, fashion, and education. You can also use the search box to find any particular logo. Once the logo template is selected, you will be taken to the editing canvas where you can make edits to your logo.

How to Edit Logo Text

To make the logo your own, you need to enter the name or slogan of your business. There are 100+ text fonts available from which you can choose to use and edit with a different style. By changing the size, color, spacing, alignment or adding a letter outline and curved effect, you will get the unique and perfect typography.

Add Icons and Shapes

DesignEvo offers millions of searchable icons. By entering a few keywords, you will find the icons that match your needs. Beyond that, DesignEvo also comes with many shapes, lines, symbols, banners, and other graphics. You can select the one you want and scale it to almost any size without loss of quality as they are all in vector format.

Preview Your Logo before Downloading

When you have finished editing the logo, you can preview how it will look like when placed on different projects. The preview function in DesignEvo offers you a variety of models so you can preview your logo on the business card, t-shirt, letterhead, website, company wall, etc.

Download Your Logo

DesignEvo offers three plans for you when you are going to download your logo. The free plan allows the free download of logos in JPG or PNG format with a maximum resolution of 500 x 500 pixels. For online uses such as putting it as a website banner or social media profile, this is enough. The basic plan costs you $19.99, which will let you download high-resolution logos in 5000px with a transparent background. For $39.99, you can even download a plus logo in vector format (PDF and SVG), and with copyright ownership of your logo. The prices are quite affordable and economical. You can see more details here.

Summary

DesignEvo provides a simple and effective solution for online logo creation. The most important thing is that you can design beautiful logos without the knowledge of any graphics editing program. With the templates provided in the gallery, vast collections of graphics and handy editing feature, everyone who needs a logo can play with DesignEvo and get a really impressive design in a fraction of the time.

Source

WP2Social Auto Publish Powered By : XYZScripts.com