Skip to content

Instantly share code, notes, and snippets.

View Ocramius's full-sized avatar
🔬
In your repositories, watching your code. Always watching.

Marco Pivetta Ocramius

🔬
In your repositories, watching your code. Always watching.
View GitHub Profile
/usr/bin/php /home/ocramius/Documents/roave/ApiCompare/bin/api-compare api-compare:compare --from=v2.6.0 --to=master lib/Doctrine/ORM/Mapping/
Comparing from 83cb274a7a4d7dcef9133f6d7973f132b140efd3 to 50da42f2f472a705586a2803f9acbb991b8db0a2...
Loading composer repositories with package information
Updating dependencies
Package operations: 10 installs, 0 updates, 0 removals
- Installing doctrine/lexer (v1.0.1): Loading from cache
- Installing doctrine/annotations (v1.6.0): Loading from cache
- Installing doctrine/cache (v1.7.1): Loading from cache
- Installing doctrine/collections (v1.5.0): Loading from cache
- Installing doctrine/inflector (v1.3.0): Loading from cache
<?php
namespace GoetasWebservices\Xsd\XsdToPhp\Php;
use GoetasWebservices\Xsd\XsdToPhp\Php\Structure\PHPClass;
use GoetasWebservices\Xsd\XsdToPhp\Php\Structure\PHPProperty;
use Zend\Code\Generator\ClassGenerator;
use Zend\Code\Generator\DocBlock\Tag\VarTag;
use Zend\Code\Generator\DocBlockGenerator;
use Zend\Code\Generator\MethodGenerator;
@Ocramius
Ocramius / Caddyfile
Last active May 30, 2018 07:23
Example of Caddy in front of an HTTP server
{$CADDY_WEB_HOST}:443 {
proxy / the-webserver.internal-network:80
tls self_signed
}
{$CADDY_WEB_HOST}:80 {
redir https://{$CADDY_WEB_HOST}{uri}
}
@Ocramius
Ocramius / example.php
Created June 25, 2017 10:40 — forked from hikari-no-yume/example.php
function chaining for PHP 7
<?php declare(strict_types=1);
require_once "✨.🐘";
✨($_)->strlen("foo")->var_dump($_);
@Ocramius
Ocramius / whiteboardCleaner.md
Created June 12, 2017 07:24 — forked from lelandbatey/whiteboardCleaner.md
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

@Ocramius
Ocramius / nixos-on-dell-9560.org
Created April 9, 2017 13:45 — forked from grahamc/nixos-on-dell-9560.org
NixOS on a Dell 15" 9560 with the 4K screen.
@Ocramius
Ocramius / XPS-15 9560 Getting Nvidia To Work on KDE Neon
Created April 9, 2017 13:34 — forked from whizzzkid/XPS-15 9560 Getting Nvidia To Work on KDE Neon
Making Nvidia Drivers + CUDA 8 + Bumblebee work together on XPS 15 Early 2017 9560 kabylake.
# Update to 4.9 kernel do not delete the old kernel as it will be your failsafe if something happens to this one
# Install KabyLake graphics patches
cd /tmp;
wget https://01.org/sites/default/files/downloads/intelr-graphics-linux/kbldmcver101.tar.bz2;
tar xjvf kbldmcver101.tar.bz2; cd kbl_dmc_ver1_01/; sudo ./install.sh
cd /tmp;
wget https://01.org/sites/default/files/downloads/intelr-graphics-linux/kblgucver914.tar.gz;
tar xvzf kblgucver914.tar.gz; cd firmware/kbl/guc/kbl_guc_ver/; sudo ./install.sh
<?php
namespace Doctrine\Tests\ORM\Functional\Ticket;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\ORM\Tools\SchemaValidator;
use Doctrine\ORM\Tools\ToolsException;
/**
* @coversNothing
<?php
interface CustomerRepository
{
public function isPremiumCustomer(CustomerId $customerId) : bool;
// ... more API (fetch collections, filter, etc):
public function findAllPremiumCustomer() : PremiumCustomersList;
public function findAllPremiumCustomerIds() : PremiumCustomersIdList;
}
@Ocramius
Ocramius / introrx.md
Created June 24, 2016 01:17 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing