This file contains hidden or 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=0); | |
| use App\DTO\User\ShowDTO; | |
| use App\DTO\User\UpdateDTO; | |
| use App\Models\User; | |
| use App\Services\User\UserService; | |
| use Illuminate\Support\Facades\Gate; | |
| use Illuminate\Support\Facades\Hash; |
This file contains hidden or 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
| # Apple не удалось подтвердить, что файл «cli» не содержит вредоносного ПО, | |
| # которое может нанести вред Вашему Mac или конфиденциальности Ваших данных. | |
| # Apple could not confirm that the "cli" file does not contain malware, | |
| # which may harm your Mac or the privacy of your data. | |
| xattr -d com.apple.quarantine path_your_app |
This file contains hidden or 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
| package main | |
| //Reading from stdin: | |
| var input string | |
| fmt.Scanln(&input) | |
| fmt.Println("Введено:", input) | |
| //Reading all of stdin: | |
| data, _ := io.ReadAll(os.Stdin) |
This file contains hidden or 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 | |
| // tests/TestCase.php | |
| abstract class TestCase extends BaseTestCase | |
| { | |
| protected ?string $apiToken = null; | |
| protected function actingAsApi(User $user): self | |
| { | |
| if ($this->apiToken) { |
This file contains hidden or 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
| #!/bin/bash | |
| if [ "$1" = "--prepare-env" ]; then | |
| DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | |
| mkdir -p ~/Scripts | |
| echo "Copying the script to $HOME/Scripts" | |
| cp -rf $DIR/runme.sh ~/Scripts/jetbrains-reset.sh | |
| chmod +x ~/Scripts/jetbrains-reset.sh |
This file contains hidden or 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
| // This shows an example of how to generate a SSH RSA Private/Public key pair and save it locally | |
| package main | |
| import ( | |
| "crypto/rand" | |
| "crypto/rsa" | |
| "crypto/x509" | |
| "encoding/pem" | |
| "golang.org/x/crypto/ssh" |
This file contains hidden or 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
| /** | |
| * Generates number of random geolocation points given a center and a radius. | |
| * @param {Object} center A JS object with lat and lng attributes. | |
| * @param {number} radius Radius in meters. | |
| * @param {number} count Number of points to generate. | |
| * @return {array} Array of Objects with lat and lng attributes. | |
| */ | |
| function generateRandomPoints(center, radius, count) { | |
| var points = []; | |
| for (var i=0; i<count; i++) { |
This file contains hidden or 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
| package main | |
| import ( | |
| "bufio" | |
| "io/ioutil" | |
| "os/signal" | |
| //"syscall" | |
| "fmt" | |
| "log" | |
| "os" |
This file contains hidden or 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
| #!/bin/bash | |
| # Colors for terminal output | |
| RED='\033[0;31m' | |
| GREEN='\033[0;92m' | |
| YELLOW='\033[0;33m' | |
| BLUE='\033[0;94m' | |
| PURPLE='\033[0;95m' | |
| CYAN='\033[1;96m' | |
| WHITE='\033[0;97m' |