snipt

Ctrl+h for KB shortcuts

Python 3

Everyone else

1
2
3
for i in range(6883597524):
    Bob = PeopleOnInternet()
    Bob.start()
https://snipt.net/embed/899e3163a9124c1206d5e177813ab94b/
/raw/899e3163a9124c1206d5e177813ab94b/
899e3163a9124c1206d5e177813ab94b
python3
Python 3
3
2019-08-19T04:50:04
True
False
False
/api/public/snipt/21578/
everyone-else
<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><span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">6883597524</span><span class="p">):</span> </span><span id="L-2"><a name="L-2"></a> <span class="n">Bob</span> <span class="o">=</span> <span class="n">PeopleOnInternet</span><span class="p">()</span> </span><span id="L-3"><a name="L-3"></a> <span class="n">Bob</span><span class="o">.</span><span class="n">start</span><span class="p">()</span> </span></pre></div> </td></tr></table>
internet, people

CSS

IE6+7 Selectors

* html #selector {property:value;} /* Only IE6 and lower will see this */
*+html #selector {property:value;} /* Only IE7 will see this */
https://snipt.net/embed/946ef512b91b90b3b0a355b6a9aeae8d/
/raw/946ef512b91b90b3b0a355b6a9aeae8d/
946ef512b91b90b3b0a355b6a9aeae8d
css
CSS
2
2019-08-24T01:17:55
True
False
False
/api/public/snipt/4689/
ie67-selectors
<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">*</span> <span class="nt">html</span> <span class="nn">#selector</span> <span class="p">{</span><span class="n">property</span><span class="o">:</span><span class="n">value</span><span class="p">;}</span> <span class="c">/* Only IE6 and lower will see this */</span> </span><span id="L-2"><a name="L-2"></a><span class="o">*+</span><span class="nt">html</span> <span class="nn">#selector</span> <span class="p">{</span><span class="n">property</span><span class="o">:</span><span class="n">value</span><span class="p">;}</span> <span class="c">/* Only IE7 will see this */</span> </span></pre></div> </td></tr></table>
css, explorer, ie, internet, selectors

Bash

Use your iPhone's 3G to connect Internet

1
2
3
4
5
6
7
8
// 1. Create an Ad-HOC wireless network over Airport
// 2. Connect iPhone to this network
// 3. ssh to iPhone using following snippet

ssh -ND 9999 [email protected]_ADDRESS

// 4. set your browsers socks proxy to localhost:9999
// Done.
https://snipt.net/embed/d21570de5ffdc838cc09e047ce60eb31/
/raw/d21570de5ffdc838cc09e047ce60eb31/
d21570de5ffdc838cc09e047ce60eb31
bash
Bash
8
2019-08-24T14:48:08
True
False
False
/api/public/snipt/3333/
use-your-iphones-3g-to-connect-internet
<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> <a href="#L-7">7</a> <a href="#L-8">8</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>// 1. Create an Ad-HOC wireless network over Airport </span><span id="L-2"><a name="L-2"></a>// 2. Connect iPhone to this network </span><span id="L-3"><a name="L-3"></a>// 3. ssh to iPhone using following snippet </span><span id="L-4"><a name="L-4"></a> </span><span id="L-5"><a name="L-5"></a>ssh -ND <span class="m">9999</span> [email protected]_ADDRESS </span><span id="L-6"><a name="L-6"></a> </span><span id="L-7"><a name="L-7"></a>// 4. <span class="nb">set</span> your browsers socks proxy to localhost:9999 </span><span id="L-8"><a name="L-8"></a>// Done. </span></pre></div> </td></tr></table>
3g, bash, internet, iphone, ssh, unix

Text only

Downloads with Progress Bar

1
2
3
4
5
6
7
8
[void] /[Reflection.Assembly]::LoadWithPartialName('Microsoft.VisualBasic')
$url = 'http://download.microsoft.com/download/4/7/1/47104ec6-410d-4492-890b-2a34900c9df2/Workshops-EN.zip'
$local = "$home\powershellworkshop.zip"
$object = New-Object Microsoft.VisualBasic.Devices.Network
$object.DownloadFile($url, $local, '', '', $true, 500, $true, 'DoNothing')


http://powershell.com/cs/blogs/tips/archive/2008/12/02/downloads-with-progress-bar.aspx
https://snipt.net/embed/65bd6e3fccd7f03a05897dda1d8360e5/
/raw/65bd6e3fccd7f03a05897dda1d8360e5/
65bd6e3fccd7f03a05897dda1d8360e5
text
Text only
8
2019-08-22T13:00:37
True
False
False
/api/public/snipt/1596/
downloads-with-progress-bar
<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> <a href="#L-7">7</a> <a href="#L-8">8</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>[void] /[Reflection.Assembly]::LoadWithPartialName(&#39;Microsoft.VisualBasic&#39;) </span><span id="L-2"><a name="L-2"></a>$url = &#39;http://download.microsoft.com/download/4/7/1/47104ec6-410d-4492-890b-2a34900c9df2/Workshops-EN.zip&#39; </span><span id="L-3"><a name="L-3"></a>$local = &quot;$home\powershellworkshop.zip&quot; </span><span id="L-4"><a name="L-4"></a>$object = New-Object Microsoft.VisualBasic.Devices.Network </span><span id="L-5"><a name="L-5"></a>$object.DownloadFile($url, $local, &#39;&#39;, &#39;&#39;, $true, 500, $true, &#39;DoNothing&#39;) </span><span id="L-6"><a name="L-6"></a> </span><span id="L-7"><a name="L-7"></a> </span><span id="L-8"><a name="L-8"></a>http://powershell.com/cs/blogs/tips/archive/2008/12/02/downloads-with-progress-bar.aspx </span></pre></div> </td></tr></table>
gui, internet, ps

Ruby

Read contents from a url

1
2
3
require 'open-uri'
puts open('http://digg.com/rss/index.xml',
     'User-Agent' => 'Ruby-Wget').read
https://snipt.net/embed/5608d245b6a6c55af1ee36fb74f5a8b6/
/raw/5608d245b6a6c55af1ee36fb74f5a8b6/
5608d245b6a6c55af1ee36fb74f5a8b6
rb
Ruby
3
2019-08-24T10:09:41
True
False
False
/api/public/snipt/1410/
read-contents-from-a-url
<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><span class="nb">require</span> <span class="s1">&#39;open-uri&#39;</span> </span><span id="L-2"><a name="L-2"></a><span class="nb">puts</span> <span class="nb">open</span><span class="p">(</span><span class="s1">&#39;http://digg.com/rss/index.xml&#39;</span><span class="p">,</span> </span><span id="L-3"><a name="L-3"></a> <span class="s1">&#39;User-Agent&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;Ruby-Wget&#39;</span><span class="p">)</span><span class="o">.</span><span class="n">read</span> </span></pre></div> </td></tr></table>
internet, ruby