snipt

Ctrl+h for KB shortcuts

Text only

Drupal CVS checkout for modules

cvs -d:pserver:anonymous:[email protected]:/cvs/drupal-contrib checkout -d views -r HEAD contributions/modules/views
https://snipt.net/embed/d2a6c2ea90831549569bbba30d88efcb/
/raw/d2a6c2ea90831549569bbba30d88efcb/
d2a6c2ea90831549569bbba30d88efcb
text
Text only
1
2019-05-16T11:19:08
True
False
False
/api/public/snipt/9/
drupal-cvs-checkout-for-modules
<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>cvs -d:pserver:anonymous:[email protected]:/cvs/drupal-contrib checkout -d views -r HEAD contributions/modules/views </span></pre></div> </td></tr></table>
cvs, drupal

Bash

checkout drupal

cvs -d:pserver:anonymous:[email protected]:/cvs/drupal checkout -d ./trunk -r DRUPAL-6 drupal
https://snipt.net/embed/5aa852d9efe290b545b826e532ce5750/
/raw/5aa852d9efe290b545b826e532ce5750/
5aa852d9efe290b545b826e532ce5750
bash
Bash
1
2019-05-19T09:31:56
True
False
False
/api/public/snipt/8/
checkout-drupal
<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>cvs -d:pserver:anonymous:[email protected]:/cvs/drupal checkout -d ./trunk -r DRUPAL-6 drupal </span></pre></div> </td></tr></table>
drupal

Bash

checkout drupal module

cvs -d:pserver:anonymous:[email protected]:/cvs/drupal-contrib checkout -d image -r DRUPAL-5--1-6 contributions/modules/image
https://snipt.net/embed/6107868c9b290c8a9de903fdf1aea37c/
/raw/6107868c9b290c8a9de903fdf1aea37c/
6107868c9b290c8a9de903fdf1aea37c
bash
Bash
1
2019-05-13T22:06:35
True
False
False
/api/public/snipt/7/
checkout-drupal-module
<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>cvs -d:pserver:anonymous:[email protected]:/cvs/drupal-contrib checkout -d image -r DRUPAL-5--1-6 contributions/modules/image </span></pre></div> </td></tr></table>
drupal

MySQL

setup email forwarding in mysql

INSERT INTO forwards (source, destination) 
VALUES ('[email protected]', '[email protected]');
https://snipt.net/embed/ececc5f5260b4684af760ce9678f74b6/
/raw/ececc5f5260b4684af760ce9678f74b6/
ececc5f5260b4684af760ce9678f74b6
mysql
MySQL
2
2019-05-14T13:41:54
True
False
False
/api/public/snipt/6/
setup-email-forwarding-in-mysql
<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><span class="k">INSERT</span> <span class="k">INTO</span> <span class="nf">forwards</span> <span class="p">(</span><span class="n">source</span><span class="p">,</span> <span class="n">destination</span><span class="p">)</span> </span><span id="L-2"><a name="L-2"></a><span class="k">VALUES</span> <span class="p">(</span><span class="s1">&#39;[email protected]&#39;</span><span class="p">,</span> <span class="s1">&#39;[email protected]&#39;</span><span class="p">);</span> </span></pre></div> </td></tr></table>
email, mysql

Python

django script initialization

1
2
3
4
5
from django.core.management import setup_environ
import sys
sys.path.append('/path/to/django/project')
import settings
setup_environ(settings)
https://snipt.net/embed/e8340fc216149972e3f3f48bab3d82fa/
/raw/e8340fc216149972e3f3f48bab3d82fa/
e8340fc216149972e3f3f48bab3d82fa
python
Python
6
2019-05-10T17:08:31
True
False
False
/api/public/snipt/2/
django-script-initialization
<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> <a href="#L-5">5</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="kn">from</span> <span class="nn">django.core.management</span> <span class="kn">import</span> <span class="n">setup_environ</span> </span><span id="L-2"><a name="L-2"></a><span class="kn">import</span> <span class="nn">sys</span> </span><span id="L-3"><a name="L-3"></a><span class="n">sys</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="s1">&#39;/path/to/django/project&#39;</span><span class="p">)</span> </span><span id="L-4"><a name="L-4"></a><span class="kn">import</span> <span class="nn">settings</span> </span><span id="L-5"><a name="L-5"></a><span class="n">setup_environ</span><span class="p">(</span><span class="n">settings</span><span class="p">)</span> </span></pre></div> </td></tr></table>
django

MySQL

create mysql user and database

1
2
3
4
5
CREATE DATABASE my_database;
GRANT ALL PRIVILEGES ON my_database.* 
TO 'my_user'@'localhost'
IDENTIFIED BY 'my_password' 
WITH GRANT OPTION;
https://snipt.net/embed/7d12b7be7b5e54c74315562b5ce2749e/
/raw/7d12b7be7b5e54c74315562b5ce2749e/
7d12b7be7b5e54c74315562b5ce2749e
mysql
MySQL
5
2019-05-10T22:16:36
True
False
False
/api/public/snipt/1/
create-mysql-user
<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> <a href="#L-5">5</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">CREATE</span> <span class="k">DATABASE</span> <span class="n">my_database</span><span class="p">;</span> </span><span id="L-2"><a name="L-2"></a><span class="k">GRANT</span> <span class="k">ALL</span> <span class="n">PRIVILEGES</span> <span class="k">ON</span> <span class="n">my_database</span><span class="p">.</span><span class="o">*</span> </span><span id="L-3"><a name="L-3"></a><span class="k">TO</span> <span class="s1">&#39;my_user&#39;</span><span class="o">@</span><span class="s1">&#39;localhost&#39;</span> </span><span id="L-4"><a name="L-4"></a><span class="n">IDENTIFIED</span> <span class="k">BY</span> <span class="s1">&#39;my_password&#39;</span> </span><span id="L-5"><a name="L-5"></a><span class="k">WITH</span> <span class="k">GRANT</span> <span class="k">OPTION</span><span class="p">;</span> </span></pre></div> </td></tr></table>
mysql