Skip to content

Instantly share code, notes, and snippets.

Predecessors

Install yarn

curl --compressed -o- -L https://yarnpkg.com/install.sh | bash

Install vue-cli

Tested @vue/cli version is 4.4.6.

# Delete Product term relationships
DELETE
term_relationships.*,
term_taxonomy.*,
terms.*
FROM wp_term_relationships AS term_relationships
INNER JOIN wp_term_taxonomy AS term_taxonomy
ON term_relationships.term_taxonomy_id=term_taxonomy.term_taxonomy_id
INNER JOIN wp_terms AS terms
ON term_taxonomy.term_id=terms.term_id
@reinislejnieks
reinislejnieks / git-deployment.md
Created February 22, 2021 19:21 — forked from noelboss/git-deployment.md
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.

@reinislejnieks
reinislejnieks / iterm2-solarized.md
Created January 22, 2019 17:33 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Meslo powerline font + [Powerlevel9k] - (macOS)

Default

Default

Powerlevel9k

Powerlevel9k

@reinislejnieks
reinislejnieks / .gitconfig
Created December 4, 2018 12:30 — forked from pksunkara/config
Sample of git config file (Example .gitconfig)
[user]
name = Pavan Kumar Sunkara
email = pavan.sss1991@gmail.com
username = pksunkara
[core]
editor = vim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
excludesfile = ~/.gitignore
[sendemail]
smtpencryption = tls
@reinislejnieks
reinislejnieks / .env.gitlab
Created November 24, 2018 08:31
Laravel Dusk (PHPUNIT) Test for Gitlab-ci with docker chromdriver , headless chrome, vnc, screenshots, pipeline, artifacts
APP_ENV=testing
APP_KEY=base64:DimZ0aVNA8ZWtWxTB4fDxFc6lL1wM2C7evETA4QK3+c=
APP_DEBUG=true
APP_LOG_LEVEL=debug
APP_URL=http://localhost:8081
DB_CONNECTION=mysql
DB_HOST=mysql
DB_PORT=3306
DB_DATABASE=secca_testing
{{-- Define all our servers --}}
@servers(['staging' => '', 'production' => ''])
@setup
{{-- The timezone your servers run in --}}
$timezone = 'Europe/Amsterdam';
{{-- The base path where your deployments are sitting --}}
$path = '/var/www/site.com/htdocs';
@reinislejnieks
reinislejnieks / Laravel-Container.md
Created August 26, 2018 10:44
Laravel's Dependency Injection Container in Depth

Laravel's Dependency Injection Container in Depth

Translations: Korean (by Yongwoo Lee)

Laravel has a powerful Inversion of Control (IoC) / Dependency Injection (DI) Container. Unfortunately the official documentation doesn't cover all of the available functionality, so I decided to experiment with it and document it for myself. The following is based on Laravel 5.4.26 - other versions may vary.

Introduction to Dependency Injection

I won't attempt to explain the principles behind DI / IoC here - if you're not familiar with them you might want to read What is Dependency Injection? by Fabien Potencier (creator of the Symfony framework).

@reinislejnieks
reinislejnieks / camel_case_functions.php
Last active August 23, 2018 20:32
Here are two PHP functions to convert strings between underscore format and camel case
<?php
/**
* Translates a camel case string into a string with
* underscores (e.g. firstName -> first_name)
*
* @param string $str String in camel case format
* @return string $str Translated into underscore format
*/
function fromCamelCase($str) {
$str[0] = strtolower($str[0]);
<?php
/**
* Класс работы с сессиями
*
* Использование
* session::getInstance()->start();
* dump(session::getInstance()->get('qwer'));
* session::getInstance()->set('qwer', 'qwer');
* 1 параметр $key - наименование сессии
* 2 параметр $value - значени сессии