Skip to content

Instantly share code, notes, and snippets.

View Garbee's full-sized avatar

Jonathan Garbee Garbee

View GitHub Profile
{% include 'elements.input' with {
label: 'Name',
name: 'name',
inputAttributes: {
required: null,
value: nameValue
}
} only %}
diff --git a/services/terminal.js b/services/terminal.js
index 742b553..e13242f 100644
--- a/services/terminal.js
+++ b/services/terminal.js
@@ -12,7 +12,15 @@ function Terminal(notify)
Terminal.prototype = {
init: function(params)
{
- this._term = pty.spawn(process.platform === "win32" ? "cmd.exe" : "bash", [], {
+ let shell = "";
<?php
namespace App\Composers\Partials\Admin\Addresses;
use App\Address;
use App\Composers\Composer;
use Illuminate\Contracts\View\View;
use Illuminate\Http\Request;
class Form implements Composer
return !$('.onephone:eq(0)').is(':empty') && !$('.onephone:eq(1)').is(':empty');
//equals
const items = document.querySelectorAll('.onephone');
return !items[0].childNodes.length > 0 && ! items[1].childNodes.length > 0;
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class Contact extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
/**
* Verify a timeout value is under 30 minutes.
*/
function verifyTimeout(timeout) {
if (timeout > 1.8e+6) {
throw new Error('Timeouts must be under 30 minutes');
}
return timeout;
}
const path = require("path");
const webpack = require('webpack');
function makeBundle({ outputPath, projectPath, watch = false }) {
const webpackConfig = require(path.resolve(projectPath, "webpack.config.js"));
return new Promise((resolve, reject) => {
const webpackCompiler = webpack(webpackConfig);
const postRun = (error, stats) => {
func add(Collection<Number> $numbers): Number {
return $numbers.reduce(func (undefined|Object $carry, Number $number): Number {
if ($carry is not defined) {
$carry = new Number(0)
}
return $carry.add($number)
});
<?php
/*
* Generate a CSS file of pure junk.
* With <3 from Garbee
* No good use for this besides testing. Get over it.
*/
$css = '';
<?php
return PhpCsFixer\Config::create()
->setRiskyAllowed(true)
->setRules([
'@PSR2' => true,
'array_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => [
'align_double_arrow' => true,
'align_equals' => true,