Snipt.net is closing on December 31st, 2016

For more information, please visit this blog post.

snipt

Ctrl+h for KB shortcuts

Text only

Use Google Chrome Console to reveal an Instagram User ID

window.sharedData.entrydata.ProfilePage[0].user.id
https://snipt.net/embed/b5dc86ca8f89ac3d6eadbf186d15bb43/
https://snipt.net/raw/b5dc86ca8f89ac3d6eadbf186d15bb43/
b5dc86ca8f89ac3d6eadbf186d15bb43
text
Text only
1
2016-12-08T14:51:44
True
False
False
Jun 08, 2016 at 12:28 AM
/api/public/snipt/147147/
use-google-chrome-console-to-reveal-an-instagram-user-id
<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>window.sharedData.entrydata.ProfilePage[0].user.id </span></pre></div> </td></tr></table>
Instagram, UserID, console

Bash

AWK timestamp each line

<cmd> | awk '{ print strftime("%Y-%m-%d %H:%M:%S"), $0; fflush(); }'
https://snipt.net/embed/3c95a0173f04f01070d3df97f8aa825b/
https://snipt.net/raw/3c95a0173f04f01070d3df97f8aa825b/
3c95a0173f04f01070d3df97f8aa825b
bash
Bash
1
2016-12-09T15:22:53
True
False
False
Mar 25, 2016 at 06:05 PM
/api/public/snipt/144950/
awk-timestamp-each-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>&lt;cmd&gt; <span class="p">|</span> awk <span class="s1">&#39;{ print strftime(&quot;%Y-%m-%d %H:%M:%S&quot;), $0; fflush(); }&#39;</span> </span></pre></div> </td></tr></table>
awk, bash, console, timestamp

Ruby

rails > get database configuration in console

Rails.configuration.database_configuration[Rails.env]
https://snipt.net/embed/90c39f5db690e5e18279fba23522d68b/
https://snipt.net/raw/90c39f5db690e5e18279fba23522d68b/
90c39f5db690e5e18279fba23522d68b
rb
Ruby
1
2016-12-08T15:37:20
True
False
False
/api/public/snipt/138105/
rails-get-database-configuration-in-console-8e5451d2
<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="no">Rails</span><span class="o">.</span><span class="n">configuration</span><span class="o">.</span><span class="n">database_configuration</span><span class="o">[</span><span class="no">Rails</span><span class="o">.</span><span class="n">env</span><span class="o">]</span> </span></pre></div> </td></tr></table>
console, database, rails, ruby

Ruby

activerecord > current database and tables

> ActiveRecord::Base.connection.current_database
> ActiveRecord::Base.connection.tables
https://snipt.net/embed/262b148fa0ff82559a980bb10c659a4e/
https://snipt.net/raw/262b148fa0ff82559a980bb10c659a4e/
262b148fa0ff82559a980bb10c659a4e
rb
Ruby
2
2016-12-09T04:53:11
True
False
False
/api/public/snipt/117401/
activerecord-current-database
<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="o">&gt;</span> <span class="no">ActiveRecord</span><span class="o">::</span><span class="no">Base</span><span class="o">.</span><span class="n">connection</span><span class="o">.</span><span class="n">current_database</span> </span><span id="L-2"><a name="L-2"></a><span class="o">&gt;</span> <span class="no">ActiveRecord</span><span class="o">::</span><span class="no">Base</span><span class="o">.</span><span class="n">connection</span><span class="o">.</span><span class="n">tables</span> </span></pre></div> </td></tr></table>
console, database, rails, ruby

Bash Session

Show hidden folders in mac OSX

Defaults write com.apple.finder AppleShowAllFiles TRUE
Killall FInder
https://snipt.net/embed/21e8099ab0ff222e01be15e4cb6f1f82/
https://snipt.net/raw/21e8099ab0ff222e01be15e4cb6f1f82/
21e8099ab0ff222e01be15e4cb6f1f82
shell-session
Bash Session
2
2016-12-09T11:31:23
True
False
False
Jan 31, 2014 at 12:28 PM
/api/public/snipt/109941/
show-hidden-folders-in-mac-osx
<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="go">Defaults write com.apple.finder AppleShowAllFiles TRUE</span> </span><span id="L-2"><a name="L-2"></a><span class="go">Killall FInder</span> </span></pre></div> </td></tr></table>
console, mac, terminal

Bash Session

Colorize console for git

git config --global color.ui true
https://snipt.net/embed/99042d201bbce5a6dc3a670d1ec83389/
https://snipt.net/raw/99042d201bbce5a6dc3a670d1ec83389/
99042d201bbce5a6dc3a670d1ec83389
shell-session
Bash Session
1
2016-12-07T04:51:47
True
False
False
Sep 27, 2013 at 01:48 PM
/api/public/snipt/83653/
colorize-console-for-git
<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="go">git config --global color.ui true</span> </span></pre></div> </td></tr></table>
color, colorscheme, console, git, terminal
Copyrighted, illegal, or inappropriate content? Email [email protected].