Skip to content

Instantly share code, notes, and snippets.

View ArchTaqi's full-sized avatar
🏠
Working from home

Muhammad Taqi ArchTaqi

🏠
Working from home
View GitHub Profile
@ArchTaqi
ArchTaqi / scripty.py
Last active March 31, 2016 13:35
READ Binary Images FROM MSSQL Server and Store on FileSystem Using Pillow and Upload to S3
__author__ = 'M. Taqi'
__copyright__ = 'Copyright 2015-16, Cogilent '
__license__ = 'MIT'
__email__ = '[email protected]'
import base64
import requests
import sys, os, re, string, pprint
import psycopg2
How to configure phpStorm with EditorConfig and PHPMD:
-----------------------------------------------------
PHPMD:
------
phpmd (PHP Mess Detector) is a static analysis tool that will find issues in your code you never knew you had. Your code will still run, follow a few of phpmd's recommendations though and it will be better!
phpmd is already bundled and enabled in phpstorm, but in order to more easily manage versions and add custom rulesets, you should do the following:
@ArchTaqi
ArchTaqi / 1-install-setup-workspace.md
Last active February 8, 2019 20:08
My Journey to Go App

Installation

Install Using Snap

sudo snap install go --classic
# open these files `nano ~/.profile` or `nano ~/.zshrc` and add below at the end
export GOPATH=$HOME/goproj
export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
@ArchTaqi
ArchTaqi / Timestamps.php
Created November 25, 2018 17:46
Doctrine 2 Timestamps Trait
<?php
namespace App\Traits;
use Doctrine\ORM\Mapping as ORM;
/**
* Trait TimeStampTrait
* @package App\Traits
*/
@ArchTaqi
ArchTaqi / OurAbstractController.php
Last active July 8, 2019 13:55
Proof of Concept: An approach to Fat models, skinny controllers with Event Dispatcher in Symfony
<?php declare(strict_types=1);
namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Validator\ConstraintViolationListInterface;
use Symfony\Component\HttpFoundation\Request;
use App\Event\RepositoryEvent;
/**
<?php declare(strict_types=1);
namespace App\Event;
use Symfony\Contracts\EventDispatcher\Event;
/**
* Class RepositoryEvent
* @package App\Event
*/
<?php declare(strict_types=1);
namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Validator\ConstraintViolationListInterface;
use Symfony\Component\HttpFoundation\Request;
use App\Event\RepositoryEvent;
/**
<?php declare(strict_types=1);
namespace App\Controller;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Serializer\Serializer;
use App\Entity\Post;
<?php declare(strict_types=1);
namespace App\EventListener;
use App\Event\RepositoryEvent;
use App\Services\PostService;
use App\Entity\Post;
/**
* Class PostListener
# This file is the entry point to configure your own services.
# Files in the packages/ subdirectory configure your dependencies.
# Put parameters here that don't need to change on each machine where the app is deployed
# https://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration
parameters:
services:
# default configuration for services in *this* file
_defaults: