Skip to content

Instantly share code, notes, and snippets.

View Koopzington's full-sized avatar
🐢

Koopz Koopzington

🐢
View GitHub Profile
#!/usr/bin/php
<?php
require_once __DIR__ . '/vendor/autoload.php';
// Path to file was passed to the script, find out FQCN of the class with the power of PSR4 mapping!
$file = substr(getcwd() . '/' . $argv[1], 0, -4);
$namespaces = include __DIR__ . '/vendor/composer/autoload_psr4.php';
foreach ($namespaces as $namespace => $paths) {
if (strpos($file, $paths[0]) === 0) {
@Koopzington
Koopzington / gist:6395aa400a37f2b4093f27b9f5bacbaf
Last active October 25, 2016 08:09
Which components am i using?
grep -hoR 'Zend\\\w*' module/ | sort | uniq
@Koopzington
Koopzington / BarService.php
Last active November 29, 2018 13:58 — forked from grizzm0/BarService.php
Various examples of Dependency Injection done right using Zend Framework's ServiceManager and Psr\Container
<?php
namespace Application\Service;
use DateTime;
class BarService
{
protected $dateTime;
@Koopzington
Koopzington / fork-checker.user.js
Created June 22, 2016 20:48
When looking on a GitHub repository, this script checks if you already have a fork of it on your account.
// ==UserScript==
// @name Fork-Checker
// @namespace https://github.com/Koopzington
// @version 0.1
// @description When looking on a GitHub repository, this script checks if you already have a fork of it on your account.
// @author koopzington@gmail.com
// @match https://github.com/*/*
// @grant GM_xmlhttpRequest
// ==/UserScript==