GitHub
Tests: 12 • Commercial: 2 • Pet projects: 4 • Legacy: 4
Total: 22

.NET Framework

Test
2021

Project Request

ASP.NET MVC • C# • SQL Server
Idea of the project: if someone wants to order a project development, here you can send an application.
Test
2020

ProjectC

ASP.NET MVC • C# • JSON • jQuery
JSON data processing.
Test
2020

Vehicle Maintenance

ASP.NET MVC • VB.NET • JSON
Idea of the project: if someone wants to order a project development, here you can send an application.
Test
2019

Movie Navigator

ASP.NET MVC • VB.NET
Request information about movie from IMDB.
Test
2018

Customers Exchange

ASP.NET MVC • C# • SQL Server
Automated teller machine emulation.
Test
2016

ATM

ASP.NET MVC • C#
Automated teller machine emulation.

.NET Core

Pet project
2022

Mail Daemon

.NET 9 • Console • JSON
Utility to send mails with customizable settings.

Custom

Code
2024

Buns of code

.NET Framework • C# • JavaScript
Code snippets from my projects, ready to use; tiny tests; code examples.

PHP

Test
2024

Mediabox

PHP 8 • Laravel 11 • Vue.js • Composer • SQLite
Test project for media files management.
Test
2020

Loan Castle

PHP • MariaDB
Jums jāizstrādā kāda lielāk projekta prototips. Izstrādājot prototipu, paturiet prātā, ka projektam attīstoties, šo prototipu varētu vajadzēt pilnveidot.
Test
2020

Content Management

PHP • MySQL • AJAX
Создать простой сайт, где будет страница с формой для авторизации и страница для авторизованного пользователя.
Test
2019

Laravel

PHP • Laravel • Vue.js • Composer • SQLite
Izveidot aplikāciju, kura ik pēc noteikta intervāla (60 sekundes) veic ierakstu datubāzē izmantojot Laravel freimworka iebūvēto funkcionalitāti.
Test
2019

Phone Check

PHP • JavaScript • JSON • Docker
Implement application to detect country by phone number.

Frontend

Test
2021

Forex Wall

npm • React
For this exercise, what we need is a simple live wall for tracking currencies.

Business projects

Commercial
2008

Certification Center

.NET Framework 4.8 • ASP.NET Web Forms • C# • LINQ • SQL Server • ADO.NET • Dapper • JavaScript • jQuery • Git
Transport registration and certification services in Latvia, Customer Relationship Management.
Commercial
2000

Amerikas Auto

.NET Framework 4.8 • ASP.NET Web Forms • C# • LINQ • SQL Server • ADO.NET • Entity Framework • JavaScript • jQuery • Git
Car service and spare parts for all USA and European car models, Customer Relationship Management.

Pet projects

Pet project
2023

Geolocation Assistant

.NET 8 • ASP.NET Core • C# • Web API • JSON • Git
Website for determining geolocation by IP or geotagged photo.
Pet project
2008

Web Dynamics

.NET Framework 4.8 • ASP.NET Web Forms • C# • LINQ • Web API • JSON • SQL Server • Dapper • JavaScript • jQuery • SVG • Git
Software development blog. Articles, books, videos, content management.
Pet project
2000

Blackball

.NET Framework 4.8 • ASP.NET Web Forms • C# • LINQ • Web API • JSON • XML • SQL Server • Dapper • JavaScript • jQuery • SVG • Git
My entertainment portal created from scratch.

Good old times

Legacy
2000

DOS Clock

Turbo Pascal • Assembler
Digital clock.
Legacy
2000

BrainOut

Turbo Pascal • Assembler
Tank battle game.
Legacy
1999

Airport Administrator

Turbo Pascal
Курсовая работа в институте.
Legacy
1998

Atomizer

Turbo Pascal • Assembler
Atomizer, aka «Studio2D». Graphic raster editor. AGI is my own «Atomizer Generated Image» file format.

Laravel

2019 Test

Izveidot aplikāciju, kura ik pēc noteikta intervāla (60 sekundes) veic ierakstu datubāzē izmantojot Laravel freimworka iebūvēto funkcionalitāti.

