snipt

Ctrl+h for KB shortcuts

Bash

start unicorn server

$ [email protected]:/home/web/somlor.com/private$ unicorn -c unicorn.rb -D
https://snipt.net/embed/1f6b66e754ec990517775d4472836246/
/raw/1f6b66e754ec990517775d4472836246/
1f6b66e754ec990517775d4472836246
bash
Bash
1
2019-06-10T11:09:53
True
False
False
/api/public/snipt/55113/
start-unicorn-server
<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>$ [email protected]:/home/web/somlor.com/private$ unicorn -c unicorn.rb -D </span></pre></div> </td></tr></table>
bash, linux, rails, ruby, server, sinatra, ubuntu, unicorn, webdev

Ruby

Config.ru for my homesite

1
2
3
4
require 'rubygems'
require 'application.rb'

run Sinatra::Application
https://snipt.net/embed/76b52597271bbcc6ad256fe3aa231095/
/raw/76b52597271bbcc6ad256fe3aa231095/
76b52597271bbcc6ad256fe3aa231095
rb
Ruby
4
2019-06-11T22:09:33
True
False
False
/api/public/snipt/14854/
configru-for-my-homesite
<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="nb">require</span> <span class="s1">&#39;rubygems&#39;</span> </span><span id="L-2"><a name="L-2"></a><span class="nb">require</span> <span class="s1">&#39;application.rb&#39;</span> </span><span id="L-3"><a name="L-3"></a> </span><span id="L-4"><a name="L-4"></a><span class="n">run</span> <span class="no">Sinatra</span><span class="o">::</span><span class="no">Application</span> </span></pre></div> </td></tr></table>
config.ru, rack, ruby, sinatra

Ruby

my first looking sinatra

1
2
3
4
5
6
# myapp.rb
  require 'rubygems'
  require 'sinatra'
  get '/' do
    'Say Helloo .... to My Heroku..'
  end
https://snipt.net/embed/e598a77749bea865485e1389facde636/
/raw/e598a77749bea865485e1389facde636/
e598a77749bea865485e1389facde636
rb
Ruby
6
2019-05-31T11:53:48
True
False
False
/api/public/snipt/7587/
my-first-looking-sinatra
<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="c1"># myapp.rb</span> </span><span id="L-2"><a name="L-2"></a> <span class="nb">require</span> <span class="s1">&#39;rubygems&#39;</span> </span><span id="L-3"><a name="L-3"></a> <span class="nb">require</span> <span class="s1">&#39;sinatra&#39;</span> </span><span id="L-4"><a name="L-4"></a> <span class="n">get</span> <span class="s1">&#39;/&#39;</span> <span class="k">do</span> </span><span id="L-5"><a name="L-5"></a> <span class="s1">&#39;Say Helloo .... to My Heroku..&#39;</span> </span><span id="L-6"><a name="L-6"></a> <span class="k">end</span> </span></pre></div> </td></tr></table>
sinatra