This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo systemctl stop docker && \ | |
docker context use default && \ | |
sudo systemctl start docker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
composer global require laravel/installer && \ | |
sudo ln -s ~/.config/composer/vendor/laravel/installer/bin/laravel /usr/local/bin/ && \ | |
laravel new project-name && \ # This may yield an error about dependencies hence manually installing league/flysystem | |
# sudo zypper in php-fileinfo <- If not already installed | |
cd project-name && \ | |
composer require league/flysystem && \ | |
composer update && \ | |
sudo chown -R user:wwwrun ../project-name && \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
class Hydrator | |
{ | |
#immutable; | |
fromEntity; | |
toEntity; | |
constructor (fromEntity, toEntity, lazy = true, immutable = true) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/expect -f | |
# Requires: expect, spawn | |
spawn ssh-add | |
expect "Enter passphrase for /home/zaphod/.ssh/id_rsa:" | |
send "my_password" | |
interact |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Given a collection that implements the Iterator interface: | |
* @see https://www.php.net/manual/en/class.iterator | |
*/ | |
return (int)!empty($collection->entries) * ($collection->key() + 1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare(strict_types = 1); | |
/** | |
* factorialFactorial | |
* Finding the factorial of a $number by recursion | |
* | |
* @author Er Galvão Abbott <[email protected]> | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo dnf -y update && sudo dnf -y install xclip && xclip -selection clipboard < ~/.ssh/NOME_DA_CHAVE.pub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/bash | |
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc | |
cat <<EOF | sudo tee /etc/yum.repos.d/vscode.repo | |
[code] | |
name=Visual Studio Code | |
baseurl=https://packages.microsoft.com/yumrepos/vscode | |
enabled=1 | |
gpgcheck=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo dnf -y install httpd mariadb mariadb-server php-cli php-intl php-mbstring php-pdo php-sodium php-xml php-gd php-mysqlnd php-devel php-ffi php-fpm php-pear php-mbstring php-bcmath |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
C:\laragon\bin\php\php-7.2.19-Win32-VC15-x64\php C:\composer\composer.phar create-project --prefer-dist laravel/laravel C:\laragon\www\laravel54_example "5.4.*" |
NewerOlder