snipt

Ctrl+h for KB shortcuts

Text only

Force Empty Trash

rm -rf ~/.Trash/*
https://snipt.net/embed/445a283da01cdd17c6655131864b9076/
/raw/445a283da01cdd17c6655131864b9076/
445a283da01cdd17c6655131864b9076
text
Text only
1
2019-05-18T21:47:34
True
False
False
/api/public/snipt/53024/
force-empty-trash
<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>rm -rf ~/.Trash/* </span></pre></div> </td></tr></table>
Mac, Shell

Text only

Yii - create Application

/DOCUMENTROOT/yii/framework/yiic webapp /DOCUMENTROOT/webappname
https://snipt.net/embed/a10ecf9e8ca0d0c7c30261834838c299/
/raw/a10ecf9e8ca0d0c7c30261834838c299/
a10ecf9e8ca0d0c7c30261834838c299
text
Text only
1
2019-05-17T09:00:31
True
False
False
Aug 29, 2012 at 10:23 AM
/api/public/snipt/46384/
yii-create-application
<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>/DOCUMENTROOT/yii/framework/yiic webapp /DOCUMENTROOT/webappname </span></pre></div> </td></tr></table>
Yii

PHP

Yii - create Roles

1
2
3
4
$auth=Yii::app()->authManager;
$role=$auth->createRole('user');
$role=$auth->createRole('admin');
$role=$auth->addChild('user');
https://snipt.net/embed/4cb3402dd2f3212d4feca6eaa014ad8f/
/raw/4cb3402dd2f3212d4feca6eaa014ad8f/
4cb3402dd2f3212d4feca6eaa014ad8f
php
PHP
4
2019-05-17T09:00:48
True
False
False
Aug 29, 2012 at 10:23 AM
/api/public/snipt/46383/
yii-create-roles
<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><span class="x">$auth=Yii::app()-&gt;authManager;</span> </span><span id="L-2"><a name="L-2"></a><span class="x">$role=$auth-&gt;createRole(&#39;user&#39;);</span> </span><span id="L-3"><a name="L-3"></a><span class="x">$role=$auth-&gt;createRole(&#39;admin&#39;);</span> </span><span id="L-4"><a name="L-4"></a><span class="x">$role=$auth-&gt;addChild(&#39;user&#39;);</span> </span></pre></div> </td></tr></table>
Roles, Yii