Skip to content

Instantly share code, notes, and snippets.

View paginate_links.php
View clearfix-hypo.scss
@media (min-width: $screen-sm-min) and (max-width: $screen-sm-max) {
.your-row-class > *:nth-child(3n+4) {
clear: left;
}
}
@cfxd
cfxd / .gitignore
Created Feb 22, 2016
GIT ignore for WP setup
View .gitignore
**/node_modules
**/node_modules/**
.DS_Store
config.codekit
*.log
.htaccess
# Ignore everything in the root except the "wp-content" directory.
@cfxd
cfxd / package.json
Created Feb 22, 2016
Knight Digital package.json starter
View package.json
{
"name": "knight_digital_starter",
"version": "1.0.0",
"author": "Knight Digital <info@knightdigital.se>",
"scripts": {
"autoprefixer": "postcss -u autoprefixer -r static/dist/css/*",
"scss": "node-sass --output-style compressed -o static/dist/css static/src/scss",
"lint": "eslint static/src/js",
"uglify": "mkdir -p static/dist/js && uglifyjs static/src/js/*.js -m -o static/dist/js/app.js && uglifyjs static/src/js/*.js -m -c -o static/dist/js/app.min.js",
"imagemin": "imagemin static/src/img static/dist/img -p",
View gist:f8e0e1d4559c8be1a8ae
--- wordpress-importer.php
+++ wordpress-importer_fix.php
@@ -63,7 +63,7 @@
var $url_remap = array();
var $featured_images = array();
- function WP_Import() { /* nothing */ }
+ public function __construct(){ /* nothing */ }
/**
View wordpress-importer.php
<?php
/*
Plugin Name: WordPress Importer
Plugin URI: http://wordpress.org/extend/plugins/wordpress-importer/
Description: Import posts, pages, comments, custom fields, categories, tags and more from a WordPress export file.
Author: wordpressdotorg
Author URI: http://wordpress.org/
Version: 0.6.1
Text Domain: wordpress-importer
License: GPL version 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
@cfxd
cfxd / gulp_module_installation
Last active Jan 29, 2019
Gulpfile and module installation for UnCSS + Gulp + Sage 8.3.0
View gulp_module_installation
$ npm install gulp-uncss gulp-exec --save-dev
View create_date_column_for_issues.php
<?php
function create_date_column_for_issues($issue_columns) {
$issue_columns['date'] = 'Date';
return $issue_columns;
}
add_filter('manage_edit-issue_columns', 'create_date_column_for_issues');
@cfxd
cfxd / sync
Last active Jul 15, 2018
Database sync Ansible playbook run with ansible-playbook sync.yml -i hosts/sync -e "src=development dest=staging site=cfx"
View sync
[development]
127.0.0.1 ansible_ssh_port=2222 ansible_ssh_private_key_file=/Users/cfx/Sites/trellis/.vagrant/machines/default/virtualbox/private_key
[staging]
my-staging.com
View gist:9ddbba4607ceec5a2a2e
1. $ brew install fontforge ttf2eot ttfautohint
2. $ brew tap bramstein/webfonttools && brew install sfnt2woff
3. Download/clone https://github.com/google/woff2 into any handy dir
cd into dir and:
$ git submodule init
$ git submodule update
$ make clean all
then:
You can’t perform that action at this time.