Skip to content

Instantly share code, notes, and snippets.

View greeflas's full-sized avatar
🇺🇦

Volodymyr Kupriienko greeflas

🇺🇦
View GitHub Profile
name: CI
on: [push]
jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
@greeflas
greeflas / break_singleton.php
Last active August 23, 2019 10:13
How to break singleton pattern in PHP - https://habr.com/ru/post/450554/
<?php
final class Singleton
{
private static $instance;
public static function getInstance()
{
if (null === self::$instance) {
self::$instance = new self();
@greeflas
greeflas / install-toolbox.sh
Last active March 29, 2024 07:53
JetBrains Toolbox installation script for Ubuntu - https://www.jetbrains.com/toolbox/app/
#!/bin/bash
set -e
if [ -d ~/.local/share/JetBrains/Toolbox ]; then
echo "JetBrains Toolbox is already installed!"
exit 0
fi
echo "Start installation..."
@greeflas
greeflas / Bing-spell-check-market-codes.php
Last active May 30, 2018 08:56
Marked codes map for PHP from Bing spell check API.
<?php
// https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-spell-check-api-v7-reference#market-codes
const MARKET_CODES_MAP = [
'ar' => 'es-AR',
'au' => 'en-AU',
'at' => 'de-AT',
'be' => 'fr-BE',
'br' => 'pt-BR',
'ca' => 'en-CA',