Posts

Showing posts with the label Shell Example

Call Middleware In Controller Laravel Code Example

Example: laravel controller middleware class UserController extends Controller { /** * Instantiate a new controller instance. * * @return void */ public function __construct ( ) { $this - > middleware ( 'auth' ) ; $this - > middleware ( 'log' ) - > only ( 'index' ) ; $this - > middleware ( 'subscribed' ) - > except ( 'store' ) ; } }

Convert From .cer To .pem Code Example

Example 1: convert crt to pem openssl x509 -inform DER -in yourdownloaded.crt -out outcert.pem -text Example 2: convert pem to private key openssl openssl rsa -outform der -in private.pem -out private.key

Android Debug Keystore Code Example

Example 1: download debug.keystore keytool -genkey -v -keystore ~/.android/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US" Example 2: android create keystore command line keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000

Convert Pem File To Ppk Code Example

Example: old pem format putty Convert .pem to .ppk file format Using Putty ( Windows ) To convert the .pem file .ppk follow below points 1 . First you need to download Putty from here. 2 . Then run puttygen to convert .PEM file to .PPK file. 3 . Start puttygen and select “Load” 4 . Select your .PEM file. 5 . Putty will convert the .PEM format to .PPK format. 6 . Select “Save Private Key” A passphrase is not required but can be used if additional security is required.

Add A Linkedin Link To Github Readme Code Example

Example: how to add link to github readme [ I 'm an inline-style link](https://www.google.com) [I' m an inline-style link with title ] ( https://www.google.com "Google's Homepage" ) [ I 'm a reference-style link][Arbitrary case-insensitive reference text] [I' m a relative reference to a repository file ] ( .. /blob/master/LICENSE ) [ You can use numbers for reference-style link definitions ] [ 1 ] Or leave it empty and use the [ link text itself ] . URLs and URLs in angle brackets will automatically get turned into links. http://www.example.com or < http://www.example.com > and sometimes example.com ( but not on Github, for example ) . Some text to show that the reference links can follow later. [ arbitrary case-insensitive reference text ] : https://www.mozilla.org [ 1 ] : http://slashdot.org [ link text itself ] : http://www.reddit.com

Among Us On Computer On Linux Code Example

Example: does among us exist for linux sudo apt install steam

Conda Create New Environment With Specific Python Version Code Example

Example 1: create a virtual environment python conda conda create -n yourenvname python = x.x anaconda Example 2: create conda env with specific python version conda create -n "myenv" python = 3.3 .0

Copy Folder From Ssh To Local Code Example

Example 1: scp folder from server to local scp -r user@your.server.example.com:/path/to/foo /home/user/Desktop/ Example 2: ssh copy folder from local to remote scp -ra /path/to/local/storage user@remote.host:/path/to/copy Example 3: how to copy directory to a ssh server # Copy from machine a to b scp -r /path/to/directory user@ipaddress:/path/to/destination # Copy from machine b to a scp -r user@ipaddress:/path/to/destination /path/to/directory Example 4: copy from remote to local scp file.txt remote_username@10.10.0.2:/remote/directory Example 5: ssh copy folder from local to remote scp -r -P xxxx /path/of/your/local/folder username@hostname:/path/to/remote/server/folder Example 6: ssh copy folder from local to remote scp -P xxxx username@hostname:/path/of/remote/server/filename /path/to/local/destination/folder

Anaconda Prompt Environment List Code Example

Example 1: list conda environments conda info --envs conda env list Example 2: conda create env from yml conda env create -f environment.yml

Composer Install Only One Package Code Example

Example 1: update particular package composer composer update doctrine/doctrine-fixtures-bundle Example 2: composer update php composer.phar update Example 3: composer update single package composer require { package/packagename }

Conda Install Matplotlib Python 2.7 Code Example

Example 1: install matplotlib conda conda install -c conda-forge matplotlib Example 2: conda install matplotlib conda install matplotlib

Add A Cron Job Ubuntu Code Example

Example: set cron job in ubuntu Setting Up a Website Backup through Cron :- == == == == == == == == == == == == == == == == == == == == == = Step 1 : Update your server. As a best practice, we will update and upgrade our server with the following command. apt-get update && apt-get upgrade Step 2 : Verify if the cron package is installed. dpkg -l cron a ) Our example output let’s us know that the cron package is installed, along with its version: || / Name Version Architecture Description +++- == == == == == == == == == == == == = - == == == == == == == == = - == == == == == == == == = - == == == == == == == == == == == == == == == == == == == == == == == == == == == == ii cron 3 .0pl1-128ubuntu2 amd64 process scheduling daemon b ) Install cron package if necessary. sudo apt-get install cron c ) Ensure that the cron service is running with the following command: systemctl status cron Example Output: ---------------- * cron.servi...

