Skip to content

Instantly share code, notes, and snippets.

module.exports = {
root: false,
parser: "@typescript-eslint/parser", // Specifies the ESLint parser
parserOptions: {
tsconfigRootDir: __dirname,
ecmaVersion: 2020, // Allows for the parsing of modern ECMAScript features
sourceType: "module", // Allows for the use of imports
project: "./tsconfig.json",
ecmaFeatures: {
impliedStrict: true,
module.exports = {
semi: false,
arrowParens: "avoid",
singleQuote: false,
printWidth: 120,
useTabs: true,
trailingComma: "all",
}
@justb3a
justb3a / sys_file_reference.php
Created August 9, 2017 15:09
TYPO3 8 "responsive" Images
<?php
defined('TYPO3_MODE') or die();
// typo3conf/ext/extname/Configuration/TCA/Overrides/sys_file_reference.php
// different "viewports" for picture element (art direction)
$GLOBALS['TCA']['sys_file_reference']['columns']['crop']['config'] = array(
'type' => 'imageManipulation',
// 'allowedExtensions' => 'jpg',
// 'ratios' => array(
@justb3a
justb3a / template.php
Created November 25, 2016 08:10
ProcessWire SimpleContactForm Overwrite Markup/Classes
<?php
// @see: https://github.com/justb3a/processwire-newslettersubscription/tree/master#how-to-overwrite-classes-and-markup
// @see: https://github.com/ryancramerdesign/ProcessWire/blob/master/wire/core/InputfieldWrapper.php#L34
$scf = $modules->get('SimpleContactForm');
$options = array(
'markup' => array(
'list' => "<div {attrs}>{out}</div>",
@justb3a
justb3a / _decimal.scss
Last active June 16, 2016 07:49 — forked from terkel/_decimal.scss
Rounding decimals in Sass
// _decimal.scss | MIT License | gist.github.com/terkel/4373420
// Round a number to specified digits.
//
// @param {Number} $number A number to round
// @param {Number} [$digits:0] Digits to output
// @param {String} [$mode:round] (round|ceil|floor) How to round a number
// @return {Number} A rounded number
// @example
// decimal-round(0.333) => 0
@justb3a
justb3a / _sprite.scss
Created June 14, 2016 12:33
frickelbase
// a mixin for positioning svg icons
// ======================================================================
// usage examples:
//
// @include sprite; ==> width: 1em; height: 1em;
// @include sprite(18px, 50px, $color-second); => width: 18px; height: 50px; fill: $color-second;
// @include sprite(1, 2, none, $color-second, 2px); width: $base-unit; height: $base-double; stroke: $color-second; stroke-width: 2px;
@mixin sprite($width: 1em, $height: 1em, $fill: none, $stroke: none, $stroke-width: none) {
width: parse-unit($width);
@justb3a
justb3a / InputfieldFile.php
Last active May 18, 2017 09:00
processwire
<?php
// build form
$form = wire('modules')->get('InputfieldForm');
$form->action = './';
$form->method = 'post';
$form->attr('enctype', 'multipart/form-data');
$field = wire('modules')->get('InputfieldFile');
$field->extensions = 'xml';
@justb3a
justb3a / nginx conf
Last active February 6, 2018 14:14
nginx
# redirects
server {
listen 80; # 443
# ssl
root /xxx/public;
server_name domain.org;