snipt

Ctrl+h for KB shortcuts

Bash

Run composer with increased memory limit

php -d memory_limit=1G /usr/bin/composer update
https://snipt.net/embed/42a7102b668ff880f016e9cc324e7138/
/raw/42a7102b668ff880f016e9cc324e7138/
42a7102b668ff880f016e9cc324e7138
bash
Bash
1
2019-06-19T02:52:58
True
False
False
Jan 17, 2014 at 05:35 AM
/api/public/snipt/106509/
run-composer-with-increased-memory-limit
<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>php -d <span class="nv">memory_limit</span><span class="o">=</span>1G /usr/bin/composer update </span></pre></div> </td></tr></table>
composer, memory_limit, php

Text only

Remove all console.log occurrences in Sublime, with search/replace regex

Search for: \s*console\.log(.*);
Replace with:
https://snipt.net/embed/92e95c7f64c8cf7c7013e7b793ca4d4e/
/raw/92e95c7f64c8cf7c7013e7b793ca4d4e/
92e95c7f64c8cf7c7013e7b793ca4d4e
text
Text only
2
2019-06-13T01:36:33
True
False
False
Aug 21, 2013 at 07:06 AM
/api/public/snipt/75882/
remove-all-consolelog-occurrences-in-sublime-with-searchreplace-regex
<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>Search for: \s*console\.log(.*); </span><span id="L-2"><a name="L-2"></a>Replace with: </span></pre></div> </td></tr></table>

Bash

Show latest branch activity in Git

for k in `git branch|perl -pe s/^..//`;do echo -e `git show --pretty=format:"%Cgreen%ci %Cblue%cr%Creset" $k|head -n 1`\\t$k;done|sort -r
https://snipt.net/embed/b19e52b4fa804023dfd0754e8bfd7f03/
/raw/b19e52b4fa804023dfd0754e8bfd7f03/
b19e52b4fa804023dfd0754e8bfd7f03
bash
Bash
1
2019-06-19T09:53:15
True
False
False
Oct 26, 2012 at 04:51 AM
/api/public/snipt/49081/
show-latest-branch-activity-in-git
<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="k">for</span> k in <span class="sb">`</span>git branch<span class="p">|</span>perl -pe s/^..//<span class="sb">`</span><span class="p">;</span><span class="k">do</span> <span class="nb">echo</span> -e <span class="sb">`</span>git show --pretty<span class="o">=</span>format:<span class="s2">&quot;%Cgreen%ci %Cblue%cr%Creset&quot;</span> <span class="nv">$k</span><span class="p">|</span>head -n 1<span class="sb">`</span><span class="se">\\</span>t<span class="nv">$k</span><span class="p">;</span><span class="k">done</span><span class="p">|</span>sort -r </span></pre></div> </td></tr></table>
branch, git, show