This file will setup Wordpress, MySQL & PHPMyAdmin with a single command. Add the code below to a file called "docker-compose.yaml" and run the command
$ docker-compose up -d
# To Tear Down
$ docker-compose down --volumes
// # PugJs Cheat Sheet | |
// ## Syntax | |
doctype html | |
html | |
head | |
meta(name="Pugcupid", content="Wiggle with love") | |
body | |
main#page |
Know your element (__
) from your modifier (--
). Both blocks and elements can have modifiers. (.b--m
, .b__e--m
).
In react lingo, BEM's "B" (for "Block") is a component.
Elements can nest deep in html, but the selector doesn't represent this deep nesting. (no .a__b__c
, instead just .a__c
- which can be in .a__b
).
The idea
The idea with BEM is to keep a flat hierarchy (don't nest selectors) with simple selectors - only one class per selector, and no IDs or element tags. By not nesting we have a low and consistent specificity of all html elements, which makes it possible to have modifications of styles without using !important
.
<?php | |
/** | |
* WordPress Query Comprehensive Reference | |
* Compiled by luetkemj - luetkemj.com | |
* | |
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query | |
* Source: http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/query.php | |
*/ | |
$args = array( |
cat
: concatenate files and print on the standard output
cat > a.txt
: start a file creationcat a.txt
: show file contentcat a.txt b.txt
: show files content respectivelycat a.txt b.txt > c.txt
: create a file which contains a.txt and b.txtchmod
: change file mode bits
chmod +x a.txt
: All users and groups have the execute permissionchmod $u$g$o a.txt
: Give specific user permission
See Homebrew - Basics Commands and Cheatsheet https://dev.to/code2bits/homebrew---basics--cheatsheet-3a3n
Servicess
This is a bash shell scripting which can be found on Unix, Linux and Mac. You can install bash on the Linux subsystem on Windows too.
the first line is #! /bin/bash
because the bash program is in /bin/bash, you can know the path where the bash is by this command which bash
You can useecho Hello, World!
or echo "Hello, world!"
fiddle for margins and paddings on the parent and child elements
http://jsfiddle.net/7XD8s/ padding:5px; /* this on the parent / margin:5px; / and that on the child, will result in a 10px gap */
// Register Custom Post Type | |
function slider() { | |
$labels = array( | |
'name' => _x( 'Post Types', 'Post Type General Name', 'Post Types' ), | |
'singular_name' => _x( 'Post Type', 'Post Type Singular Name', 'Post Types' ), | |
'menu_name' => __( 'Post Types', 'Post Types' ), | |
'name_admin_bar' => __( 'Post Type', 'Post Types' ), | |
'archives' => __( 'Item Archives', 'Post Types' ), | |
'parent_item_colon' => __( 'Parent Item:', 'Post Types' ), | |
'all_items' => __( 'All Items', 'Post Types' ), |