PHP Laravel Vue.js Composer SQLite
Information
Source code
  app
  Http
  Auth
  css
  js
  js
  lang
  en
  sass
  app
  data
  logs
  Unit
  src
  src
  lib
  docs
  en
  src
  docs
  en
  lib
  src
  Cron
  Cron
  src
  filp
  src
  css
  js
  Util
  src
  ORM
  Spot
  test
  Core
  Text
  Type
  Xml
  Core
  Text
  Type
  Xml
  html
  src
  src
  src
  Auth
  make
  auth
  Bus
  Auth
  Bus
  Http
  Mail
  View
  Auth
  Bus
  Http
  Http
  Json
  Log
  Mail
  html
  text
  Jobs
  View
  src
  src
  Util
  docs
  Pass
  Pass
  Pass
  doc
  src
  Curl
  doc
  f001
  f002
  f003
  f004
  f005
  f006
  f007
  f008
  src
  Date
  Spl
  src
  Lang
  List
  doc
  lib
  Node
  Expr
  Cast
  Name
  Stmt
  test
  code
  expr
  uvs
  stmt
  loop
  expr
  stmt
  Node
  Stmt
  src
  opis
  src
  dist
  lib
  src
  xml
  xml
  src
  Unit
  src
  src
  Tags
  src
  src
  src
  Call
  Node
  Call
  Util
  src
  Node
  Html
  css
  js
  Xml
  HTML
  XML
  src
  src
  src
  src
  src
  Stub
  Hook
  Util
  Log
  PHP
  cli
  1149
  1216
  1265
  1330
  1335
  1337
  1348
  1351
  1374
  1437
  1468
  1471
  1472
  1570
  2085
  2137
  2145
  2158
  2366
  2380
  2382
  2435
  244
  2448
  2724
  2725
  2731
  2811
  2830
  2972
  3093
  3107
  3156
  322
  3364
  3379
  3380
  3396
  433
  445
  498
  503
  581
  74
  765
  797
  873
  Trac
  1021
  523
  578
  684
  783
  fail
  unit
  Util
  PHP
  psr
  src
  log
  Psr
  Log
  Test
  src
  psy
  src
  Sudo
  Util
  test
  Sudo
  Util
  box
  uuid
  src
  Time
  Node
  Time
  src
  src
  diff
  src
  out
  src
  src
  src
  src
  src
  src
  src
  src
  doc
  lib
  Mime
  Pop
  Auth
  Mime
  bug
  unit
  Mime
  Auth
  dkim
  Node
  Node
  psr4
  phpt
  .dot
  b
  a
  A
  B
  C
  copy
  A
  B
  C
  one
  b
  .dot
  a
  dir
  File
  Test
  File
  test
  Test
  Log
  Log
  mime
  Part
  test
  Part
  glob
  Test
  data
  dat
  res
  Util
  Util
  Test
  css
  js
  Test
  Test
  src
  src
  Css
  Rule
  src
  src
  .env
  null
