Skip to content

Instantly share code, notes, and snippets.

View apmeyer's full-sized avatar

apmeyer apmeyer

View GitHub Profile
@xnau
xnau / wp-locale-conversion-array.php
Created February 1, 2019 19:56
Conversion array for WordPress locale codes and standard language codes and names
<?php
$wp_locale_conversion = array(
'af' => array(
'name' => 'Afrikaans',
'code' => 'af',
'wp_locale' => 'af'
) ,
'ak' => array(
'name' => 'Akan',
'code' => 'ak',
@MaximeCulea
MaximeCulea / wp-cli-ms-cheatset.php
Last active July 17, 2024 01:22
A list of WordPress WP Cli commands when into Multisite usage.
#!/usr/bin/env bash
# Related to WP CLI as single site, check following link
# @see https://gist.github.com/MaximeCulea/dbd5835a01d2b4e6a6544919db3f26a0
# All wp cli comands will be declared both (as much as possible) :
# - with xargs (not all servers support xargs)
# - more native shell syntax "for in"
# WP Crons MS
@jdevalk
jdevalk / logging-helper.php
Last active December 9, 2021 16:25
This little hack enables fatal error logging for your site, without creating an error log that is insanely big.
<?php
/**
* This changes logging to only log fatal errors. This file should go in your mu-plugins directory.
*/
// Set the error logging to only log fatal errors
error_reporting( E_ERROR );
// Optional: change the location of your error log, it might be wise to put it outside your WP content dir.
// If you don't change it, the default place for this log is debug.log in your WP_CONTENT_DIR.
@salcode
salcode / .gitignore
Last active July 10, 2024 14:28
Please see https://salferrarello.com/wordpress-gitignore/ for the canonical version of this WordPress .gitignore file. Note: I do not receive notifications for comments here (because GitHub does not send notifications on Gists)
# -----------------------------------------------------------------
# .gitignore for WordPress @salcode
# ver 20180808
#
# From the root of your project run
# curl -O https://gist.githubusercontent.com/salcode/b515f520d3f8207ecd04/raw/.gitignore
# to download this file
#
# By default all files are ignored. You'll need to whitelist
# any mu-plugins, plugins, or themes you want to include in the repo.
@trslater
trslater / custom-registration.php
Last active May 12, 2020 13:47
Custom Registration Plugin
<?php
/*
Plugin Name: Custom Registration
Description: Updates user rating based on number of posts.
Version: 1.1
Author: Tristan Slater w/ Agbonghama Collins
Author URI: http://kanso.ca
*/
@bradfrost
bradfrost / gist:c90ef0c63fdc38ad4512
Last active August 1, 2022 00:54
Atomic Design Book Original Outline

Atomic Design discusses the importance of crafting robust design systems, and introduces a methodology for which to create smart, deliberate, interface systems.

The book will begin by addressing the "why": why designers should care about thinking about Web interfaces in a more systematic way. I'll discuss the history of modular designsystems (after all, this type of thinking been around for a long while now), but discuss how the ever-shifting Web landscape is making systematic thinking a necessity. 

The first section will also discuss the emerging trends and techniques that encourage more systematic thinking: style tiles, element collages, pattern libraries, UI frameworks, and more. And while I'll certainly extol the virtues of these techniques, I'll also bring to light a lot of the shortcomings and frustrations of UI frameworks and pattern libraries. This sets the stage to introduce a more sound, deliberate way of constructing an interface system.

The second chapter will define atomic design. Atomic desig

@tonymtz
tonymtz / gist:d75101d9bdf764c890ef
Last active July 26, 2024 20:17
Uninstall nodejs from OSX Yosemite
# first:
lsbom -f -l -s -pf /var/db/receipts/org.nodejs.pkg.bom | while read f; do sudo rm /usr/local/${f}; done
sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.*
# To recap, the best way (I've found) to completely uninstall node + npm is to do the following:
# go to /usr/local/lib and delete any node and node_modules
cd /usr/local/lib
sudo rm -rf node*
@salcode
salcode / .gitignore
Last active February 10, 2024 10:56
See https://salferrarello.com/wordpress-gitignore/ for the latest version of my WordPress .gitignore file
# -----------------------------------------------------------------
# .gitignore for WordPress
# Bare Minimum Git
# http://ironco.de/bare-minimum-git/
# ver 20150227
#
# This file is tailored for a WordPress project
# using the default directory structure
#
# This file specifies intentionally untracked files to ignore
@rcarver
rcarver / Typekit-Font-Events.md
Created May 14, 2010 22:02
Typekit Font Events

Typekit Font Events

UPDATE: Typekit Font Events have been opensourced as WebFont Loader. Typekit's available events will be updated soon with full support for the WebFont Loader API.


Web fonts may be the best thing to happen to web design in years, but that doesn't mean there aren't some tricky issues to overcome. One of the most annoying things is dealing with what's become known as the FOUT or 'Flash of