<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Poor Man&#8217;s Pastebin</title>
	<atom:link href="http://allanmcrae.com/2012/12/poor-mans-pastebin/feed/" rel="self" type="application/rss+xml" />
	<link>http://allanmcrae.com/2012/12/poor-mans-pastebin/</link>
	<description>Still no witty tagline!</description>
	<lastBuildDate>Sat, 25 May 2013 00:06:43 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
	<item>
		<title>By: cedric</title>
		<link>http://allanmcrae.com/2012/12/poor-mans-pastebin/#comment-547</link>
		<dc:creator>cedric</dc:creator>
		<pubDate>Fri, 21 Dec 2012 09:38:44 +0000</pubDate>
		<guid isPermaLink="false">http://allanmcrae.com/?p=1665#comment-547</guid>
		<description><![CDATA[Ok, thank you!]]></description>
		<content:encoded><![CDATA[<p>Ok, thank you!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Allan</title>
		<link>http://allanmcrae.com/2012/12/poor-mans-pastebin/#comment-546</link>
		<dc:creator>Allan</dc:creator>
		<pubDate>Fri, 21 Dec 2012 08:49:52 +0000</pubDate>
		<guid isPermaLink="false">http://allanmcrae.com/?p=1665#comment-546</guid>
		<description><![CDATA[This is not a script for pastebin.com or and publicly available pastebin service.   There are plenty of those available already.

And you can pick any directory you want.  That is just where I store my web files.]]></description>
		<content:encoded><![CDATA[<p>This is not a script for pastebin.com or and publicly available pastebin service.   There are plenty of those available already.</p>
<p>And you can pick any directory you want.  That is just where I store my web files.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cedric</title>
		<link>http://allanmcrae.com/2012/12/poor-mans-pastebin/#comment-545</link>
		<dc:creator>cedric</dc:creator>
		<pubDate>Fri, 21 Dec 2012 08:37:27 +0000</pubDate>
		<guid isPermaLink="false">http://allanmcrae.com/?p=1665#comment-545</guid>
		<description><![CDATA[Thank you for the idea! I never thought to access pastebin with a script. Actually now I&#039;m thinking about
accessing other website with scripts. I&#039;m interested by your script because I could use pastebin in
the future. Just one question: why did you choose a filename of the form

mktemp ~/web/paste/XXXXXX

? Is it because it&#039;s required by pastebin ? Can&#039;t we use for example

~/web/paste/my_file

?]]></description>
		<content:encoded><![CDATA[<p>Thank you for the idea! I never thought to access pastebin with a script. Actually now I&#8217;m thinking about<br />
accessing other website with scripts. I&#8217;m interested by your script because I could use pastebin in<br />
the future. Just one question: why did you choose a filename of the form</p>
<p>mktemp ~/web/paste/XXXXXX</p>
<p>? Is it because it&#8217;s required by pastebin ? Can&#8217;t we use for example</p>
<p>~/web/paste/my_file</p>
<p>?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nameRequired</title>
		<link>http://allanmcrae.com/2012/12/poor-mans-pastebin/#comment-544</link>
		<dc:creator>nameRequired</dc:creator>
		<pubDate>Thu, 20 Dec 2012 06:30:10 +0000</pubDate>
		<guid isPermaLink="false">http://allanmcrae.com/?p=1665#comment-544</guid>
		<description><![CDATA[Oh but bash is so slow. I want moaarrr speeeed. Use C instead ;)]]></description>
		<content:encoded><![CDATA[<p>Oh but bash is so slow. I want moaarrr speeeed. Use C instead <img src='http://allanmcrae.com/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: abique</title>
		<link>http://allanmcrae.com/2012/12/poor-mans-pastebin/#comment-543</link>
		<dc:creator>abique</dc:creator>
		<pubDate>Wed, 19 Dec 2012 13:30:57 +0000</pubDate>
		<guid isPermaLink="false">http://allanmcrae.com/?p=1665#comment-543</guid>
		<description><![CDATA[I do the same with my own pastebin implementation https://github.com/abique/paste-binouse

And I have the following bash function to past:

function paste-binouse-send()
(
    host=&quot;$1&quot;
    src=&quot;$2&quot;
    temp=0

    if [[ -z &quot;$src&quot; &#124;&#124; &quot;$src&quot; = &quot;-&quot; ]] ; then
        src=$(mktemp)
        cat &gt;&quot;$src&quot;
        temp=1
    fi

    if [[ ! -r &quot;$src&quot; ]] ; then
        return
    fi

    mime_type=$(file --mime-type &quot;$src&quot; &#124; cut -f 2 -d &#039; &#039;)
    hdr=$(mktemp)
    curl -D &quot;$hdr&quot; --data-urlencode &quot;content-type=${mime_type}&quot; 
        --data-urlencode &quot;content@${src}&quot; &quot;$host&quot;

    echo &quot;$host&quot;$(sed -n &#039;s/location: (.*)/1/p&#039; &quot;$hdr&quot;)
    rm -rf &quot;$hdr&quot;
    if [[ $temp -eq 1 ]] ; then
        rm -f &quot;$src&quot;
    fi
)]]></description>
		<content:encoded><![CDATA[<p>I do the same with my own pastebin implementation <a href="https://github.com/abique/paste-binouse" rel="nofollow">https://github.com/abique/paste-binouse</a></p>
<p>And I have the following bash function to past:</p>
<p>function paste-binouse-send()<br />
(<br />
    host=&#8221;$1&#8243;<br />
    src=&#8221;$2&#8243;<br />
    temp=0</p>
<p>    if [[ -z "$src" || "$src" = "-" ]] ; then<br />
        src=$(mktemp)<br />
        cat &gt;&#8221;$src&#8221;<br />
        temp=1<br />
    fi</p>
<p>    if [[ ! -r "$src" ]] ; then<br />
        return<br />
    fi</p>
<p>    mime_type=$(file &#8211;mime-type &#8220;$src&#8221; | cut -f 2 -d &#8216; &#8216;)<br />
    hdr=$(mktemp)<br />
    curl -D &#8220;$hdr&#8221; &#8211;data-urlencode &#8220;content-type=${mime_type}&#8221;<br />
        &#8211;data-urlencode &#8220;content@${src}&#8221; &#8220;$host&#8221;</p>
<p>    echo &#8220;$host&#8221;$(sed -n &#8216;s/location: (.*)/1/p&#8217; &#8220;$hdr&#8221;)<br />
    rm -rf &#8220;$hdr&#8221;<br />
    if [[ $temp -eq 1 ]] ; then<br />
        rm -f &#8220;$src&#8221;<br />
    fi<br />
)</p>
]]></content:encoded>
	</item>
</channel>
</rss>
