Skip to content

Instantly share code, notes, and snippets.

"require": {
"wp-coding-standards/wpcs": "^0.14.0",
}
composer require wp-coding-standards/wpcs
"require-dev": {
"squizlabs/php_codesniffer": "^3.0.2"
}
@charset "UTF-8";select,textarea{line-height:1.75}dl,ol,p,pre,ul{margin-bottom:1rem}.btn-outline.is-disabled,.btn-outline:disabled,.btn-primary.is-disabled,.btn-primary:disabled,.muted{opacity:.5}.bold,.btn,th{font-weight:700}.left-align,th{text-align:left}.nowrap,.truncate{white-space:nowrap}.fit,.truncate,img,table{max-width:100%}*,.border-box,.col,.col-right,.login-chooser-item,:after,:before,select{box-sizing:border-box}.admin-user-controls-select select,.btn,.progress,.range-light{-webkit-appearance:none}.button,.ladda-button.button-large,.ladda-button.button-medium,.ladda-button.button-small,a.button,a.ladda-button.button-large,a.ladda-button.button-medium,a.ladda-button.button-small,button{border-radius:2px}.primary{color:#626c87}.secondary{color:#c6cad6}.tertiary{color:#F2EB80}body{margin:0;line-height:1.5;color:#111;background-color:#fff}svg{max-height:100%}fieldset,input,select,textarea{font-family:inherit;font-size:1rem;box-sizing:border-box;margin-top:0;margin-bottom:0}label{vertical-align:middle}
@urre
urre / settings.json
Last active November 21, 2017 15:56
My Current VS Code User Settings
{
"editor.fontSize": 16,
"editor.fontFamily": "'SF Mono', Menlo, Monaco, 'Courier New', monospace",
"editor.fontWeight": "300",
"search.exclude": {
"**/.git": true,
"node_modules": true,
"tmp/**": true,
"assets/rev/": true,
"assets/build/": true,
@urre
urre / gist:3319920e694b821a2ad0e5a361fdbe4d
Created August 28, 2017 10:33
Laravel Mix with Stylelint and Browsersync
let mix = require('laravel-mix');
let StyleLintPlugin = require('stylelint-webpack-plugin');
mix.webpackConfig({
plugins: [
new StyleLintPlugin({
files: './assets/sass/**/*.scss',
configFile: './.stylelintrc'
}),
]
@font-face {
font-family: octicons-link;
src: url(data:font/woff;charset=utf-8;base64,d09GRgABAAAAAAZwABAAAAAACFQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABEU0lHAAAGaAAAAAgAAAAIAAAAAUdTVUIAAAZcAAAACgAAAAoAAQAAT1MvMgAAAyQAAABJAAAAYFYEU3RjbWFwAAADcAAAAEUAAACAAJThvmN2dCAAAATkAAAABAAAAAQAAAAAZnBnbQAAA7gAAACyAAABCUM+8IhnYXNwAAAGTAAAABAAAAAQABoAI2dseWYAAAFsAAABPAAAAZwcEq9taGVhZAAAAsgAAAA0AAAANgh4a91oaGVhAAADCAAAABoAAAAkCA8DRGhtdHgAAAL8AAAADAAAAAwGAACfbG9jYQAAAsAAAAAIAAAACABiATBtYXhwAAACqAAAABgAAAAgAA8ASm5hbWUAAAToAAABQgAAAlXu73sOcG9zdAAABiwAAAAeAAAAME3QpOBwcmVwAAAEbAAAAHYAAAB/aFGpk3jaTY6xa8JAGMW/O62BDi0tJLYQincXEypYIiGJjSgHniQ6umTsUEyLm5BV6NDBP8Tpts6F0v+k/0an2i+itHDw3v2+9+DBKTzsJNnWJNTgHEy4BgG3EMI9DCEDOGEXzDADU5hBKMIgNPZqoD3SilVaXZCER3/I7AtxEJLtzzuZfI+VVkprxTlXShWKb3TBecG11rwoNlmmn1P2WYcJczl32etSpKnziC7lQyWe1smVPy/Lt7Kc+0vWY/gAgIIEqAN9we0pwKXreiMasxvabDQMM4riO+qxM2ogwDGOZTXxwxDiycQIcoYFBLj5K3EIaSctAq2kTYiw+ymhce7vwM9jSqO8JyVd5RH9gyTt2+J/yUmYlIR0s04n6+7Vm1ozezUeLEaUjhaDSuXHwVRgvLJn1tQ7xiuVv/ocTRF42mNgZGBgYGbwZOBiAAFGJBIMAA
@urre
urre / shipitfile.js
Last active September 13, 2017 07:40
Deploy a Bedrock based WordPress site using Shipit.js via Codeship CI/CD to a Cloudways server
const path = require('path');
require('dotenv').config();
const deployPath = '/home/master/applications/xxxxxxxxx/public_html';
module.exports = function (shipit) {
require('shipit-deploy')(shipit);
shipit.initConfig({
default: {
workspace: '/tmp/reponame',
@urre
urre / webpack-exract-text-plugin-autoprefixer.js
Last active December 13, 2016 18:35
Using Autoprefixer with ExtractTextPlugin with Webpack
const path = require('path');
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const autoprefixer = require('autoprefixer');
const postcssImport = require('postcss-import');
const postcssUrl = require('postcss-url');
module.exports = {
devtool: 'source-map',
@urre
urre / featuredimage.php
Last active November 28, 2017 02:27
Display featured image with alt
<?php
/**
* Show post thumbnail width alt
*
* @author Urban Sanden <urban@sprintworks.se>
* @param type|string $size Size like 'full', 'large', 'medium', 'thumbnail'.
* @param type|object $post Post object.
* @param type|string $fallbacksize_x Fallback image size x.
* @param type|string $fallbacksize_y Fallback image size y.