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
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
<?xml-stylesheet type="text/xsl" href="/webservices/catalog/xsl/searchRetrieveResponse.xsl"?> | |
<searchRetrieveResponse xmlns="http://www.loc.gov/zing/srw/" xmlns:oclcterms="http://purl.org/oclc/terms/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:diag="http://www.loc.gov/zing/srw/diagnostic/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | |
<version>1.1</version> | |
<numberOfRecords>801</numberOfRecords> | |
<records> | |
<record> | |
<recordSchema>marcxml</recordSchema> | |
<recordPacking>xml</recordPacking> |
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
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
<?xml-stylesheet type="text/xsl" href="/webservices/catalog/xsl/searchRetrieveResponse.xsl"?> | |
<searchRetrieveResponse xmlns="http://www.loc.gov/zing/srw/" xmlns:oclcterms="http://purl.org/oclc/terms/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:diag="http://www.loc.gov/zing/srw/diagnostic/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | |
<version>1.1</version> | |
<numberOfRecords>33587</numberOfRecords> | |
<records> | |
<record> | |
<recordSchema>info:srw/schema/1/dc</recordSchema> | |
<recordPacking>xml</recordPacking> |
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
# A tiny Ruby API for the AlloURL service. | |
# | |
# Author: Vivien 'v0n' Didelot <vivien.didelot@gmail.com> | |
require 'open-uri' | |
module AlloURL | |
module_function | |
# Retrieves the link encapsulated in the AlloURL +url+. |
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
# Simple and Stupid Ruby API for Coderwall.com | |
# Vivien Didelot <vivien@didelot.org> | |
require "open-uri" | |
require "json" | |
module CoderWall | |
class Achievement | |
attr_reader :name, :badge, :description |
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 | |
require "mail" | |
require "optparse" | |
imap_opts = { | |
:address => "imap.gmail.com", | |
:port => 993, | |
:enable_ssl => true | |
} |
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
def insert_into file, lineno, text | |
new_text = File.readlines(file).insert(lineno, text + "\n").join | |
File.open(file, 'w') { |f| f.write new_text } | |
end |
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
task :first, :arg1, :arg2 do |t, args| | |
puts "first" | |
Rake::Task[:second].invoke(args.arg1, args.arg2) | |
end | |
task :second, :arg1, :arg2 do |t, args| | |
puts "second" | |
puts args.arg1 | |
puts args.arg2 | |
end |
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
require 'coderay' | |
class CodeRay::Tokens | |
def each_token | |
lineno = 1 | |
self.each_slice(2) do |token, kind| | |
yield token, kind, lineno | |
lineno += token.count("\n") if token.is_a?(String) | |
end | |
end |
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 | |
# An approximative Wikipedia/Mechanize version of: | |
# curl -s http://data.iana.org/TLD/tlds-alpha-by-domain.txt | grep -v XN | sed -e 1d -e 's/\(.*\)/\L\1/' | |
# Vivien Didelot <vivien@didelot.org> | |
require 'mechanize' | |
wikipedia_page = "http://en.wikipedia.org/wiki/List_of_Internet_top-level_domains" | |
agent = Mechanize.new |
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
# Bash completion support for Fossil. | |
# It is based on the Git Bash completion file. | |
# It best fits in /etc/bash_completion.d/fossil | |
# | |
# Copyright (C) 2011 Vivien Didelot <vivien@didelot.org> | |
# This file is distributed under the same terms as the license of the Fossil project. | |
# | |
# This file contains routine to change your PS1, and helper functions. | |
# | |
# For instance, add those options to your bashrc to customize PS1: |
OlderNewer