This file contains 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
#!/bin/bash | |
git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME $@ |
This file contains 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 | |
namespace modules\appmodule\controllers; | |
use Craft; | |
use craft\elements\Asset; | |
use craft\web\Controller; | |
use spicyweb\embeddedassets\Plugin as EmbeddedAssets; | |
use yii\web\Response; |
This file contains 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 | |
function extractCssFiles(array $manifest, string $manifestKey): array | |
{ | |
$entry = $manifest[$manifestKey] ?? null; | |
if (!$entry) { | |
return []; | |
} |
This file contains 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
$filteredBody = array_filter(Craft::$app->getRequest()->getBodyParams()); | |
Craft::$app->getRequest()->setBodyParams($filteredBody); |
This file contains 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
# Allow caching for anything but private | |
if (!beresp.http.cache-control ~ "(?i)private") { | |
unset beresp.http.set-cookie; | |
} |
This file contains 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 | |
// Type juggle keys as string or array | |
// ------------------------------------- | |
public function getFoo(mixed $keyOrKeys) | |
{ | |
} | |
// Variable args |
This file contains 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
import {hot} from 'react-hot-loader/root'; | |
import React, {useState} from 'react'; | |
import Uppy from '@uppy/core'; | |
import XHRUpload from '@uppy/xhr-upload'; | |
import {DragDrop, StatusBar, ProgressBar} from '@uppy/react'; | |
import '@uppy/core/dist/style.css'; | |
import '@uppy/status-bar/dist/style.css'; | |
import '@uppy/progress-bar/dist/style.css'; | |
import '@uppy/drag-drop/dist/style.css'; | |
import {ReactSortable} from 'react-sortablejs'; |
This file contains 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 | |
namespace modules\appmodule\transformers; | |
use craft\base\ElementInterface; | |
use League\Fractal\TransformerAbstract; | |
use modules\appmodule\AppModule; | |
use Tightenco\Collect\Support\Collection; | |
class ElementTransformer extends TransformerAbstract |
This file contains 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
/* See: node_modules/@tailwindcss/typography/dist/typography.css */ | |
@layer components { | |
@responsive { | |
.prose { | |
color: theme("colors.gray.copy"); | |
max-width: 65ch; | |
} | |
.prose [class~="lead"] { | |
color: theme("colors.gray.copy"); |
This file contains 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
const defaultTheme = require('tailwindcss/defaultTheme') | |
const prefixedColors = Object.fromEntries(Object.entries(defaultTheme.colors).map(([k, v]) => [`tw-${k}`, v])); | |
module.exports = { | |
theme: { | |
extend: { | |
colors: { | |
...prefixedColors, | |
red: '#ff0000', | |
// your colors here… |