Css To Scss Converter\ Code Example

Example 1: sass to scss # You can do it with SASS itself # Nevermind these malware infested sites below sass-convert style.sass style.scss Example 2: scss to css Use the "Live Sass Compiler" in Visual Studio Code

Contributors-shield Github Readme Code Example

Example: some github markup badges [ ! [ Maintenance ] ( https://img.shields.io/badge/Maintained%3F-yes-green.svg ) ] ( https://GitHub.com/Naereen/StrapDown.js/graphs/commit-activity )

Create Alias For Shell Script Code Example

Example 1: how to add alias in linux alias l = "ls -al" Example 2: linux add alias # syntax # alias *<alias-name>="*<what-alias-represents>" # example alias ll = "ls -lrt"

Could Not Get Lock /var/lib/dpkg/lock-frontend - Open (11: Resource Temporarily Unavailable) E: Unable To Acquire The Dpkg Frontend Lock (/var/lib/dpkg/lock-frontend), Is Another Process Using It? Code Example

Example 1: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable) Method 1 ps aux | grep -i apt sudo kill -9 < process_id > Method 2 sudo lsof /var/lib/dpkg/lock sudo lsof /var/lib/apt/lists/lock sudo lsof /var/cache/apt/archives/lock sudo kill -9 < process_id > sudo rm /var/lib/apt/lists/lock sudo rm /var/cache/apt/archives/lock sudo rm /var/lib/dpkg/lock sudo dpkg --configure -a sudo apt update Example 2: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it? ps aux | grep -i dpkg // Kill processes which are running sudo kill -9 < pid > // Restart the accounts daemon sudo systemctl restart accounts-daemon Example 3: E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable) E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it? ps aux | grep -i apt sudo kill <...

Composer Install Single Package Without Update Code Example

Example 1: composer remove packages composer remove vendor/package Example 2: composer update single package composer require phpmailer/phpmailer Example 3: composer update single package composer.phar update doctrine/doctrine-fixtures-bundle Example 4: install a package only composer dont update composer update new/package

Create New Project Angular Code Example

Example 1: create angular project //Author:Mohammad Arman Khan //Steps to install ANGULAR CLI 1 : npm install -g @angular/cli //Initialize first project 2 : ng new my-dream-app 3 : cd my-dream-app // To Run Server 4 : ng serve //done ! ! Example 2: setup new angular project /* Setting up new angular project and run on browser */ npm install -g @angular/cli ng new project-name cd project-name ng serve /* I hope it will help you. Namaste */ Example 3: setup new angular project npm install -g @angular/cli ng new project-name cd project-name ng serve Example 4: angular new project ng new project_name Example 5: ng new project content_copy ng new angular-tour-of-heroes Example 6: create new project angular ng new //After this you will be given the choice to name the project, add routing, add scss/sass/css ng new angular_project cd angular-project ng serve

Angular Material Npm Install Code Example

Example 1: install angular material ng add @angular/material Example 2: angular npm angular material npm i @angular/material Example 3: ng add @angular/material npm install --save @angular/material @angular/cdk @angular/animations

Connect To Firebase Database Through Firebase Cli Code Example

Example 1: firebase cli windows npm install -g firebase-tools Example 2: firebase tools install installing firebase tools