Skip to content

Instantly share code, notes, and snippets.

View atlance's full-sized avatar

Anton Stepanov atlance

  • Saint Petersburg
View GitHub Profile
@atlance
atlance / Dockerfile
Created January 24, 2025 09:23 — forked from ziadoz/Dockerfile
Docker - PHP, Composer, Google Chrome and ChromeDriver
FROM php:8.0-fpm
# Copy Composer:
COPY --from=composer /usr/bin/composer /usr/bin/composer
# Install PHP extensions:
ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
RUN chmod +x /usr/local/bin/install-php-extensions && \
install-php-extensions zip
@atlance
atlance / Hooks.php
Created February 13, 2024 07:02 — forked from jasonvarga/Hooks.php
PHPUnit Test Hooks Extension
<?php
namespace Tests;
use PHPUnit\Runner\AfterLastTestHook;
use PHPUnit\Runner\BeforeFirstTestHook;
use PHPUnit\Runner\BeforeTestHook;
class Hooks implements BeforeFirstTestHook, AfterLastTestHook, BeforeTestHook
{
@atlance
atlance / iteration-and-recursive-iteration.php
Created February 7, 2024 04:52 — forked from hakre/iteration-and-recursive-iteration.php
Iteration and Recursive Iteration Examples Code
<?php
/*
* Iteration and Recursive Iteration Examples Code
*
* @link http://stackoverflow.com/questions/12077177/how-does-recursiveiteratoriterator-works-in-php
* @author hakre <http://hakre.wordpress.com>
*/
### To have these examples to work, a directory with subdirectories is needed,
### I named mine "tree":
@atlance
atlance / composer-private-package-github-token.md
Created November 25, 2023 12:03 — forked from 1242035/composer-private-package-github-token.md
Generate a GitHub Personal Access Token for Private Composer Packages

Generate a GitHub Personal Access Token for Private Composer Packages

If you're trying to load a private repository with Composer/Laravel, we'll need to generate a GitHub Personal Access Token (similar to OAuth token) to access the repository during a composer install without entering credentials.

If you have used other Github packages from {my-org} before, you may be able to skip this step.

  1. Visit https://github.com/settings/tokens.

  2. Click Generate new token.

@atlance
atlance / ykb-test-cards.txt
Created May 26, 2023 11:45
Yapıkredi Posnet test kredi kartları
Kart Numarası CVV SKT
4506 3470 4958 3145 000 24/05
4506 3470 2791 1094 000 24/12
5400 6170 2447 9160 000 24/11
4506 3441 3133 9098 000 21/02
@atlance
atlance / github_gpg_key.md
Created February 24, 2023 14:29 — forked from ankurk91/github_gpg_key.md
Signing git commits using GPG (Ubuntu/Mac)

Github : Signing commits using GPG (Ubuntu/Mac) 🔐

  • Do you have an Github account ? If not create one.
  • Install required tools
  • Latest Git Client
  • gpg tools
# Ubuntu
sudo apt-get install gpa seahorse
# MacOS with https://brew.sh/
@atlance
atlance / git: gitignore.md
Created August 24, 2022 09:11 — forked from jstnlvns/git: gitignore.md
a gitignore cheatsheet

Git sees every file in your working copy as one of three things:

  1. tracked - a file which has been previously staged or committed;
  2. untracked - a file which has not been staged or committed; or
  3. ignored - a file which Git has been explicitly told to ignore.

Ignored files are usually build artifacts and machine generated files that can be derived from your repository source or should otherwise not be committed. Some common examples are:

  • dependency caches, such as the contents of /node_modules or /packages
  • compiled code, such as .o, .pyc, and .class files
@atlance
atlance / GNU-Make.md
Created July 28, 2022 11:42 — forked from rueycheng/GNU-Make.md
GNU Make cheatsheet
@atlance
atlance / Controller.php
Last active February 19, 2024 13:43
attributes for nelmio api doc
<?php
declare(strict_types=1);
// ...
use OpenApi\Attributes as OA;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
#[OA\Get(
tags: ['foo-bar'],
@atlance
atlance / archive-and-restore-from-github.md
Created May 4, 2022 07:57
Archive/Restore Git Repos to/from GitHub

Archive a GitHub Repository

git clone --bare git@github.com:jonlong/<repo>.git
tar -czf <repo>.git.tar.gz <repo>.git

Deploy an Archived Repository to GitHub

Create a new private repository on the target account:

curl -F 'login=' -F 'token=' -F 'name=jonlong/' -F 'public=0' http://github.com/api/v2/json/repos/create