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 November 8, 2024 16:46
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 December 22, 2024 05:22
Books I finished reading

Books I finished reading

in 2024

  • Hellblazer: Garth Ennis Omnibus - Garth Ennis, Steve Dillon, Will Simpson
  • Failing - Mike Brodie
  • How Infrastructure Works (Audiobook) - Deb Chachra
  • Both Flesh and Not - David Foster Wallace
  • The Human Target - Tom King, Greg Smallwood
  • 7 Against Chaos - Harlan Ellison, Paul Chadwick, Ken Steacy
  • Every Man For Himself and God Against All (Audiobook) - Werner Herzog
@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/*.