Skip to content

Instantly share code, notes, and snippets.

View pentagonal's full-sized avatar

Pentagonal pentagonal

View GitHub Profile
@pentagonal
pentagonal / Task.php
Last active September 14, 2017 19:41
Task State Base
<?php
declare(strict_type=1);
namespace Pentagonal\Gist\Task\Abstracts;
use Pentagonal\Gist\Task\Interfaces\TaskInterface;
use InvalidArgumentException;
/**
* class TaskAbstract
@pentagonal
pentagonal / installer.sh
Last active February 21, 2019 20:14
Ubuntu MySQL + Php (7.1) + Nginx (+Redis) Automated Installer
#!/bin/bash
#
# Pentagonal
# Ubuntu (Based) Php, Nginx, MariaDB Installer
# youtube: https://www.youtube.com/pentagonalOrg
# email: org@pentagonal.org
#
isDefaultOk=false;
@pentagonal
pentagonal / ComposerLoaderPSR4.php
Created June 18, 2017 07:00
Using Composer To Register & Load Class Files
<?php
namespace Pentagonal\FollowComposerLoader;
use InvalidArgumentException;
use Composer\Autoload\ClassLoader;
/**
* Class ComposerLoaderPSR4
*
* Using @uses ClassLoader that make Load Class With Easy Way
@pentagonal
pentagonal / XmlBuilderTrait.php
Last active November 20, 2022 09:21
Nested XML Builder With Definition
<?php
/*
* XML EXAMPLE FOR RETURNING GET REAL DATA VALUE
* This for Tricky XML Return Data
* if got invalid attribute will be use tag as
* <tag key="key name of tag" type="type value"></tag>
*
// SET DATA
[
'Array1' => [ # array
@pentagonal
pentagonal / Example.php
Last active June 18, 2017 07:11
Custom Array Table Schema With SQL Migration (Use Doctrine DBAL { @link https://github.com/doctrine/dbal } )
<?php
/**
* prototype of Builder & Extending Doctrine DBAL
* please see { @link https://github.com/PentagonalProject/ProjectSeventh/tree/development }
*/
use Doctrine\DBAL\DriverManager;
/**
* List Scheme
@ttaubert
ttaubert / onion-gen.js
Created November 2, 2014 13:14
Generating custom .onion names with the WebCrypto API
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
/*
* thirty-two
* https://github.com/chrisumbel/thirty-two
*