Skip to content

Instantly share code, notes, and snippets.

View benfurfie's full-sized avatar

Ben Furfie benfurfie

  • Netnak
  • Oxton, Greater Liverpool, UK
View GitHub Profile
@benfurfie
benfurfie / developmentsetup.md
Created December 29, 2019 07:56
New Mac Setup for Web Development
@benfurfie
benfurfie / statamic-3-cheatsheet.md
Last active December 4, 2022 23:08
Statamic 3 Cheatsheet

Statamic 3 Cheatsheet

Antlers

Laravel Mix

To make use of Laravel Mix's versioning functionality in Statamic 3, all you need to do is call the mix tag, and pass in a parameter of src='path/to.css'. For example, let's say your css file is in public/css/app.css, you'd add the following into your antlers file:

<link rel="stylesheet" href="{{ mix src='css/app.css' }}">

@benfurfie
benfurfie / statamic-v2-cheatsheet.md
Last active October 3, 2019 14:16
Statamic v2 Cheatsheet

Statamic v2 Cheatsheet

Security

Session Cookies

In WordPress (and other PHP CMSs), to secure session cookies, you would apply the following to your wp-config.php file.

@ini_set('session.cookie_httponly', true);
@benfurfie
benfurfie / laravel-cheatsheet.md
Last active December 4, 2022 23:06
Laravel Cheatsheet

Laravel Cheatsheet

Artisan

Making a model with a controller, migration, as a resource

php artisan make:model Name -mcr

Factories

@benfurfie
benfurfie / wordpress-cheatsheet.md
Created October 2, 2019 08:25
WordPress Cheatsheet

WordPress Cheatsheet

CPTs

Hiding entries from view

Sometimes you want to have a CPT, but not have single post entries for each item, such as a slider, which queries entries to build up an array of items.

@benfurfie
benfurfie / adonis-cheatsheet.md
Last active December 15, 2022 09:27
Adonis JS Cheatsheet

Adonis Framework Cheatsheet

Commands

Create a model, controller and migration from the command line

adonis make:model Model -mc

Lucid

@benfurfie
benfurfie / tailwind.config.js
Created July 17, 2019 20:27
Tailwind Default Config
module.exports = {
prefix: '',
important: false,
separator: ':',
theme: {
screens: {
sm: '640px',
md: '768px',
lg: '1024px',
xl: '1280px',
<?php
public function pluck($value, $params, $context)
{
if (!is_array($value)) {
return $value;
}
return array_pluck($value, $params[0]);
}
{
"devDependencies": {
"laravel-mix": "^4.0.15",
"tailwindcss": "^1.0.1",
"vue-template-compiler": "^2.6.10"
},
"scripts": {
"dev": "yarn run development",
"development": "NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "yarn run development --watch",
^[0-9A-Za-zÀÁÂÃÄÅÇÈÉÊËÌÍÎÏÑÒÓÔÕÖÙÚÛÜÝàáâãäåçèéêëìíîïñðòóôõöùúûüýÿ\s\-\–]*$