snipt

Ctrl+h for KB shortcuts

Bash

recursively remove all .pyc files from current directory

find . -name "*.pyc" -exec rm '{}' ';'
https://snipt.net/embed/0525a4d3e0f8c1da0a29563f4e568682/
/raw/0525a4d3e0f8c1da0a29563f4e568682/
0525a4d3e0f8c1da0a29563f4e568682
bash
Bash
1
2019-06-18T00:00:46
True
False
False
/api/public/snipt/3422/
recursively-remove-all-pyc-files-from-current-directory
<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 . -name <span class="s2">&quot;*.pyc&quot;</span> -exec rm <span class="s1">&#39;{}&#39;</span> <span class="s1">&#39;;&#39;</span> </span></pre></div> </td></tr></table>
bash, python

Bash

create new zope instance via command line

python zope/bin/mkzopeinstance
https://snipt.net/embed/6ff378af7c0fe2db2ab2aae8b6026edd/
/raw/6ff378af7c0fe2db2ab2aae8b6026edd/
6ff378af7c0fe2db2ab2aae8b6026edd
bash
Bash
1
2019-05-29T01:30:01
True
False
False
/api/public/snipt/2361/
create-new-zope-instance-via-command-line
<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>python zope/bin/mkzopeinstance </span></pre></div> </td></tr></table>
python, zope3
https://snipt.net/embed/71fd20085df83986418d620fa3e092f4/
/raw/71fd20085df83986418d620fa3e092f4/
71fd20085df83986418d620fa3e092f4
python
Python
1
2019-06-17T05:40:48
True
False
False
/api/public/snipt/2340/
deploy-a-project-using-fabric-without-committing-changes
<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="n">fab</span> <span class="n">deploy</span> </span></pre></div> </td></tr></table>
fabric, python

Python

deploy a project using fabric and commit changes

fab deploy:m='my subversion message'
https://snipt.net/embed/dd05e0fd9958aac06ad68b74a49dc94f/
/raw/dd05e0fd9958aac06ad68b74a49dc94f/
dd05e0fd9958aac06ad68b74a49dc94f
python
Python
1
2019-06-17T05:40:47
True
False
False
/api/public/snipt/2339/
deploy-a-project-using-fabric
<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="n">fab</span> <span class="n">deploy</span><span class="p">:</span><span class="n">m</span><span class="o">=</span><span class="s1">&#39;my subversion message&#39;</span> </span></pre></div> </td></tr></table>
fabric, python

Python

run fabric update command within project

fab update
https://snipt.net/embed/0ce8a4a8f79409dd5af0112afca35486/
/raw/0ce8a4a8f79409dd5af0112afca35486/
0ce8a4a8f79409dd5af0112afca35486
python
Python
1
2019-06-20T04:37:31
True
False
False
/api/public/snipt/2338/
run-fabric-update-command-within-project
<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="n">fab</span> <span class="n">update</span> </span></pre></div> </td></tr></table>
fabric, python

Python

how to set fabric config settings in older versions of fabric

set(fab_hosts = ['production.server.com'])
https://snipt.net/embed/4e530831daf5c5bf6c106f221d40b727/
/raw/4e530831daf5c5bf6c106f221d40b727/
4e530831daf5c5bf6c106f221d40b727
python
Python
1
2019-06-20T06:25:11
True
False
False
/api/public/snipt/2335/
how-to-set-fabric-config-settings-in-older-versions-of-fabric
<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="nb">set</span><span class="p">(</span><span class="n">fab_hosts</span> <span class="o">=</span> <span class="p">[</span><span class="s1">&#39;production.server.com&#39;</span><span class="p">])</span> </span></pre></div> </td></tr></table>
fabfile, fabric, python