- Download getcomposer.org/composer.phar to your account's home directory —
/home/username
. - Edit
.bashrc
file in same directory by addingalias composer='/usr/local/php56/bin/php-cli ~/composer.phar'
line. Updatephp56
part to current relevant version, if necessary. - Restart SSH session or run
source ~/.bashrc
to reload config. - Use
composer
command!
#!/usr/bin/env ruby | |
# | |
# CLI tool for locating and removing a Homebrew installation | |
# It replaces the official uninstaller, which is insufficient and often breaks | |
# If files were removed, the script returns 0; otherwise it returns 1 | |
# | |
# http://brew.sh/ | |
# | |
# Copyright (C) 2025 Stephen C. Benner | |
# |
# Find the largest tables in your MySQL database | |
SELECT | |
table_name as "Table", | |
table_rows as "Rows", | |
data_length as "Length", | |
index_length as "Index", | |
round(((data_length + index_length) / 1024 / 1024),2) as "Size (mb)" | |
FROM information_schema.TABLES | |
WHERE table_schema = "%%YOURDATABASE%%" | |
ORDER BY `Size (mb)` DESC |
# .gitignore file for WordPress that ignores everything except: | |
# | |
# - .gitignore | |
# - favicon.ico | |
# - wp-config.php | |
# - everything in mu-plugins | |
# - my-plugin | |
# - my-theme (except for .sass-cache) | |
# | |
# based on https://gist.github.com/jdbartlett/444295 |
This entire guide is based on an old version of Homebrew/Node and no longer applies. It was only ever intended to fix a specific error message which has since been fixed. I've kept it here for historical purposes, but it should no longer be used. Homebrew maintainers have fixed things and the options mentioned don't exist and won't work.
I still believe it is better to manually install npm separately since having a generic package manager maintain another package manager is a bad idea, but the instructions below don't explain how to do that.
Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.
<?php | |
/** | |
* Sort a multi-domensional array of objects by key value | |
* Usage: usort($array, arrSortObjsByKey('VALUE_TO_SORT_BY')); | |
* Expects an array of objects. | |
* | |
* @param String $key The name of the parameter to sort by | |
* @param String $order the sort order | |
* @return A function to compare using usort | |
*/ |
/*! | |
* gulp | |
* $ npm install gulp-ruby-sass gulp-autoprefixer gulp-cssnano gulp-jshint gulp-concat gulp-uglify gulp-imagemin gulp-notify gulp-rename gulp-livereload gulp-cache del --save-dev | |
*/ | |
// Load plugins | |
var gulp = require('gulp'), | |
sass = require('gulp-ruby-sass'), | |
autoprefixer = require('gulp-autoprefixer'), | |
cssnano = require('gulp-cssnano'), |
Create the repository on GitHub/Bitbucket. Once created, clone the created repository to your local machine using:
git clone [email protected]:username/repository.git
CD into the repository folder and run the init command to enable to hub flow tools:
cd repo_name
This is no longer a bug. I'm keeping the gist for historical reasons, as it helped to get it fixed. Make sure to read the notes by the end of the post.
- Set
-moz-appearance
tonone
. This will "reset" the styling of the element; - Set
text-indent
to0.01px
. This will "push" the text a tiny bit[1] to the right;
This post outlines a way to use Sass, Compass, and Grunt to maintain stylesheets for a WordPress parent and child theme.
Sass is useful for many reasons, but for our purposes, the two most helpful features are partials and variables. We'll also take advantage of the importPath
setting of Compass and Grunt.
Comments and improvements are always welcome.
Create a new Compass project in your theme and style away. When you're finished, your theme directory (called parent
here) might look something like this: