<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Snipplr - scarfboy</title>
<link>http://snipplr.com/users/scarfboy</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Sun, 26 May 2013 17:11:26 GMT</pubDate>
<item>
<title>(Bash) Summarize TCP socket states (using netstat)</title>
<link>http://snipplr.com/view/7832/summarize-tcp-socket-states-using-netstat/</link>
<description><![CDATA[ <p>Filters for tcp and tcp6 lines, so omits udp and unix sockets.

Information is gathered from /proc; this uses netstat mainly to format it.

Gives output like:     21 tcp LISTEN
     12 tcp ESTABLISHED
      7 tcp6 LISTEN
      1 tcp TIME_WAIT</p> ]]></description>
<pubDate>Tue, 12 Aug 2008 10:08:34 GMT</pubDate>
<guid>http://snipplr.com/view/7832/summarize-tcp-socket-states-using-netstat/</guid>
</item>
<item>
<title>(Bash) bash lines for simple statistics on SSH break-in attempts</title>
<link>http://snipplr.com/view/7675/bash-lines-for-simple-statistics-on-ssh-breakin-attempts/</link>
<description><![CDATA[ <p>Assumes logs are in /var/log/sshd/* and makes a few text format assumptions that probably make this specific to OpenSSH.

Simple, but more than you can see from a quick less.</p> ]]></description>
<pubDate>Sat, 02 Aug 2008 12:50:13 GMT</pubDate>
<guid>http://snipplr.com/view/7675/bash-lines-for-simple-statistics-on-ssh-breakin-attempts/</guid>
</item>
<item>
<title>(CSS) slightly lowered inline icons</title>
<link>http://snipplr.com/view/7356/slightly-lowered-inline-icons/</link>
<description><![CDATA[ <p>Icons placed in text usually look like they jut upwards. A little negative vertical-align will put these images roughly in the ascender-to-descender space.

Simple and sort of stupid, but probably still useful to know.</p> ]]></description>
<pubDate>Thu, 17 Jul 2008 07:17:28 GMT</pubDate>
<guid>http://snipplr.com/view/7356/slightly-lowered-inline-icons/</guid>
</item>
<item>
<title>(Python) remove diacritics</title>
<link>http://snipplr.com/view/7355/remove-diacritics/</link>
<description><![CDATA[ <p>Useful when creating canonical forms of strings for indexing.</p> ]]></description>
<pubDate>Thu, 17 Jul 2008 06:51:47 GMT</pubDate>
<guid>http://snipplr.com/view/7355/remove-diacritics/</guid>
</item>
<item>
<title>(Python) Get Home directory path  in Python (win, lin, other?)</title>
<link>http://snipplr.com/view/7354/get-home-directory-path--in-python-win-lin-other/</link>
<description><![CDATA[ <p>The current user's home directory is probably the easiest way to get a writeable directory, and expanduser does the sensible thing on various OSes. 

In case of windows, you can choose to be smarter about *which* directory you pick.</p> ]]></description>
<pubDate>Thu, 17 Jul 2008 06:48:25 GMT</pubDate>
<guid>http://snipplr.com/view/7354/get-home-directory-path--in-python-win-lin-other/</guid>
</item>
<item>
<title>(JavaScript) Javascript add-to-bookmarks (Firefox, IE)</title>
<link>http://snipplr.com/view/7351/javascript-addtobookmarks-firefox-ie/</link>
<description><![CDATA[ <p>There is no standard for this at all - this just looks for the hooks that exist in IE and gecko-type browsers.
See also http://msdn.microsoft.com/en-us/library/ms535926(VS.85).aspx and http://developer.mozilla.org/en/docs/DOM:window.sidebar</p> ]]></description>
<pubDate>Thu, 17 Jul 2008 06:40:45 GMT</pubDate>
<guid>http://snipplr.com/view/7351/javascript-addtobookmarks-firefox-ie/</guid>
</item>
<item>
<title>(JavaScript) Javascript  array member tests</title>
<link>http://snipplr.com/view/7349/javascript--array-member-tests/</link>
<description><![CDATA[ <p>Given:
`a=['1',2,6];`

Allows things like:  
`
  a.contains(2); //true  
  '1'.in(a);  
  (1).in(a,true); //type not identical, so false  
  (1).in(a);      //no type check, so true  
`  
  
I never actually used this, it was more of an exercise in playing with JS.</p> ]]></description>
<pubDate>Thu, 17 Jul 2008 06:34:58 GMT</pubDate>
<guid>http://snipplr.com/view/7349/javascript--array-member-tests/</guid>
</item>
<item>
<title>(JavaScript) Javascript  set(-of-string) functions</title>
<link>http://snipplr.com/view/7348/javascript--setofstring-functions/</link>
<description><![CDATA[ <p>Exploits hash keys uniqueness, but in doing so effectively toString()s everything, meaning this should not be used for much beyond strings and perhaps integers.

I used this when I wanted to do some client-side filtering of (integer) identifiers.</p> ]]></description>
<pubDate>Thu, 17 Jul 2008 06:31:03 GMT</pubDate>
<guid>http://snipplr.com/view/7348/javascript--setofstring-functions/</guid>
</item>
</channel>
</rss>