Skip to content

Instantly share code, notes, and snippets.

View montrealist's full-sized avatar
📺

Max Kovalenkov montrealist

📺
  • Montreal
View GitHub Profile
@montrealist
montrealist / .gitignore
Last active October 25, 2015 21:28
.gitignore for wpengine projects
*~
.DS_Store
.svn
.cvs
.git
.listing
*.bak
*.swp
Thumbs.db
*.log
@montrealist
montrealist / epc-csv-export.php
Created November 9, 2015 19:11
WordPress plugin to generate CSV from postmeta table data (in this case - average star ratings from the Starstruck plugin
<?php
/**
* CSV Exporter bootstrap file
*
* This file is read by WordPress to generate the plugin information in the plugin
* admin area. This file also includes all of the dependencies used by the plugin,
* registers the activation and deactivation functions, and defines a function
* that starts the plugin.
*
@montrealist
montrealist / wp-revslider-import-error.md
Last active October 1, 2023 15:39
WordPress revslider error: slider_export.txt does not exist - Solution

WordPress revslider: slider_export.txt does not exist

problem:

The Slider Revolution WordPress plugin (version 5.1 and earlier) produces an error when one tries to export a slider, and then import the resulting ZIP file into another WordPress installation. The error verbatim:

importing slider settings and data...
Error: slider_export.txt does not exist!

issue:

@montrealist
montrealist / custom.js
Created January 5, 2016 21:31
custom.js
console.log('custom shit: '); //TODO
var $list = $( '.products' ),
$items = $list.find( '.product' ),
setHeights = function()
{
$items.css( 'height', 'auto' );
var perRow = Math.floor( $list.width() / $items.width() );
if( perRow == null || perRow < 2 ) return true;
for( var i = 0, j = $items.length; i < j; i += perRow )
@montrealist
montrealist / how-to-get-wp_mock-working-inside-codeception.md
Last active July 13, 2016 18:45
How to get wp_mock set up inside Codeception
#!/bin/bash
#
# Bash script to setup headless Selenium (uses Xvfb and Chrome)
# (Tested on Ubuntu 12.04) trying on ubuntu server 14.04
# Add Google Chrome's repo to sources.list
echo "deb http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee -a /etc/apt/sources.list
# Install Google's public key used for signing packages (e.g. Chrome)
# (Source: http://www.google.com/linuxrepositories/)
@montrealist
montrealist / deploy-to-digital-ocean.markdown
Last active January 7, 2024 11:57
How to deploy files to Digital Ocean when pushing to Gitlab

How to get auto-deploy working from Gitlab to your Digital Ocean (DO) server.

Install https://github.com/olipo186/Git-Auto-Deploy (via apt-get):

sudo apt-get install software-properties-common
sudo add-apt-repository ppa:olipo186/git-auto-deploy
sudo apt-get update
sudo apt-get install git-auto-deploy
@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" />
@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.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');
});
};