This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Start the sample server. This server alternates between responding with 100-continue and | |
# resopnding with a 403 Forbidden. The client **should** be able to handle both responses. | |
$ ruby server.rb | |
# In another terminal window, run the client code twice. The first invocation will succeed. | |
# The second invocation will fail the client with an error. | |
$ ruby client.rb | |
$ ruby client.rb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# see https://github.com/sparklemotion/nokogiri/issues/1200 | |
require 'nokogiri' | |
src =<<EOD | |
<wrapper xmlns="ns"> | |
<record xml:id="r1" xmlns:extra="extra"> | |
<field>aaa</field> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
original code by cogitom: https://gist.github.com/997980/ | |
phibo23: https://gist.github.com/2808256/ | |
This script reads future events (plus several days into the past) from Facebook pages | |
and creates a subscribable iCalendar | |
Improvements upon the original version: | |
- avoid setting DTEND field if facebook event lacks an end time |