Skip to content

Instantly share code, notes, and snippets.

View Koopzington's full-sized avatar
🐢

Koopz Koopzington

🐢
View GitHub Profile
@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==
@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 / gist:6395aa400a37f2b4093f27b9f5bacbaf
Last active October 25, 2016 08:09
Which components am i using?
grep -hoR 'Zend\\\w*' module/ | sort | uniq
#!/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) {
// ==UserScript==
// @name GIVE ALL THE LLAMAS - Group Memberlist
// @namespace http://github.com/koopzington/
// @version 1.2.3
// @description Script to let your browser automatically click you One-Click-Llama-Buttons on memberlists of groups
// @author Koopzington
// @match https://*.deviantart.com/modals/memberlist*
// @match https://www.deviantart.com/*/modals/memberlist*
// @downloadURL https://gist.githubusercontent.com/Koopzington/a13d421ff3bf65f49b3348b5dc0d7962/raw/give-all-the-llamas.user.js
// @grant none
@Koopzington
Koopzington / da-hotkeys.user.js
Last active September 21, 2018 12:30
deviantArt Hotkeys for Notifications
// ==UserScript==
// @name dA Hotkeys
// @namespace https://koopzington.github.com/
// @version 0.4
// @description DeviantArt also has Hotkeys now!
// @author Koopzington@gmail.com
// @match https://*.deviantart.com/*
// @downloadURL https://gist.github.com/Koopzington/e5a9d0d52630355e7a07b314eac19f7f/raw/da-hotkeys.user.js
// @grant none
// ==/UserScript==
#!/usr/bin/env php
<?php
/**
* DISCLAIMER: Even though I tried my best to prevent anything bad from happening,
* I can't guarantee that your code won't break after using this script on it.
*
* What does this script do?
* It replaces all occurences of $FooBar and $foo_bar with properly camelCased $fooBar.
* Replacements also include references to class properties like $this->foo_bar and $this->FooBar
*
<?php
namespace Foo\Validator;
use Zend\Validator\ValidatorInterface;
final class LicensePlateValidator implements ValidatorInterface
{
const FORMATS = [
// Germany (Total Length: 8 characters excluding spaces, No leading zeros, can end in E or H)
@Koopzington
Koopzington / app.php
Created July 26, 2018 09:45 — forked from miraris/app.php
👌👀👌👀👌👀👌👀👌👀 good shit go౦ԁ sHit👌 thats ✔ some good👌👌shit right👌👌there👌👌👌 right✔there ✔✔if i do ƽaү so my self 💯 i say so 💯 thats what im talking about right there right there (chorus: ʳᶦᵍʰᵗ ᵗʰᵉʳᵉ) mMMMMᎷМ💯 👌👌 👌НO0ОଠOOOOOОଠଠOoooᵒᵒᵒᵒᵒᵒᵒᵒᵒ👌 👌👌 👌 💯 👌 👀 👀 👀 👌👌Good shit
<?php
require 'vendor/autoload.php';
require 'proxygrabber.php';
const XML_FILE_NAME = 'data/anime-titles.xml';
const ARCHIVE_NAME = 'data/anime-titles.gz';
/**
* Decompresses a gunzip arhive
@Koopzington
Koopzington / PhpStorm-things
Created July 27, 2018 12:14
PhpStorm-things
Replace 3-line comments with one-liner:
/**
* @var Adapter $adapter
*/
/** @var Adapter $adapter */
Search: \/\*\*\n.*(\@.*).*\n.*\*\/
Replace: \/\*\* $1 \*\/