1. Install and start mongo service [official docs]
wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add -
wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add -
<?php | |
$items_per_page = 2; | |
$page = isset( $_GET['cpage'] ) ? abs( (int) $_GET['cpage'] ) : 1; | |
$offset = ( $page * $items_per_page ) - $items_per_page; | |
$query = 'SELECT * FROM '.$table_name; | |
$total_query = "SELECT COUNT(1) FROM (${query}) AS combined_table"; | |
$total = $wpdb->get_var( $total_query ); |
// Function form the react-native-image-picker library | |
ImagePicker.showImagePicker({ title: 'Select Image' }, (response) => { | |
// format the image data | |
const image = { | |
uri: response.uri, | |
type: 'image/jpeg', | |
name: 'myImage' + '-' + Date.now() + '.jpg' | |
} | |
// Instantiate a FormData() object | |
const imgBody = new FormData(); |
alexcvzz.vscode-sqlite | |
andys8.jest-snippets | |
apollographql.vscode-apollo | |
austincummings.razor-plus | |
bobsparadox.seti-black | |
BriteSnow.vscode-toggle-quotes | |
christian-kohler.npm-intellisense | |
christian-kohler.path-intellisense | |
CoenraadS.bracket-pair-colorizer | |
dbaeumer.vscode-eslint |
# Enable colors and change prompt: | |
# apple | |
autoload -U colors && colors | |
PS1="%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$reset_color%}$%b " | |
# History in cache directory: | |
HISTSIZE=10000 | |
SAVEHIST=10000 | |
HISTFILE=~/.cache/zsh/history |
/* | |
* WP REST API version 2.0-beta7 | |
* API base url ishttp://www.example.com/wp-json | |
* | |
* Reference | |
* https://wordpress.org/support/topic/new-post-with-image | |
*/ | |
/* | |
* Get Guzzle HTTP Client. That client has been authenticated. | |
*/ |
// License: GPLv2+ | |
var el = wp.element.createElement, | |
registerBlockType = wp.blocks.registerBlockType, | |
ServerSideRender = wp.components.ServerSideRender, | |
TextControl = wp.components.TextControl, | |
InspectorControls = wp.editor.InspectorControls; | |
/* | |
* Here's where we register the block in JavaScript. |
/** | |
* This file contains the fix. | |
*/ | |
/*global wc_add_to_cart_variation_params, wc_cart_fragments_params */ | |
/*! | |
* Variations Plugin | |
*/ | |
;(function ( $, window, document, undefined ) { |
patbenatar.advanced-new-file | |
formulahendry.auto-close-tag | |
formulahendry.auto-rename-tag | |
fosshaas.fontsize-shortcuts | |
BriteSnow.vscode-toggle-quotes | |
Zignd.html-css-class-completion | |
christian-kohler.npm-intellisense | |
christian-kohler.path-intellisense | |
octref.vetur | |
dbaeumer.vscode-eslint |
let webpack = require('webpack'); | |
let path = require('path'); | |
module.exports = { | |
entry: { | |
app: './resources/assets/js/app.js', | |
vendor: ['vue', 'axios'] | |
}, | |
output: { |