snipt

Ctrl+h for KB shortcuts

Objective-C

RaiseMan Init Method

1
2
3
4
5
6
-(id)init{
	[super init];
	expectedRaise=5.0;
	personName=@"New Person";
	return self;
}
https://snipt.net/embed/918b704c7e391246a8b754d4fc6f9147/
/raw/918b704c7e391246a8b754d4fc6f9147/
918b704c7e391246a8b754d4fc6f9147
objective-c
Objective-C
6
2019-08-23T02:45:16
True
False
False
/api/public/snipt/775/
raiseman-init-method
<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> <a href="#L-6">6</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="p">-(</span><span class="kt">id</span><span class="p">)</span><span class="nf">init</span><span class="p">{</span> </span><span id="L-2"><a name="L-2"></a> <span class="p">[</span><span class="nb">super</span> <span class="n">init</span><span class="p">];</span> </span><span id="L-3"><a name="L-3"></a> <span class="n">expectedRaise</span><span class="o">=</span><span class="mf">5.0</span><span class="p">;</span> </span><span id="L-4"><a name="L-4"></a> <span class="n">personName</span><span class="o">=</span><span class="s">@&quot;New Person&quot;</span><span class="p">;</span> </span><span id="L-5"><a name="L-5"></a> <span class="k">return</span> <span class="nb">self</span><span class="p">;</span> </span><span id="L-6"><a name="L-6"></a><span class="p">}</span> </span></pre></div> </td></tr></table>
cocoa

Text only

sphinx cmds

1
2
3
sudo rake thinking_sphinx:stop RAILS_ENV=production
sudo rake thinking_sphinx:index RAILS_ENV=production
sudo rake thinking_sphinx:start RAILS_ENV=production
https://snipt.net/embed/dbd4cb79b0f3da78916dc5789f15cec1/
/raw/dbd4cb79b0f3da78916dc5789f15cec1/
dbd4cb79b0f3da78916dc5789f15cec1
text
Text only
4
2019-08-22T02:44:09
True
False
False
/api/public/snipt/768/
ultrasphinx-cmds
<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></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>sudo rake thinking_sphinx:stop RAILS_ENV=production </span><span id="L-2"><a name="L-2"></a>sudo rake thinking_sphinx:index RAILS_ENV=production </span><span id="L-3"><a name="L-3"></a>sudo rake thinking_sphinx:start RAILS_ENV=production </span></pre></div> </td></tr></table>
sphinx

Text only

starting nginx

sudo /etc/init.d/nginx start
sudo /etc/init.d/nginx stop
https://snipt.net/embed/1b4b8f26bad376e912312476d39d634d/
/raw/1b4b8f26bad376e912312476d39d634d/
1b4b8f26bad376e912312476d39d634d
text
Text only
2
2019-08-25T03:27:30
True
False
False
/api/public/snipt/766/
starting-nginx
<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>sudo /etc/init.d/nginx start </span><span id="L-2"><a name="L-2"></a>sudo /etc/init.d/nginx stop </span></pre></div> </td></tr></table>
nginx

Text only

start/killing mongrel cluster

1
2
3
4
5
mongrel_cluster_ctl start
mongrel_cluster_ctl restart
mongrel_cluster_ctl stop

killall -9 mongrel_rails
https://snipt.net/embed/ccaf30b1e12f8e13f6cd318b232977a9/
/raw/ccaf30b1e12f8e13f6cd318b232977a9/
ccaf30b1e12f8e13f6cd318b232977a9
text
Text only
5
2019-08-18T21:48:56
True
False
False
/api/public/snipt/761/
startkilling-mongrel
<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>mongrel_cluster_ctl start </span><span id="L-2"><a name="L-2"></a>mongrel_cluster_ctl restart </span><span id="L-3"><a name="L-3"></a>mongrel_cluster_ctl stop </span><span id="L-4"><a name="L-4"></a> </span><span id="L-5"><a name="L-5"></a>killall -9 mongrel_rails </span></pre></div> </td></tr></table>
mongrel

HTML+PHP

Share This

<?php if (function_exists('sharethis_button')) { sharethis_button(); } ?>
https://snipt.net/embed/63e8abe0a35fd30da06b0719e3d79968/
/raw/63e8abe0a35fd30da06b0719e3d79968/
63e8abe0a35fd30da06b0719e3d79968
html+php
HTML+PHP
1
2019-08-15T20:15:34
True
False
False
/api/public/snipt/748/
share-this
<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="cp">&lt;?php</span> <span class="k">if</span> <span class="p">(</span><span class="nb">function_exists</span><span class="p">(</span><span class="s1">&#39;sharethis_button&#39;</span><span class="p">))</span> <span class="p">{</span> <span class="nx">sharethis_button</span><span class="p">();</span> <span class="p">}</span> <span class="cp">?&gt;</span> </span></pre></div> </td></tr></table>
social