View cli
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/env php | |
<?php | |
use Neoan\Cli\Application; | |
use Neoan\Helper\Setup; | |
use Neoan\NeoanApp; | |
require_once __DIR__ . '/vendor/autoload.php'; | |
$setup = new Setup(); |
View AttachUser.php
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 | |
namespace App\Transformers; | |
use Josantonius\Session\Facades\Session; | |
use Neoan\Enums\Direction; | |
use Neoan\Model\Interfaces\Transformation; | |
class AttachUser implements Transformation |
View simple-api-benchmark.js
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
/* | |
* Simple API performance test for comparative benchmarking of GET-calls | |
* | |
* Usage: adjust variables below and then run `node benchmarkIt.js` | |
* | |
* | |
* Concurrency is not refilled during a cycle, as some benchmarking scripts do. | |
* This results in longer overall runtime and yield slower results than most benchmark metrics use. | |
* A good request-time is therefore ~< 20ms |
View index.php
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 | |
$current = $_GET['entry'] ?? null; | |
$all = []; | |
$menu = ''; | |
foreach (glob('archieve/*.json') as $i => $entry) { | |
$all[] = json_decode(file_get_contents($entry), true); | |
if (!$current) { | |
$current = $all[0]['slug']; | |
} | |
// menu |
View AuthController.php
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 | |
namespace Neoan3\Component\Auth; | |
use Neoan3\Core\RouteException; | |
use Neoan3\Frame\Demo; | |
use Neoan3\Model\User\UserModel; | |
use Neoan3\Provider\Auth\Authorization; | |
use Neoan3\Provider\Model\InitModel; |
View api.js
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
let config = { | |
baseURL: process.env.apiRoute, //http://localhost:3000 | |
timeout: 8000, | |
headers: {'X-Custom-Header': 'wb-app'} | |
}; | |
const API = axios.create(config); | |
API.interceptors.request.use(exitingConfig => { | |
if(sessionStorage.token){ | |
exitingConfig.headers.Authorization = `Bearer ${localStorage.token.replace('"','')}`; | |
} |
View scenario_save-the-cargo.js
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
let planetIndex = 1; | |
// the following line does only work on a local system and not online (so only if you check out the repo) | |
spaceStation.cheat(); | |
/* | |
Practice scenario: Retrieve cargo | |
Click on "execute" to start! | |
YOUR TASK: use a second ship to retrieve cargo from a rouge drone! |
View Vagrantfile
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# neoan3 vagrant box | |
Vagrant.configure("2") do |config| | |
config.vm.box = "ubuntu/bionic64" | |
config.vm.network "private_network", ip: "192.168.33.10" |
View UserModel.php
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 | |
/* Generated by neoan3-cli */ | |
namespace Neoan3\Model\User; | |
use Exception; | |
use Neoan3\Provider\MySql\Database; | |
use Neoan3\Provider\Model\Model; | |
use Neoan3\Provider\MySql\Transform; |
View index.php
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 | |
define('varovalka', true); | |
ini_set('error_reporting',E_ALL); | |
ini_set('display_errors',1); | |
include_once 'shared.php'; | |
?> | |
<!DOCTYPE html> | |
<html lang="en" dir="ltr"> | |
<head> |
NewerOlder