snipt

Ctrl+h for KB shortcuts
#39160

Bash

compress a file

tar -czvf archive.tgz files
https://snipt.net/embed/19b7759abc360f157f9fe4f99477320b/
https://snipt.net/raw/19b7759abc360f157f9fe4f99477320b/
19b7759abc360f157f9fe4f99477320b
bash
Bash
1
2014-04-16T14:40:12
True
False
/api/public/snipt/39160/
compress-a-file
<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>tar -czvf archive.tgz files </span></pre></div> </td></tr></table>
gzip, tar
#33915

Bash

Reverse a commit

svn merge -r:73:68 http://my.repository.com/my/project/trunk
https://snipt.net/embed/c35bacb6fbe6ffc3be185c3da6938c64/
https://snipt.net/raw/c35bacb6fbe6ffc3be185c3da6938c64/
c35bacb6fbe6ffc3be185c3da6938c64
bash
Bash
1
2014-04-15T03:45:24
True
False
/api/public/snipt/33915/
reverse-a-commit
<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>svn merge -r:73:68 http://my.repository.com/my/project/trunk </span></pre></div> </td></tr></table>
svn
#23853

PHP

php timer

 <?php if(time() >= mktime(0,0,0,8,15,2010)) : ?>
https://snipt.net/embed/f767e6bdaa8afd43648ee661d4fa75da/
https://snipt.net/raw/f767e6bdaa8afd43648ee661d4fa75da/
f767e6bdaa8afd43648ee661d4fa75da
php
PHP
2
2014-04-04T18:37:18
True
False
/api/public/snipt/23853/
php-timer
<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><span class="x"> </span><span class="cp">&lt;?php</span> <span class="k">if</span><span class="p">(</span><span class="nb">time</span><span class="p">()</span> <span class="o">&gt;=</span> <span class="nb">mktime</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="mi">0</span><span class="p">,</span><span class="mi">0</span><span class="p">,</span><span class="mi">8</span><span class="p">,</span><span class="mi">15</span><span class="p">,</span><span class="mi">2010</span><span class="p">))</span> <span class="o">:</span> <span class="cp">?&gt;</span><span class="x"></span> </span></pre></div> </td></tr></table>
php, time
#17176

Bash

Change ownership of a file

chown -R wwwrun:www
https://snipt.net/embed/6ab9139e2514b384d68af6a43ff54c54/
https://snipt.net/raw/6ab9139e2514b384d68af6a43ff54c54/
6ab9139e2514b384d68af6a43ff54c54
bash
Bash
1
2014-04-11T09:25:11
True
False
/api/public/snipt/17176/
change-ownership-of-a-file
<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>chown -R wwwrun:www </span></pre></div> </td></tr></table>
bash, chmod, chown, unix
#11927

PHP

show php errors

ini_set('display_errors', "1");
ini_set('error_reporting', E_ALL ^ E_NOTICE);
https://snipt.net/embed/050b8004c37bae48d309326f4799fe43/
https://snipt.net/raw/050b8004c37bae48d309326f4799fe43/
050b8004c37bae48d309326f4799fe43
php
PHP
2
2014-04-14T04:56:22
True
False
/api/public/snipt/11927/
show-php-errors
<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 id="L-1"><a name="L-1"></a><span class="x">ini_set(&#39;display_errors&#39;, &quot;1&quot;);</span> </span><span id="L-2"><a name="L-2"></a><span class="x">ini_set(&#39;error_reporting&#39;, E_ALL ^ E_NOTICE);</span> </span></pre></div> </td></tr></table>
debug, php