Skip to content

Instantly share code, notes, and snippets.

View giorgioriccardi's full-sized avatar
🎯
Focusing

Giorgio Riccardi giorgioriccardi

🎯
Focusing
  • Giorgio Riccardi Creations
  • Vancovuer, BC, Canada
View GitHub Profile
@giorgioriccardi
giorgioriccardi / wordpress-db-roles-capabilities.md
Last active July 20, 2020 17:56 — forked from octalmage/roles.md
Default WordPress user roles and capabilities.

WordPress v4.3.1

Admin wp_capabilities wp_user_level 10

a:1:{s:13:"administrator";b:1;}

Contributor wp_capabilities wp_user_level 1

SHORTCUTS

Key/Command Description
Tab Auto-complete files and folder names
Ctrl + A Go to the beginning of the line you are currently typing on
Ctrl + E Go to the end of the line you are currently typing on
Ctrl + U Clear the line before the cursor
Ctrl + K Clear the line after the cursor
Ctrl + W Delete the word before the cursor
Ctrl + T Swap the last two characters before the cursor
@giorgioriccardi
giorgioriccardi / core-blocks.txt
Created January 18, 2020 18:41 — forked from DavidPeralvarez/core-blocks.txt
Gutenberg core blocks list
// Útil para filtros de Gutenberg como "allowed_block_types"
archives
audio
button
categories
code
column
columns
coverImage
@giorgioriccardi
giorgioriccardi / vscode_shortcuts.md
Created January 3, 2020 16:33 — forked from bradtraversy/vscode_shortcuts.md
Helpful shortcuts for VSCode

VSCode Shortcuts

List of helpful shortcuts for faster coding

If you have any other helpful shortcuts, feel free to add in the comments of this gist :)

Official List of all commands

@giorgioriccardi
giorgioriccardi / wl-api.php
Last active August 26, 2019 18:54 — forked from ivandoric/wl-api.php
Creating WordPress Rest API Custom Endpoints
<?php
/**
* Plugin Name: Custom API
* Plugin URI: http://chrushingit.com
* Description: Crushing it!
* Version: 1.0
* Author: Art Vandelay
* Author URI: http://watch-learn.com
* YouTube URI: https://www.youtube.com/watch?v=C2twS9ArdCI
*/
@giorgioriccardi
giorgioriccardi / Update cached .gitignore
Last active August 12, 2019 22:40 — forked from c33k/Update .gitignore
Updating .gitignore and cleaning the cache
// First commit any outstanding code changes, and then, run this command:
git rm -r --cached .
// This removes any changed files from the index(staging area), then just run:
git add .
// Commit
git commit -m "Remove .gitignore cached files"
@giorgioriccardi
giorgioriccardi / docker_wordpress.md
Created January 24, 2019 16:40 — forked from bradtraversy/docker_wordpress.md
Docker Compose FIle For Wordpress, MySQL & phpmyadmin

Wordpress & Docker

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
@giorgioriccardi
giorgioriccardi / webdev_online_resources.md
Created August 24, 2018 00:09 — forked from bradtraversy/webdev_online_resources.md
Online Resources For Web Developers (No Downloading)
@giorgioriccardi
giorgioriccardi / if_else_lang.php
Last active May 15, 2018 20:59 — forked from beovulf/if_else_lang.php
If else language wordpress (polylang)
<?php
$currentlang = get_bloginfo('language');
if($currentlang=="en-CA"):
?>
<?php elseif($currentlang=="fr-CA"): ?>
<?php endif; ?>
or to avoid limitations or issues with "en-CA" "en-GB" "en-US" "en-UK" "fr-FR" etc:
$args = array(
'tag' => 'featured',
'category__in' => array( 43, 52 ),
'author__in' => array( 255, 930 )
);
$author_featured_posts = new WP_Query( $args );