snipt

Ctrl+h for KB shortcuts

Bash

Completely flush iptables

1
2
3
4
5
# Source: https://serverfault.com/a/200642/88004

iptables-save | awk '/^[*]/ { print $1 } 
                     /^:[A-Z]+ [^-]/ { print $1 " ACCEPT" ; }
                     /COMMIT/ { print $0; }' | iptables-restore
https://snipt.net/embed/4255fdb928925407842a67e46c64fc17/
https://snipt.net/raw/4255fdb928925407842a67e46c64fc17/
4255fdb928925407842a67e46c64fc17
bash
Bash
5
2016-06-25T17:18:19
True
False
False
Jun 22, 2016 at 10:17 AM
/api/public/snipt/147274/
completely-flush-iptables
<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 id="L-1"><a name="L-1"></a><span class="c"># Source: https://serverfault.com/a/200642/88004</span> </span><span id="L-2"><a name="L-2"></a> </span><span id="L-3"><a name="L-3"></a>iptables-save <span class="p">|</span> awk <span class="s1">&#39;/^[*]/ { print $1 } </span> </span><span id="L-4"><a name="L-4"></a><span class="s1"> /^:[A-Z]+ [^-]/ { print $1 &quot; ACCEPT&quot; ; }</span> </span><span id="L-5"><a name="L-5"></a><span class="s1"> /COMMIT/ { print $0; }&#39;</span> <span class="p">|</span> iptables-restore </span></pre></div> </td></tr></table>
iptables

C#

1

1
https://snipt.net/embed/76fa120b9edf81c4c7ebea7c277672cb/
https://snipt.net/raw/76fa120b9edf81c4c7ebea7c277672cb/
76fa120b9edf81c4c7ebea7c277672cb
csharp
C#
1
2016-06-25T17:18:15
True
False
False
/api/public/snipt/147272/
pmthirdpersoncharacter
<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="m">1</span> </span></pre></div> </td></tr></table>
"Work in Progress", Playmaker

Text only

Ionic Disable back button

1
2
3
4
5
$ionicHistory.nextViewOptions({
  disableBack: true,
  disableAnimate: true
});
$state.go('app.home');
https://snipt.net/embed/b8571b32a28c397df7834852239ac1f5/
https://snipt.net/raw/b8571b32a28c397df7834852239ac1f5/
b8571b32a28c397df7834852239ac1f5
text
Text only
6
2016-06-25T17:18:14
True
False
False
Jun 22, 2016 at 12:22 AM
/api/public/snipt/147270/
ionic-disable-back-button
<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 id="L-1"><a name="L-1"></a>$ionicHistory.nextViewOptions({ </span><span id="L-2"><a name="L-2"></a> disableBack: true, </span><span id="L-3"><a name="L-3"></a> disableAnimate: true </span><span id="L-4"><a name="L-4"></a>}); </span><span id="L-5"><a name="L-5"></a>$state.go(&#39;app.home&#39;); </span></pre></div> </td></tr></table>
ionic
Copyrighted, illegal, or inappropriate content? Email support@snipt.net.