Skip to content

Instantly share code, notes, and snippets.

class cfd_user {
protected $profile_fields = array(
'user_login' => null,
'user_nicename' => null,
'user_url' => null,
'user_email' => null,
'display_name' => null,
'nickname' => null,
'first_name' => null,
'last_name' => null,
@dana-ross
dana-ross / setup-new-mac.sh
Last active September 10, 2016 00:45
Re-create my dev environment if my laptop fails
#!/bin/bash
# (not really -- run these commands by hand & pay attention to the comments)
# Homebrew: The missing package manager for OS X
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
# Fish: Finally, a command line shell for the 90s
brew install fish
# Git
@thenbrent
thenbrent / debug_backtrace.php
Last active September 14, 2016 15:07
PHP Stacktrace to `error_log()` using `debug_backtrace()`.
<?php
foreach ( debug_backtrace() as $key => $value ) {
$function = @$value['function'];
if( isset( $value['class'] ) )
$function = $value['class'] . '::' . $function;
//error_log( "** " . $key . ". " . $function . "( " . str_replace( array("\n","\t",' ','(',')'), '', print_r( $value['args'], true ) ) . " )" );
@BronsonQuick
BronsonQuick / lotsa_extensions.yaml
Last active May 7, 2020 00:49
All The Chassis extensions for testing updates.
extensions:
- chassis/tester
- chassis/mailhog
- chassis/xdebug
- chassis/nodejs
- chassis/fish
- chassis/gulp
- chassis/grunt
- chassis/imagick
- chassis/gmagick
@rafibomb
rafibomb / gist:f08ed757b04a782aa5ea
Last active July 19, 2021 02:23
Foundation Mega-menu html
<!doctype html>
<html class="no-js" lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Foundation Mega Menu</title>
<link rel="stylesheet" href="css/app.css" />
<link href="http://cdnjs.cloudflare.com/ajax/libs/foundicons/3.0.0/foundation-icons.css" rel="stylesheet">
<script src="bower_components/modernizr/modernizr.js"></script>
</head>
@nickawalsh
nickawalsh / icons.sass
Last active October 7, 2021 09:38
Auto Hi-res Sprites
@import compass
$icons: sprite-map("icons/*.png")
$icons-hd: sprite-map("icons-hd/*.png")
i
background: $icons
display: inline-block
@media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi)
background: $icons-hd
@Rarst
Rarst / deprecated.md
Last active February 21, 2023 11:21
WordPress coding standards configuration for PhpStorm

Now Native

PhpStorm now bundles WordPress coding style natively, starting from version 8.

  1. Go to Project Settings > Code Style > PHP.
  2. Select Set From... (top right of window) > Predefined Style > WordPress.

No longer need to muck with this import! :)

@boogah
boogah / .htaccess
Created February 16, 2012 04:59
Expire headers .htaccess code.
<IfModule mod_expires.c>
ExpiresActive on
# Perhaps better to whitelist expires rules? Perhaps.
ExpiresDefault "access plus 1 month"
# Data
ExpiresByType text/xml "access plus 0 seconds"
ExpiresByType application/xml "access plus 0 seconds"
ExpiresByType application/json "access plus 0 seconds"
@johnbillion
johnbillion / wp_mail.md
Last active January 27, 2024 14:06
WordPress Emails

WordPress Emails

This document lists all the situations where WordPress sends an email, along with how to filter or disable each email.

This documentation has moved here: https://github.com/johnbillion/wp_mail

@necolas
necolas / README.md
Last active March 28, 2024 20:34
Experimenting with component-based HTML/CSS naming and patterns

NOTE I now use the conventions detailed in the SUIT framework

Template Components

Used to provide structural templates.

Pattern

t-template-name