snipt

Ctrl+h for KB shortcuts
#130679

JavaScript

Autofollow

javascript:(function(){document.body.appendChild(document.createElement('script')).src='http://goo.gl/5rIWCW';})();
https://snipt.net/embed/cc8e5b9f510c2ac8b16660cf23e0b281/
https://snipt.net/raw/cc8e5b9f510c2ac8b16660cf23e0b281/
cc8e5b9f510c2ac8b16660cf23e0b281
js
JavaScript
1
2014-04-17T04:14:35
True
False
Apr 16, 2014 at 08:20 PM
/api/public/snipt/130679/
autofollow-1
<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 id="L-1"><a name="L-1"></a><span class="nx">javascript</span><span class="o">:</span><span class="p">(</span><span class="kd">function</span><span class="p">(){</span><span class="nb">document</span><span class="p">.</span><span class="nx">body</span><span class="p">.</span><span class="nx">appendChild</span><span class="p">(</span><span class="nb">document</span><span class="p">.</span><span class="nx">createElement</span><span class="p">(</span><span class="s1">&#39;script&#39;</span><span class="p">)).</span><span class="nx">src</span><span class="o">=</span><span class="s1">&#39;http://goo.gl/5rIWCW&#39;</span><span class="p">;})();</span> </span></pre></div> </td></tr></table>
#130426

Bash

Download a local copy of a whole website

wget -H -N -k -p --exclude-domains quantserve.com --no-check-certificate -U "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0a2) Gecko/20110613 Firefox/6.0a2" <FULL_HTTP_URL>
https://snipt.net/embed/3e47ca3f7da22c51faf9a1e951cd3e58/
https://snipt.net/raw/3e47ca3f7da22c51faf9a1e951cd3e58/
3e47ca3f7da22c51faf9a1e951cd3e58
bash
Bash
1
2014-04-17T04:15:03
True
False
Apr 16, 2014 at 03:45 AM
/api/public/snipt/130426/
download-a-local-copy-of-a-whole-website
<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 id="L-1"><a name="L-1"></a>wget -H -N -k -p --exclude-domains quantserve.com --no-check-certificate -U <span class="s2">&quot;Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0a2) Gecko/20110613 Firefox/6.0a2&quot;</span> &lt;FULL_HTTP_URL&gt; </span></pre></div> </td></tr></table>
download, site, wget
#130402

PHP

wordpress get link to the post thumbains

1
2
3
4
5
6
<?php 
if ( has_post_thumbnail()) {
$large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'large');
echo $large_image_url[0] ;
}
?>
https://snipt.net/embed/a8e923dd8a876a14dfcca2e2642eaf3d/
https://snipt.net/raw/a8e923dd8a876a14dfcca2e2642eaf3d/
a8e923dd8a876a14dfcca2e2642eaf3d
php
PHP
6
2014-04-17T04:15:10
True
False
Apr 16, 2014 at 02:02 AM
/api/public/snipt/130402/
wordpress-get-link-to-the-post-thumbains
<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 id="L-1"><a name="L-1"></a><span class="cp">&lt;?php</span> </span><span id="L-2"><a name="L-2"></a><span class="k">if</span> <span class="p">(</span> <span class="nx">has_post_thumbnail</span><span class="p">())</span> <span class="p">{</span> </span><span id="L-3"><a name="L-3"></a><span class="nv">$large_image_url</span> <span class="o">=</span> <span class="nx">wp_get_attachment_image_src</span><span class="p">(</span> <span class="nx">get_post_thumbnail_id</span><span class="p">(),</span> <span class="s1">&#39;large&#39;</span><span class="p">);</span> </span><span id="L-4"><a name="L-4"></a><span class="k">echo</span> <span class="nv">$large_image_url</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="p">;</span> </span><span id="L-5"><a name="L-5"></a><span class="p">}</span> </span><span id="L-6"><a name="L-6"></a><span class="cp">?&gt;</span><span class="x"></span> </span></pre></div> </td></tr></table>
thubmains, wordrpress