Things twitter API can provide!

When someone wants to access twitter APIs, they are required to register an application. By default, applications can only access public information on Twitter. Certain endpoints, such as those responsible for sending or receiving Direct Messages, require additional permissions from you before they can access your information. These permissions are not granted by default; you choose on a per-application basis whether to provide this access, and can control all the applications The Twitter APIs include a wide range of endpoints, which fall

Read more

Argument 1 passed to Illuminate\Auth\SessionGuard::login() must implement interface Illuminate\Contracts\Auth\Authenticatable, null given, called in. Solved !

This usually occurs when using of Laravel Socialite for authentication Socialite In addition to typical, form based authentication, Laravel also provides a simple, convenient way to authenticate with OAuth providers using Laravel Socialite. Socialite currently supports authentication with Facebook, Twitter, LinkedIn, Google, GitHub, GitLab, and Bitbucket. Error Argument 1 passed to Illuminate\Auth\SessionGuard::login() must implement interface Illuminate\Contracts\Auth\Authenticatable, null given, called in C:\xampp\htdocs\WrokSpace\professional\vendor\laravel\framework\src\Illuminate\Auth\AuthManager.php on line 297 Solution Just delete the social provider assigned to that user id from your database table and that’s

Read more

Array map() Method In JavaScript

The map() method in JavaScript creates an array by calling a specific function on each element present in the parent array. It is a non-mutating method. Generally map() method is used to iterate over an array and calling function on every element of array. Syntax: array.map(function(currentValue, index, arr), thisValue) Parameters: This method accepts two parameters as mentioned above and described below: function(currentValue, index, arr): It is required parameter and it runs on each element of array. It contains three parameters which are listed below: currentValue: It is

Read more

What is Spread syntax (…) in JavaScript ?

pread syntax (…) allows an iterable such as an array expression or string to be expanded in places where zero or more arguments (for function calls) or elements (for array literals) are expected, or an object expression to be expanded in places where zero or more key-value pairs (for object literals) are expected. The Spread Syntax The spread syntax is simply three dots: … It allows an iterable to expand in places where 0+ arguments are expected. Definitions are tough without context.

Read more

What are Rest parameters in JavaScript ?

The rest parameter syntax allows a function to accept an indefinite number of arguments as an array, providing a way to represent variadic functions in JavaScript. Now, What is variadic function ? In mathematics and in computer programming, a variadic function is a function of indefinite arity, i.e., one which accepts a variable number of arguments. Support for variadic functions differs widely among programming languages. What is Rest parameter A function definition’s last parameter can be prefixed with “…” , which will cause all remaining (user supplied) parameters to be placed within a “standard” JavaScript

Read more

Access Logs and Error Logs (LOGGING BASICS) in apache

1. Locate where logged data is stored This simple task is made harder by the fact that Apache is cross-platform software that runs on nearly every server-based operating system. While you might expect that Apache log files will be stored in different file system locations when running on a Mac or Windows PC, you should note that different Linux distros have their own ideas where to store log data. Apache also stores data in a number of different logging formats.

Read more

How to setup SSL certificate for apache

Environment SUSE Linux Enterprise ServerNovell Open Enterprise ServerNovell GroupWise Situation How to SSLize WebAccess on LinuxHow to secure WebAccess using SSLGroupWise WebAccess shows untrusted certificate after pointing to 3rd party certificate using ConsoleOne for WebAccess Agent Resolution (conditional) If not yet configured, Enable the SSL module and set the Apache Server Flags to SSL: From a terminal window: edit file /etc/sysconfig/apache2 Verify ssl is found in the list of APACHE_MODULES.Note: If it is not, please run the following command, which should enable the ssl module

Read more

Configuring Apache Access Control

Controlling Access Based on User Identity  Access to parts of a site can be restricted Require authentication and authorization of the user  User account information can be kept in several places Plain text files DBM files MySQL database Here, we’ll restrict access to the “admin” section of our site to the librarians Jim and Carla Since the number of users is small, we’ll store them in a plain text file Managing the User Account File 1 Enable headers

Read more

Configuring Virtual Hosting in Apache

“Virtual hosting is a method for hosting multiple domain names (with separate handling of each name) on a single server (or pool of servers).” Wikipedia How Does Apache Know Which Site to Serve? The short answer to your specific case: apache will serve the FIRST overlapping virtual host. Since 000-default is before fc.localhost in the alphabet the first virtualhost is loaded and served. To answer what i assume is the follow up question: You can host many sites on the

Read more

Basic Apache Configuration

