snipt

Ctrl+h for KB shortcuts

Text only

wc word count -l lines

wc -l
https://snipt.net/embed/65e64f81decd1aa0008379e1ca481dbf/
/raw/65e64f81decd1aa0008379e1ca481dbf/
65e64f81decd1aa0008379e1ca481dbf
text
Text only
1
2019-06-23T03:22:17
True
False
False
Jan 21, 2016 at 05:29 AM
/api/public/snipt/143722/
wc-word-count-l-lines
<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></span><span id="L-1"><a name="L-1"></a>wc -l </span></pre></div> </td></tr></table>

Text only

Fatal: Reference is not a tree for that plugin submodule

git submodule foreach --recursive 'git fetch --tags'
https://snipt.net/embed/e3bebe4bf4e94cf4f3e4e31f0b54c84f/
/raw/e3bebe4bf4e94cf4f3e4e31f0b54c84f/
e3bebe4bf4e94cf4f3e4e31f0b54c84f
text
Text only
1
2019-06-21T10:07:17
True
False
False
Dec 17, 2015 at 07:45 AM
/api/public/snipt/143142/
fatal-reference-is-not-a-tree-for-that-plugin-submodule
<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></span><span id="L-1"><a name="L-1"></a>git submodule foreach --recursive &#39;git fetch --tags&#39; </span></pre></div> </td></tr></table>

Text only

Untitled

cd /var/www/html/
find . -name ‘file_name.php’
https://snipt.net/embed/420a2c8ecb773516a87ba6624bcc1801/
/raw/420a2c8ecb773516a87ba6624bcc1801/
420a2c8ecb773516a87ba6624bcc1801
text
Text only
2
2019-06-24T04:08:34
True
False
False
Oct 19, 2015 at 10:09 AM
/api/public/snipt/141816/
-a15e3f05
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>cd /var/www/html/ </span><span id="L-2"><a name="L-2"></a>find . -name ‘file_name.php’ </span></pre></div> </td></tr></table>
grep, search

Text only

Find directory

find . -type d -name "dir name"
https://snipt.net/embed/4bf1c8134a2ba8424e21dd1b156fac6a/
/raw/4bf1c8134a2ba8424e21dd1b156fac6a/
4bf1c8134a2ba8424e21dd1b156fac6a
text
Text only
1
2019-06-19T01:32:40
True
False
False
Oct 14, 2015 at 05:13 AM
/api/public/snipt/141676/
find-directory-ea4b954d
<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></span><span id="L-1"><a name="L-1"></a>find . -type d -name &quot;dir name&quot; </span></pre></div> </td></tr></table>
bash, directory, find

Text only

increase upload limit

1
2
3
4
Config change for /etc/httpd/conf.d/wordpress.conf

php_admin_value post_max_size 50M
php_admin_value upload_max_filesize 50M
https://snipt.net/embed/2924bb408e2afe2ad597b1bf0a5972b5/
/raw/2924bb408e2afe2ad597b1bf0a5972b5/
2924bb408e2afe2ad597b1bf0a5972b5
text
Text only
4
2019-06-22T23:36:03
True
False
False
Oct 06, 2015 at 10:43 AM
/api/public/snipt/141524/
increase-upload-limit
<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></span><span id="L-1"><a name="L-1"></a>Config change for /etc/httpd/conf.d/wordpress.conf </span><span id="L-2"><a name="L-2"></a> </span><span id="L-3"><a name="L-3"></a>php_admin_value post_max_size 50M </span><span id="L-4"><a name="L-4"></a>php_admin_value upload_max_filesize 50M </span></pre></div> </td></tr></table>

Text only

Git - Remove local changes & pull from repo

git fetch --all
git reset --hard origin/master
https://snipt.net/embed/7d683e6531c2f892b0c388aca4f94c60/
/raw/7d683e6531c2f892b0c388aca4f94c60/
7d683e6531c2f892b0c388aca4f94c60
text
Text only
2
2019-06-20T18:03:54
True
False
False
Oct 04, 2015 at 06:14 PM
/api/public/snipt/141491/
git-remove-local-changes-pull-from-repo
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>git fetch --all </span><span id="L-2"><a name="L-2"></a>git reset --hard origin/master </span></pre></div> </td></tr></table>
changes, git, remove

Text only

git - remove file tracking

git rm --cached FILENAME
https://snipt.net/embed/b95f9e34e8e024efa716289d976d771e/
/raw/b95f9e34e8e024efa716289d976d771e/
b95f9e34e8e024efa716289d976d771e
text
Text only
1
2019-06-22T15:36:07
True
False
False
Oct 04, 2015 at 04:35 PM
/api/public/snipt/141490/
git-remove-file-tracking
<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></span><span id="L-1"><a name="L-1"></a>git rm --cached FILENAME </span></pre></div> </td></tr></table>
git, remove, tracking

PHP

WORDPRESS - debug query

exit( var_dump( $wpdb->last_query ) );
https://snipt.net/embed/53690e014b2163ec194285a64cbcc47c/
/raw/53690e014b2163ec194285a64cbcc47c/
53690e014b2163ec194285a64cbcc47c
php
PHP
1
2019-06-19T10:07:42
True
False
False
Sep 30, 2015 at 05:40 PM
/api/public/snipt/141343/
wordpress-debug-query
<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></span><span id="L-1"><a name="L-1"></a><span class="x">exit( var_dump( $wpdb-&gt;last_query ) );</span> </span></pre></div> </td></tr></table>
debug, wordpress