Skip to content

Instantly share code, notes, and snippets.

View montrealist's full-sized avatar
📺

Max Kovalenkov montrealist

📺
  • Montreal
View GitHub Profile
WordPress database error Table 'wvaxcnmwju.gt0b_icl_translate' doesn't exist for query SELECT j.rid,
j.translator_id,
t.translation_id,
s.batch_id,
j.translated,
j.manager_id,
s.status,
s.needs_update,
s.translation_service,
s.uuid,
<?php
// 'EAE - Price Table' widget from https://wordpress.org/plugins/addon-elements-for-elementor-page-builder/
add_action('init', function () {
add_filter('wpml_elementor_widgets_to_translate', 'wpml_translate_widget_price_table_20200714');
});
function wpml_translate_widget_price_table_20200714($widgets)
{
<?php
add_action('init', function () {
add_filter('wpml_elementor_widgets_to_translate', 'wpml_translate_widget_retina_image_20200714');
});
function wpml_translate_widget_retina_image_20200714($widgets)
{
$widgets['uael-marketing-button'] = [
'conditions' => ['widgetType' => 'uael-marketing-button'],
alias.gip=git pull
alias.df=diff
alias.br=branch --all
alias.st=status
alias.plog=log --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative
alias.ac=!git add -A && git commit
alias.pom=push origin master
@montrealist
montrealist / composer.json
Created December 23, 2019 01:41
Overriding a package in composer.json with a branch on your fork
{
"repositories": [
{
"type": "git",
"url": "git@github.com:montrealist/new-private-project.git"
}
],
"require-dev": {
"pressbooks/new-private-project": "dev-bugfixes"
}
@montrealist
montrealist / box-api-wrapper.js
Last active December 19, 2017 19:10
box-node-sdk: search for file first and if it exists upload new version
const fileName = 'something.txt';
client.search.query (
fileName, { limit: 1 },
function(error, data) {
if (
data.total_count &&
data.total_count > 0 &&
data.entries[0].name === fileName
) {
// have a match - upload new version
@montrealist
montrealist / index.js
Created August 21, 2017 18:05
requirebin sketch
// Welcome! require() some modules from npm (like you were using browserify)
// and then hit Run Code to run your code on the right side.
// Modules get downloaded from browserify-cdn and bundled in your browser.
const promiseSeries = require('promise-series-node');
function func1() {
return new Promise((resolve, reject) => {
resolve('hello');
});
};
@montrealist
montrealist / ddc-tabs.html
Last active June 26, 2017 14:12
Nesting Polymer elements & dynamic content inside dom-repeat (source: http://jsbin.com/gagojas)
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="nesting Polymer elements and dynamic content inside dom-repeat">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<base href="http://polygit.org/polymer+:1.x/components/" />
<link href="polymer/polymer.html" rel="import" />
@montrealist
montrealist / index.html
Last active June 21, 2017 17:24
Nesting Polymer elements and dynamic content inside dom-repeat (source: http://jsbin.com/gagojas)
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="nesting Polymer elements and dynamic content inside dom-repeat">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<base href="http://polygit.org/polymer+:1.x/components/" />
<link href="polymer/polymer.html" rel="import" />