- 6 medium russet potatoes, roughly chopped
- 1 large rutabaga, roughly chopped
- 1/2 stick of margarine
- salt and pepper to taste
- 1 large onion, chopped
- 2 medium carrots, grated
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// If this function were a class method, the injection could happen in the constructor instead | |
function printMessageAndExit(string $message, ?ShellHelper $shell): void { | |
$shell = $shell ?? new DefaultShell(); | |
$shell->echo($message); | |
$shell->exit(); | |
} | |
interface ShellHelper { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Phabricator Notification Grouping | |
// @namespace https://gist.github.com/sirbrillig/6473dff58511c1672d644af33f078535 | |
// @version 0.1 | |
// @description Allows collapsing Phabricator notifications to one-per-revision | |
// @author Payton Swick <[email protected]> | |
// @match https://code.a8c.com/notification/* | |
// @grant none | |
// ==/UserScript== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once(__DIR__ . '/../vendor/squizlabs/php_codesniffer/tests/bootstrap.php'); | |
require_once(__DIR__ . '/SniffTestHelper.php'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use PHP_CodeSniffer\Files\LocalFile; | |
use PHP_CodeSniffer\Ruleset; | |
use PHP_CodeSniffer\Config; | |
class SniffTestHelper { | |
public function prepareLocalFileForSniffs($sniffFiles, string $fixtureFile): LocalFile { | |
$config = new Config(); | |
$ruleset = new Ruleset($config); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env php | |
<?php | |
$vendorBinDirectory = './vendor/bin'; | |
$helpMessage = "Shortcut to run commands in vendor/bin for Composer projects | |
Usage: cpx <command> | |
<command> must be an executable file in the vendor/bin directory. | |
Read about vendor binaries here: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Maybe { | |
private $value; | |
private $error; | |
private function __construct($value, $error) { | |
$this->value = $value; | |
$this->error = $error; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<ruleset name="PaytonsStandard"> | |
<description> | |
Originally from https://gist.github.com/Ovsyanka/e2ab2ff76e7c0d7e75a1e4213a03ff95 | |
PSR2 with changes: | |
- tabs instead of spaces (https://gist.github.com/gsherwood/9d22f634c57f990a7c64) | |
- bracers on end of line instead new line | |
- unused/undefined variable detection (https://github.com/sirbrillig/phpcs-variable-analysis) | |
</description> | |
<arg name="tab-width" value="4"/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/index.js b/index.js | |
index bd240d0..afa5674 100644 | |
--- a/index.js | |
+++ b/index.js | |
@@ -165,7 +165,7 @@ export default function request( options, fn ) { | |
if ( body && formData ) { | |
debug( 'API ignoring body because formData is set. They cannot both be used together.' ); | |
} | |
- if ( body && ! formData ) { | |
+ if ( body ) { |