Root / vendor / laravel / framework / src / Illuminate / Filesystem / FilesystemAdapter.php
<?php namespace Illuminate\Filesystem; use RuntimeException; use Illuminate\Http\File; use Illuminate\Support\Arr; use Illuminate\Support\Str; use InvalidArgumentException; use Illuminate\Support\Carbon; use Illuminate\Http\UploadedFile; use Illuminate\Support\Collection; use League\Flysystem\AdapterInterface; use PHPUnit\Framework\Assert as PHPUnit; use League\Flysystem\FileExistsException; use League\Flysystem\FilesystemInterface; use League\Flysystem\AwsS3v3\AwsS3Adapter; use League\Flysystem\Cached\CachedAdapter; use League\Flysystem\FileNotFoundException; use League\Flysystem\Rackspace\RackspaceAdapter; use League\Flysystem\Adapter\Local as LocalAdapter; use Symfony\Component\HttpFoundation\StreamedResponse; use Illuminate\Contracts\Filesystem\Cloud as CloudFilesystemContract; use Illuminate\Contracts\Filesystem\Filesystem as FilesystemContract; use Illuminate\Contracts\Filesystem\FileExistsException as ContractFileExistsException; use Illuminate\Contracts\Filesystem\FileNotFoundException as ContractFileNotFoundException; /** * @mixin \League\Flysystem\FilesystemInterface */ class FilesystemAdapter implements FilesystemContract, CloudFilesystemContract { /** * The Flysystem filesystem implementation. * * @var \League\Flysystem\FilesystemInterface */ protected $driver; /** * Create a new filesystem adapter instance. * * @param \League\Flysystem\FilesystemInterface $driver * @return void */ public function __construct(FilesystemInterface $driver) { $this->driver = $driver; } /** * Assert that the given file exists. * * @param string|array $path * @return $this */ public function assertExists($path) { $paths = Arr::wrap($path); foreach ($paths as $path) { PHPUnit::assertTrue( $this->exists($path), "Unable to find a file at path [{$path}]." ); } return $this; } /** * Assert that the given file does not exist. * * @param string|array $path * @return $this */ public function assertMissing($path) { $paths = Arr::wrap($path); foreach ($paths as $path) { PHPUnit::assertFalse( $this->exists($path), "Found unexpected file at path [{$path}]." ); } return $this; } /** * Determine if a file exists. * * @param string $path * @return bool */ public function exists($path) { return $this->driver->has($path); } /** * Get the full path for the file at the given "short" path. * * @param string $path * @return string */ public function path($path) { return $this->driver->getAdapter()->getPathPrefix().$path; } /** * Get the contents of a file. * * @param string $path * @return string * * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException */ public function get($path) { try { return $this->driver->read($path); } catch (FileNotFoundException $e) { throw new ContractFileNotFoundException($path, $e->getCode(), $e); } } /** * Create a streamed response for a given file. * * @param string $path * @param string|null $name * @param array|null $headers * @param string|null $disposition * @return \Symfony\Component\HttpFoundation\StreamedResponse */ public function response($path, $name = null, array $headers = [], $disposition = 'inline') { $response = new StreamedResponse; $filename = $name ?? basename($path); $disposition = $response->headers->makeDisposition( $disposition, $filename, $this->fallbackName($filename) ); $response->headers->replace($headers + [ 'Content-Type' => $this->mimeType($path), 'Content-Length' => $this->size($path), 'Content-Disposition' => $disposition, ]); $response->setCallback(function () use ($path) { $stream = $this->readStream($path); fpassthru($stream); fclose($stream); }); return $response; } /** * Create a streamed download response for a given file. * * @param string $path * @param string|null $name * @param array|null $headers * @return \Symfony\Component\HttpFoundation\StreamedResponse */ public function download($path, $name = null, array $headers = []) { return $this->response($path, $name, $headers, 'attachment'); } /** * Convert the string to ASCII characters that are equivalent to the given name. * * @param string $name * @return string */ protected function fallbackName($name) { return str_replace('%', '', Str::ascii($name)); } /** * Write the contents of a file. * * @param string $path * @param string|resource $contents * @param mixed $options * @return bool */ public function put($path, $contents, $options = []) { $options = is_string($options) ? ['visibility' => $options] : (array) $options; // If the given contents is actually a file or uploaded file instance than we will // automatically store the file using a stream. This provides a convenient path // for the developer to store streams without managing them manually in code. if ($contents instanceof File || $contents instanceof UploadedFile) { return $this->putFile($path, $contents, $options); } return is_resource($contents) ? $this->driver->putStream($path, $contents, $options) : $this->driver->put($path, $contents, $options); } /** * Store the uploaded file on the disk. * * @param string $path * @param \Illuminate\Http\File|\Illuminate\Http\UploadedFile $file * @param array $options * @return string|false */ public function putFile($path, $file, $options = []) { return $this->putFileAs($path, $file, $file->hashName(), $options); } /** * Store the uploaded file on the disk with a given name. * * @param string $path * @param \Illuminate\Http\File|\Illuminate\Http\UploadedFile $file * @param string $name * @param array $options * @return string|false */ public function putFileAs($path, $file, $name, $options = []) { $stream = fopen($file->getRealPath(), 'r'); // Next, we will format the path of the file and store the file using a stream since // they provide better performance than alternatives. Once we write the file this // stream will get closed automatically by us so the developer doesn't have to. $result = $this->put( $path = trim($path.'/'.$name, '/'), $stream, $options ); if (is_resource($stream)) { fclose($stream); } return $result ? $path : false; } /** * Get the visibility for the given path. * * @param string $path * @return string */ public function getVisibility($path) { if ($this->driver->getVisibility($path) == AdapterInterface::VISIBILITY_PUBLIC) { return FilesystemContract::VISIBILITY_PUBLIC; } return FilesystemContract::VISIBILITY_PRIVATE; } /** * Set the visibility for the given path. * * @param string $path * @param string $visibility * @return bool */ public function setVisibility($path, $visibility) { return $this->driver->setVisibility($path, $this->parseVisibility($visibility)); } /** * Prepend to a file. * * @param string $path * @param string $data * @param string $separator * @return bool */ public function prepend($path, $data, $separator = PHP_EOL) { if ($this->exists($path)) { return $this->put($path, $data.$separator.$this->get($path)); } return $this->put($path, $data); } /** * Append to a file. * * @param string $path * @param string $data * @param string $separator * @return bool */ public function append($path, $data, $separator = PHP_EOL) { if ($this->exists($path)) { return $this->put($path, $this->get($path).$separator.$data); } return $this->put($path, $data); } /** * Delete the file at a given path. * * @param string|array $paths * @return bool */ public function delete($paths) { $paths = is_array($paths) ? $paths : func_get_args(); $success = true; foreach ($paths as $path) { try { if (! $this->driver->delete($path)) { $success = false; } } catch (FileNotFoundException $e) { $success = false; } } return $success; } /** * Copy a file to a new location. * * @param string $from * @param string $to * @return bool */ public function copy($from, $to) { return $this->driver->copy($from, $to); } /** * Move a file to a new location. * * @param string $from * @param string $to * @return bool */ public function move($from, $to) { return $this->driver->rename($from, $to); } /** * Get the file size of a given file. * * @param string $path * @return int */ public function size($path) { return $this->driver->getSize($path); } /** * Get the mime-type of a given file. * * @param string $path * @return string|false */ public function mimeType($path) { return $this->driver->getMimetype($path); } /** * Get the file's last modification time. * * @param string $path * @return int */ public function lastModified($path) { return $this->driver->getTimestamp($path); } /** * Get the URL for the file at the given path. * * @param string $path * @return string * * @throws \RuntimeException */ public function url($path) { $adapter = $this->driver->getAdapter(); if ($adapter instanceof CachedAdapter) { $adapter = $adapter->getAdapter(); } if (method_exists($adapter, 'getUrl')) { return $adapter->getUrl($path); } elseif (method_exists($this->driver, 'getUrl')) { return $this->driver->getUrl($path); } elseif ($adapter instanceof AwsS3Adapter) { return $this->getAwsUrl($adapter, $path); } elseif ($adapter instanceof RackspaceAdapter) { return $this->getRackspaceUrl($adapter, $path); } elseif ($adapter instanceof LocalAdapter) { return $this->getLocalUrl($path); } else { throw new RuntimeException('This driver does not support retrieving URLs.'); } } /** * {@inheritdoc} */ public function readStream($path) { try { return $this->driver->readStream($path) ?: null; } catch (FileNotFoundException $e) { throw new ContractFileNotFoundException($e->getMessage(), $e->getCode(), $e); } } /** * {@inheritdoc} */ public function writeStream($path, $resource, array $options = []) { try { return $this->driver->writeStream($path, $resource, $options); } catch (FileExistsException $e) { throw new ContractFileExistsException($e->getMessage(), $e->getCode(), $e); } } /** * Get the URL for the file at the given path. * * @param \League\Flysystem\AwsS3v3\AwsS3Adapter $adapter * @param string $path * @return string */ protected function getAwsUrl($adapter, $path) { // If an explicit base URL has been set on the disk configuration then we will use // it as the base URL instead of the default path. This allows the developer to // have full control over the base path for this filesystem's generated URLs. if (! is_null($url = $this->driver->getConfig()->get('url'))) { return $this->concatPathToUrl($url, $adapter->getPathPrefix().$path); } return $adapter->getClient()->getObjectUrl( $adapter->getBucket(), $adapter->getPathPrefix().$path ); } /** * Get the URL for the file at the given path. * * @param \League\Flysystem\Rackspace\RackspaceAdapter $adapter * @param string $path * @return string */ protected function getRackspaceUrl($adapter, $path) { return (string) $adapter->getContainer()->getObject($path)->getPublicUrl(); } /** * Get the URL for the file at the given path. * * @param string $path * @return string */ protected function getLocalUrl($path) { $config = $this->driver->getConfig(); // If an explicit base URL has been set on the disk configuration then we will use // it as the base URL instead of the default path. This allows the developer to // have full control over the base path for this filesystem's generated URLs. if ($config->has('url')) { return $this->concatPathToUrl($config->get('url'), $path); } $path = '/storage/'.$path; // If the path contains "storage/public", it probably means the developer is using // the default disk to generate the path instead of the "public" disk like they // are really supposed to use. We will remove the public from this path here. // if (Str::contains($path, '/storage/public/')) { // return Str::replaceFirst('/public/', '/', $path); // } return $path; } /** * Get a temporary URL for the file at the given path. * * @param string $path * @param \DateTimeInterface $expiration * @param array $options * @return string * * @throws \RuntimeException */ public function temporaryUrl($path, $expiration, array $options = []) { $adapter = $this->driver->getAdapter(); if ($adapter instanceof CachedAdapter) { $adapter = $adapter->getAdapter(); } if (method_exists($adapter, 'getTemporaryUrl')) { return $adapter->getTemporaryUrl($path, $expiration, $options); } elseif ($adapter instanceof AwsS3Adapter) { return $this->getAwsTemporaryUrl($adapter, $path, $expiration, $options); } elseif ($adapter instanceof RackspaceAdapter) { return $this->getRackspaceTemporaryUrl($adapter, $path, $expiration, $options); } else { throw new RuntimeException('This driver does not support creating temporary URLs.'); } } /** * Get a temporary URL for the file at the given path. * * @param \League\Flysystem\AwsS3v3\AwsS3Adapter $adapter * @param string $path * @param \DateTimeInterface $expiration * @param array $options * @return string */ public function getAwsTemporaryUrl($adapter, $path, $expiration, $options) { $client = $adapter->getClient(); $command = $client->getCommand('GetObject', array_merge([ 'Bucket' => $adapter->getBucket(), 'Key' => $adapter->getPathPrefix().$path, ], $options)); return (string) $client->createPresignedRequest( $command, $expiration )->getUri(); } /** * Get a temporary URL for the file at the given path. * * @param \League\Flysystem\Rackspace\RackspaceAdapter $adapter * @param string $path * @param \DateTimeInterface $expiration * @param array $options * @return string */ public function getRackspaceTemporaryUrl($adapter, $path, $expiration, $options) { return $adapter->getContainer()->getObject($path)->getTemporaryUrl( Carbon::now()->diffInSeconds($expiration), $options['method'] ?? 'GET', $options['forcePublicUrl'] ?? true ); } /** * Concatenate a path to a URL. * * @param string $url * @param string $path * @return string */ protected function concatPathToUrl($url, $path) { return rtrim($url, '/').'/'.ltrim($path, '/'); } /** * Get an array of all files in a directory. * * @param string|null $directory * @param bool $recursive * @return array */ public function files($directory = null, $recursive = false) { $contents = $this->driver->listContents($directory, $recursive); return $this->filterContentsByType($contents, 'file'); } /** * Get all of the files from the given directory (recursive). * * @param string|null $directory * @return array */ public function allFiles($directory = null) { return $this->files($directory, true); } /** * Get all of the directories within a given directory. * * @param string|null $directory * @param bool $recursive * @return array */ public function directories($directory = null, $recursive = false) { $contents = $this->driver->listContents($directory, $recursive); return $this->filterContentsByType($contents, 'dir'); } /** * Get all (recursive) of the directories within a given directory. * * @param string|null $directory * @return array */ public function allDirectories($directory = null) { return $this->directories($directory, true); } /** * Create a directory. * * @param string $path * @return bool */ public function makeDirectory($path) { return $this->driver->createDir($path); } /** * Recursively delete a directory. * * @param string $directory * @return bool */ public function deleteDirectory($directory) { return $this->driver->deleteDir($directory); } /** * Flush the Flysystem cache. * * @return void */ public function flushCache() { $adapter = $this->driver->getAdapter(); if ($adapter instanceof CachedAdapter) { $adapter->getCache()->flush(); } } /** * Get the Flysystem driver. * * @return \League\Flysystem\FilesystemInterface */ public function getDriver() { return $this->driver; } /** * Filter directory contents by type. * * @param array $contents * @param string $type * @return array */ protected function filterContentsByType($contents, $type) { return Collection::make($contents) ->where('type', $type) ->pluck('path') ->values() ->all(); } /** * Parse the given visibility value. * * @param string|null $visibility * @return string|null * * @throws \InvalidArgumentException */ protected function parseVisibility($visibility) { if (is_null($visibility)) { return; } switch ($visibility) { case FilesystemContract::VISIBILITY_PUBLIC: return AdapterInterface::VISIBILITY_PUBLIC; case FilesystemContract::VISIBILITY_PRIVATE: return AdapterInterface::VISIBILITY_PRIVATE; } throw new InvalidArgumentException("Unknown visibility: {$visibility}"); } /** * Pass dynamic methods call onto Flysystem. * * @param string $method * @param array $parameters * @return mixed * * @throws \BadMethodCallException */ public function __call($method, array $parameters) { return call_user_func_array([$this->driver, $method], $parameters); } }