Skip to content

Instantly share code, notes, and snippets.

Taking inspiration from tailwindcss and this idea, here is a specification for how to achieve it.

What is it

With TailwindCSS you have an amazing default design system, but it is not ideal. It lacks:

  • Validation of classnames: It does not validate the classnames you insert
  • Composition: It does not allow you to effectively compose together classnames into new classnames and it can not dynamically do so at runtime effectively
  • Defining by variables: Even though it is nice to write TailwindCSS inline with your elements, you can not define classes as variables, because the TailwindCSS extension does not understand it

This solution solves all of this with an even better experience of setup and consumption!

@Baldinof
Baldinof / .dockerignore
Last active February 13, 2024 22:52
Single PHP FPM container with Caddy
/vendor
/docker
/Dockerfile
@GMKBabu
GMKBabu / aws-ssm-ec2-proxy-command.sh
Created December 4, 2019 05:33
AWS SSM SSH Proxy Command
#!/usr/bin/env sh
set -eu -o pipefail
######## Usage #################################################################
#
# #1 Install the AWS CLI
# https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-install.html
#
# #2 Install the Session Manager Plugin for the AWS CLI
# https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-working-with-install-plugin.html
@donaldpipowitch
donaldpipowitch / README.md
Last active January 12, 2024 04:07
Use GitLab Pages to deploy a Storybook per branch

It's quite straightforward to use GitLab Pages to deploy a Storybook instance per branch (and remove it whenever the branch will be removed). And yeah, it's irony to document this in a GitHub Gist 😅

You just need a .gitlab-ci.yml like this one:

stages:
  - setup
  - build-and-test
  - deployment
  - pages
@maxboeck
maxboeck / donottrack.js
Last active November 6, 2023 10:00
Check "Do Not Track" Client Hint
const allowsTracking = () => {
const dnt =
window.doNotTrack ||
navigator.doNotTrack ||
navigator.msDoNotTrack
if (dnt === 1 || dnt === '1' || dnt === 'yes') {
return false
}
if ('msTrackingProtectionEnabled' in window.external) {
return !window.external.msTrackingProtectionEnabled()
@MWDelaney
MWDelaney / facetwp.php
Last active March 12, 2019 17:38
Rewrite the HTML output of radio buttons into a Bootstrap dropdown
<?php
// Adjust FacetWP "Radio" HTML output to be friendlier with our theme
add_filter('facetwp_facet_html', function ($output, $params) {
// Check that this facet is a "radio" type facet before proceeding.
if ('radio' == $params['facet']['type']) {
// Initialize our variables
$output = '';
@bikubi
bikubi / README.md
Created March 1, 2019 12:39
Simple Purgecss setup for Roots Sage WordPress starter theme

Why

  1. Sage doesn't come with Purgecss (or uncss, etc.)
  2. Say, we use Bulma -- suddenly dist/main.css grows by 400K!
  3. Let's purge it!
  4. Oh dang, we need to whitelist /\.wp-/, /\.post-type/, /myfancylightbox/...
  5. Wait we are whitelisting pretty much everything from /resource/assets/styles!
  6. Isn't there an option to purge /node_modules/**/* only?
  7. Nope.
  8. purgecss start ignore, strategically placed, to the rescue!
@laggardkernel
laggardkernel / startup-time-of-zsh.md
Last active March 27, 2024 14:10
Comparison of ZSH frameworks and plugin managers

Comparison of ZSH frameworks and plugin managers

Changelog

  • update 1: add a FAQ section
  • update 2: benchmark chart and feature comparison table
  • update 3:
    • improve the table with missing features for antigen
    • new zplg times result

TLDR

@EvanHerman
EvanHerman / config.yml
Last active December 3, 2021 02:56
WordPress Plugin CircleCI 2.0 Config - PHPCS, PHPUnit and rsync Deployment
workflows:
version: 2
main:
jobs:
- php56-build
- php70-build
- php71-build
- php72-build
- deploy:
requires: