snipt

Ctrl+h for KB shortcuts

Bash

install elasticsearch-head plugin on osx

1
2
3
cd /usr/local/Cellar/elasticsearch/2.1.0_1/
bin/plugin install mobz/elasticsearch-head
open http://localhost:9200/_plugin/head
https://snipt.net/embed/8c31a72041f2f8ce8f50b4b2b72dd48a/
https://snipt.net/raw/8c31a72041f2f8ce8f50b4b2b72dd48a/
8c31a72041f2f8ce8f50b4b2b72dd48a
bash
Bash
4
2016-09-27T05:21:19
True
False
False
Dec 17, 2015 at 12:44 PM
/api/public/snipt/143145/
install-elasticsearch-head-plugin-on-osx
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="nb">cd</span> /usr/local/Cellar/elasticsearch/2.1.0_1/ </span><span id="L-2"><a name="L-2"></a>bin/plugin install mobz/elasticsearch-head </span><span id="L-3"><a name="L-3"></a>open http://localhost:9200/_plugin/head </span></pre></div> </td></tr></table>
elasticsearch, osx, plugins

Text only

Fix Wordpress Auto Update Plugin Issue

1
2
3
4
//Add this to the wp-config.php file
//http://wordpress.org/support/topic/auto-upgrade-to-361-fails?replies=8#post-5323377

define('WP_TEMP_DIR',ABSPATH.'wp-content/uploads/');
https://snipt.net/embed/f7b88840e6fffe25f77ec65e30ceb252/
https://snipt.net/raw/f7b88840e6fffe25f77ec65e30ceb252/
f7b88840e6fffe25f77ec65e30ceb252
text
Text only
4
2016-09-24T01:57:35
True
False
False
Mar 10, 2014 at 10:31 AM
/api/public/snipt/120540/
fix-wordpress-auto-update-plugin-issue
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a>//Add this to the wp-config.php file </span><span id="L-2"><a name="L-2"></a>//http://wordpress.org/support/topic/auto-upgrade-to-361-fails?replies=8#post-5323377 </span><span id="L-3"><a name="L-3"></a> </span><span id="L-4"><a name="L-4"></a>define(&#39;WP_TEMP_DIR&#39;,ABSPATH.&#39;wp-content/uploads/&#39;); </span></pre></div> </td></tr></table>
"auto update", plugins, wordpress

Text only

Cordova: Error on plugin installation (TypeError: Cannot read property 'install' of undefined)

1
2
3
Try to update cordova :)

npm install -g cordova
https://snipt.net/embed/d268c3f1a5c155818683fd4e0fff8aa6/
https://snipt.net/raw/d268c3f1a5c155818683fd4e0fff8aa6/
d268c3f1a5c155818683fd4e0fff8aa6
text
Text only
3
2016-09-27T21:04:36
True
False
True
Feb 13, 2014 at 05:44 AM
/api/public/snipt/113339/
cordova-error-on-plugin-installation-typeerror-cannot-read-property-install-of-undefined
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a>Try to update cordova :) </span><span id="L-2"><a name="L-2"></a> </span><span id="L-3"><a name="L-3"></a>npm install -g cordova </span></pre></div> </td></tr></table>
cordova, inappbrowser, plugins

Text only

de-ativate plugins from wordpress via db

UPDATE {prefix}_options SET option_value = 'a:0:{}' WHERE option_name = 'active_plugins';
https://snipt.net/embed/789983023938989d35c238d3ce6e4338/
https://snipt.net/raw/789983023938989d35c238d3ce6e4338/
789983023938989d35c238d3ce6e4338
text
Text only
1
2016-09-25T21:23:17
True
False
False
Dec 03, 2012 at 03:34 PM
/api/public/snipt/51172/
de-ativate-plugins-from-wordpress-via-db
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a>UPDATE {prefix}_options SET option_value = &#39;a:0:{}&#39; WHERE option_name = &#39;active_plugins&#39;; </span></pre></div> </td></tr></table>
database, de-activate, phpmyadmin, plugins, wordpress

Text only

240 plugins para JQuery, lo mejor de lo mejor

http://www.masquewordpress.com/240-plugins-para-jquery-lo-mejor-de-lo-mejor/#
https://snipt.net/embed/599d756dce916f6933f076bdf8ff31e6/
https://snipt.net/raw/599d756dce916f6933f076bdf8ff31e6/
599d756dce916f6933f076bdf8ff31e6
text
Text only
1
2016-09-20T04:45:55
True
False
False
Aug 24, 2012 at 03:33 PM
/api/public/snipt/46265/
240-plugins-para-jquery-lo-mejor-de-lo-mejor
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a>http://www.masquewordpress.com/240-plugins-para-jquery-lo-mejor-de-lo-mejor/# </span></pre></div> </td></tr></table>
jquery, plugins

PHP

Disable installing/updating new themes and plugins in WordPress

1
2
3
4
5
6
7
8
<?php
/** 
 * Disable new plugins and themes
 * ref: http://wp.tutsplus.com/tutorials/security/conquering-the-wp-config-php-file-11-good-practices/
 */

define('DISALLOW_FILE_MODS',true);
?>
https://snipt.net/embed/a376c64832c05d9284ec0cd66bf7e34d/
https://snipt.net/raw/a376c64832c05d9284ec0cd66bf7e34d/
a376c64832c05d9284ec0cd66bf7e34d
php
PHP
8
2016-09-24T00:15:01
True
False
False
Aug 16, 2012 at 11:53 AM
/api/public/snipt/45787/
disable-installingupdating-new-themes-and-plugins-in-wordpress
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a> <a href="#L-7">7</a> <a href="#L-8">8</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="cp">&lt;?php</span> </span><span id="L-2"><a name="L-2"></a><span class="sd">/** </span> </span><span id="L-3"><a name="L-3"></a><span class="sd"> * Disable new plugins and themes</span> </span><span id="L-4"><a name="L-4"></a><span class="sd"> * ref: http://wp.tutsplus.com/tutorials/security/conquering-the-wp-config-php-file-11-good-practices/</span> </span><span id="L-5"><a name="L-5"></a><span class="sd"> */</span> </span><span id="L-6"><a name="L-6"></a> </span><span id="L-7"><a name="L-7"></a><span class="nb">define</span><span class="p">(</span><span class="s1">&#39;DISALLOW_FILE_MODS&#39;</span><span class="p">,</span><span class="k">true</span><span class="p">);</span> </span><span id="L-8"><a name="L-8"></a><span class="cp">?&gt;</span><span class="x"></span> </span></pre></div> </td></tr></table>
disable, plugins, themes, wordpress, wp-config

Bash

Count WordPress plugin calls

strace php5 index.php 2>&1 | perl -ne 'print "$1\n" if (/wp-content\/plugins\/([\w-]*)/)' | sort | uniq -c | sort -n
https://snipt.net/embed/4bb4044d85a56a77a4e402b03422942d/
https://snipt.net/raw/4bb4044d85a56a77a4e402b03422942d/
4bb4044d85a56a77a4e402b03422942d
bash
Bash
1
2016-09-28T19:57:50
True
False
False
/api/public/snipt/29151/
count-wordpress-plugin-calls
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a>strace php5 index.php 2&gt;<span class="p">&amp;</span><span class="m">1</span> <span class="p">|</span> perl -ne <span class="s1">&#39;print &quot;$1\n&quot; if (/wp-content\/plugins\/([\w-]*)/)&#39;</span> <span class="p">|</span> sort <span class="p">|</span> uniq -c <span class="p">|</span> sort -n </span></pre></div> </td></tr></table>
count, plugins, strace, wordpress
Copyrighted, illegal, or inappropriate content? Email support@snipt.net.