Skip to content

Instantly share code, notes, and snippets.

@maxfenton
maxfenton / postcss.config.js
Created May 1, 2023 19:15
PostCSS config for a legacy SASS project
module.exports = {
parser: "postcss-scss",
plugins: [
require("postcss-easy-import")({ // Enables globs in @import. See style.css.
prefix: false,
skipDuplicates: false,
warnOnEmpty: false,
}),
require("postcss-advanced-variables"), // Sass-style @ vars, looping, and @import
require("postcss-custom-media"), // Custom reusable media queries
@maxfenton
maxfenton / Twig - Craft.xml
Last active May 1, 2023 15:50
PhpStorm live template for CraftCMS / Twig development
<templateSet group="Twig - Craft">
<template name="tag" value="{% tag '$END$' with {} %}&#10;&#9;&#10;{% endtag %}" description="{% tag %}...{% endtag %}" toReformat="false" toShortenFQNames="true">
<context>
<option name="Twig" value="true" />
</context>
</template>
</templateSet>
@maxfenton
maxfenton / uses.md
Last active September 23, 2023 21:07
Uses

/uses

a document about the tools I use to do my work as a web developer

Software

First of all

title type
oh-my-zsh terminal flavor
@maxfenton
maxfenton / cloudSettings
Last active June 28, 2020 00:50
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-06-28T00:50:14.414Z","extensionVersion":"v3.4.3"}
@maxfenton
maxfenton / routing.config.php
Created April 16, 2016 15:45
coordinate.systems custom kirby routing
<?php
/*
---------------------------------------
Custom Routes
---------------------------------------
*/
@maxfenton
maxfenton / set-project-perms.sh
Created March 28, 2016 22:53 — forked from khalwat/set-project-perms.sh
Properly set permissions for a Craft CMS install, including ensuring that files are all g-x. Set CHOWN_USER, CHOWN_GROUP, and BASE_DIR to whatever is appropriate, add directories that need to be writeable by the web server to DIRS[], then execute: ./set-project-perms.sh PROJECT_NAME
#!/bin/bash
# Execute via: ./set-project-perms.sh PROJECT_NAME
# The paradigm is the entire project dir is owned by $CHOWN_USER with the group set to $CHOWN_GROUP
# $CHOWN_USER is an admin or user account that is used to edit files/templates, etc.
# $CHOWN_GROUP is the group of the webserver (e.g.: 'apache', 'nginx', 'httpd', etc.)
# The project dir permissions are set to 755 (-rwxr-xr-x) for directories and to 644 (-rw-r--r--) for files
# The permissions to $DIRS[] that need to be writeable are set to 775 (-rwxrwxr-x) for directories and
# 664 (-rw-rw-r--) for files. Add any assets directories, etc. as necessary.
# Change $BASE_DIR to the absolute path where your websites are stored (leaving it appended with '/$1')
@maxfenton
maxfenton / books.md
Last active April 24, 2024 22:23
Books I finished reading

Books I finished reading

in 2024

  • Kitchen Confidential (Audiobook) - Anthony Bourdain
  • Kitchen Confidential (Audiobook) - Anthony Bourdain
  • The Hulk: Grand Design - Jim Rugg

in 2023

  • The Human Target - Tom King, Greg Smallwood
  • Ways of Being (Audiobook) - James Bridle
@maxfenton
maxfenton / add_custom_column_to_edit_tag.php
Last active December 7, 2023 18:59 — forked from simongcc/add_custom_column_to_edit_tag.php
Adding custom column displaying in Wordpress Manage Category/Custom Taxonomy editing page
/*
Purpose: add custom column header and custom column content to respective custom header in Manage Category Editing Page
Version Tested: 3.8
Story:
Because I found no explanation nor documents in Wordpress.org, I tried to trace the code in wp-admin folder
after understanding the operation of apply_filter(), add_action() and add_filter()
Logic:
The table list in edit_tag.php is based on
@maxfenton
maxfenton / 20150719.txt
Created July 20, 2015 01:30
pmset -g custom
Battery Power:
lidwake 1
autopoweroff 1
autopoweroffdelay 14400
standbydelay 900
standby 1
ttyskeepawake 1
hibernatemode 25
darkwakes 0
hibernatefile /var/vm/sleepimage
@maxfenton
maxfenton / instructions.md
Last active August 29, 2015 14:25 — forked from tealtan/instructions.md
Custom CSS for twitter-in-a-browser.

Custom Twitter Stylesheet

Craig Mod does a bigger overhaul with Twitter for Minimalists, but this will only do the following:

  • Hides promoted tweets and trends
  • Hides the useless “Expand” link that appears under every tweet
  • Tones down the blue conversation line to a barely-visible gray
  • Hides all numbers

You can add this CSS in Safari with this extension. The URL to target is twitter.com/*.