Apache’s Modular Architecture corepreforkhttp_coremod_soLoadModuledirectives mod_aliasmod_mimemod_proxymod_rewritemod_status The core executable others … The directory Apache The httpd package we installed includes the config file: Listening on a Port You can restrict apache to listen on a specific network interface Listen 22.33.44.55:80 Setting the Document Root The DocumentRoot defines the top-level directory of the web site Setting an Identity Apache needs a user identity to run as Used to perform access control checks to the file system Defining Multi-Process Settings To improve response

Read more

Installing and Configuring Apache Web Server

Step 1: Configure IIS Apache listens for requests on TCP/IP port 80. You need to uninstall or disable any program that uses that port. If you have a Professional or Server version of Windows, you may already have IIS installed. If you would prefer Apache, either remove IIS as a Windows component or disable its services. Step 2: Download the files We’re going to use the unofficial Windows binary from Apache Lounge. This version has performance and stability improvements over the

Read more

Setup Virtual Hosts with Apache Web Server on Linux

First thing you need to do is to install apache in your machine. Apache Installation Apache gives its functionality and the components to individual units which can be customized and configured independently. The basic unit that describes a site or a domain is called a virtual host. This allows the administrator to use one server to host multiple domains or sites with a single interface or IP address by using a mechanism. Create the Directory Structure A directory structure shall

Read more

What Is DISM? How to check and restore your windows image health.

DISM, whose full name is the Deployment Image Service and Management, is a built-in tool of Windows, first introduced in Windows 7 and Windows Server R2. It can perform servicing tasks on a Windows installation image, on an online or offline image within a folder, or on WIM files. The DISM tool can be available from the Command Line or the Windows PowerShell. DISM tool can be used to update files and fix problems when a Windows image becomes unserviceable. However,

Read more

What are Linux Users, Groups and Permissions

If you are new to Linux/Unix, then the concept of permissions may be confusing. This guide provides you with an explanation of what permissions are, how they work, and how to manage them. A number of examples are provided to illustrate how to set and change permissions for both users and groups. What are Linux User and Group Permissions? Linux/Unix operating systems have the ability to multitask in a manner similar to other operating systems. However, Linux’s major difference from

Read more

Deploy a Laravel project to ubuntu server using git

Steps to create project in local machine Step :1 Create a folder anywhere in your local computer with any name (Mine is workspace) Step:2 Make sure git and gitbash is installed in your local machine if not download it from here Step:3 Login into your GitHub account and create a repository Step 4: Clone the repository into your local machine get inside your repository Copy the URL under HTTPS area There are many more ways to clone a repo but

Read more

Permissions required to make a Laravel project up and running in ubuntu (Linux)

Before moving further, hope you have already installed xampp and composer in your machine.if not follow the below blog to do so. First permission: As you know the first thing our browser needs to run a Laravel project is, the index file which is located in the public folder so we need to make it read and writable so that our browser can access it and if required can modify it. Run the below command to grant access to the

Read more

Install a Laravel project inside htdocs folder in ubuntu

I was moving a Laravel project to a ubuntu virtual machine.Steps that I followed: 1. Installed Xampp 2. Another thing which is required is Composer 3. Now the thing is when we try to install Laravel project inside our htdocs folder it through an error 4. To resolve this error first create a folder inside your htdocs. 5 grant read and write permissions to this folder by running this commands 6. You may get another error while installing is (“mbstring”

Read more

require ext-dom * -> it is missing from your system. Install or enable PHP’s dom extension.

Make sure you are in htdocs folder while executing the commands. I was trying to install Laravel in a Ubuntu virtual machine and got this error Your requirements could not be resolved to an installable set of packages. Problem 1 – phpunit/phpunit[7.5.0, …, 7.5.20] require ext-dom * -> it is missing from your system. Install or enable PHP’s dom extension. – Root composer.json requires phpunit/phpunit ^7.5 -> satisfiable by phpunit/phpunit[7.5.0, …, 7.5.20]. And To enable extensions, verify that they are

Read more

Install composer using CLI in ubuntu (Globally)

Steps For Installing PHP Composer on Ubuntu STEP 1: Update You distribution Enter this command to update the local repository lists. STEP 2: Download the Composer Installer run the below command in your root directory (We are installing composer globally) Step 3: Verify Integrity of the Download 1. Visit the Composer Public Keys page. Copy the Installer Signature (SHA-384).2. Set the code shell variable: COMPOSER=48e3236262b34d30969dca3c37281b3b4bbe3221bda826ac6a9a62d6444cdb0dcd0615698a5cbe587c3f0fe57a54d8f53. Run the script below to compare the official hash against the one you downloaded: Step 4: Install

Read more
1 2