Skip to content

Instantly share code, notes, and snippets.

View jsuwo's full-sized avatar

Jeff Shantz jsuwo

View GitHub Profile
@jsuwo
jsuwo / README.md
Last active December 23, 2015 07:09

Working with Ruby on the MC 10 systems

While it is possible to install Ruby on a system-wide basis, it is much more common amongst the Ruby community to use a tool called rvm (Ruby Version Manager) to build and install Ruby and to manage the installation of Ruby gems (libraries). This tutorial will get you started with RVM on the MC 10 systems.

Prerequisites

This tutorial assumes:

  • You are working on one of the Linux systems in MC 10. Do not attempt this on obelix.
  • You have at least 100 - 200 MB of free space in your GAUL account, depending on the Ruby gems that you install. You have at least 1 GB of quota, so this shouldn't be much of a hardship for you. If you need more quota to make this work, contact Jeff at [x@y, where x = jeff, y = csd.uwo.ca].
@jsuwo
jsuwo / LEXT640.PPD
Created October 30, 2013 18:04
PPD file for the Lexmark T640 printer.
*PPD-Adobe: "4.3"
*%
*% For information on using this, and to obtain the required backend
*% script, consult http://www.openprinting.org/
*%
*% This file is published under the GNU General Public License
*%
*% PPD-O-MATIC (4.0.0 or newer) generated this PPD file. It is for use with
*% all programs and environments which use PPD files for dealing with
*% printer capability information. The printer must be configured with the
@jsuwo
jsuwo / LEXT620.PPD
Created October 30, 2013 18:05
PPD file for the Lexmark T620 printer.
*PPD-Adobe: "4.3"
*% Adobe PostScript(R) Printer Description File
*% For Lexmark T620 Laser Printers
*% Produced by Lexmark International, Inc.
*%
*% For use with Adobe PostScript Driver ver 3.0.1 or similar printer drivers
*%
*% Copyright (c) 1993-2001 Lexmark International Inc. All Rights Reserved.
*% Permission is granted for redistribution of this file as
*% long as this copyright notice is intact and the content
@jsuwo
jsuwo / XRX8860.PPD
Created October 30, 2013 18:07
PPD file for the Xerox Phaser 8860 printer.
*PPD-Adobe: "4.3"
*% Xerox Corporation (R) Printer Description File
*% Copyright Xerox Corporation
*% Copyright Adobe Systems, Inc.
*% All Rights Reserved.
*% Date: 07/09/07
*% OPB Build Number: 1.0.4
*% PPD for Windows PPD Only Driver, English
*FormatVersion: "4.3"
*FileVersion: "1.0"
@jsuwo
jsuwo / LEXT644.PPD
Created October 30, 2013 18:11
PPD file for the Lexmark T644 printer.
*PPD-Adobe: "4.3"
*%******************************************************************************
*% Adobe PostScript(R) Printer Description File
*% For Lexmark T644
*% Produced by Lexmark International, Inc.
*%
*% Copyright (c) 2005 Lexmark International Inc. All Rights Reserved.
*% Permission is granted for redistribution of this file as
*% long as this copyright notice is intact and the content
@jsuwo
jsuwo / LEXT630.PPD
Last active December 27, 2015 00:19
PPD file for the Lexmark T630 printer.
*PPD-Adobe: "4.3"
*% Adobe PostScript(R) Printer Description File
*% For Lexmark T630 Laser Printers
*% Produced by Lexmark International, Inc.
*%
*% For use with Adobe (formerly Aldus) PageMaker
*%
*% WARNING: If you edit this file and use it with PageMaker, be sure to
*% use an editor (such as DOS Edit) that does NOT add an end-of-file
*% marker (hex 1A) when it stores the file
@jsuwo
jsuwo / LEXT650.PPD
Created October 30, 2013 18:15
PPD file for the Lexmark T650 printer.
*PPD-Adobe: "4.3"
*% PPD file for Lexmark T650 with CUPS.
*% Created by the CUPS PPD Compiler v1.2.3.
*%
*% Adobe PostScript(R) Printer Description File
*%
*% start_copyright
*% Produced by Lexmark International, Inc.
*%
*%
@jsuwo
jsuwo / RegexMatchingExample.md
Last active December 27, 2015 00:39
Output of the regular expression matching example
$ cat test.xml | ruby -e "puts ARGF.read.scan(/<article-title>(.*?)<\/article-title>/m).flatten.map { |title| title.gsub(/\s+/, ' ') }" | wc -l 

      78

$ cat test.xml | ruby -e "puts ARGF.read.scan(/<article-title>(.*?)<\/article-title>/m).flatten.map { |title| title.gsub(/\s+/, ' ') }"

Chemical Approaches To Perturb, Profile, and Perceive Glycans
On the frequency of protein glycosylation, as deduced from analysis of the SWISS-PROT database
Annotation of glycoproteins in the SWISS-PROT database
# This script can be run using any of the following:
#
# ruby RegexMatchingExampleExplained.rb < file1.xml
# cat file1.xml file2.xml file3.xml | ruby RegexMatchingExampleExplained.rb
# ruby RegexMatchingExampleExplained.rb file1.xml file2.xml file3.xml
#
# Read everything from standard input or from files specified as command line arguments
content = ARGF.read
@jsuwo
jsuwo / XmlParsingExample.md
Last active December 27, 2015 00:39
Output of the XML parsing example
$ cat test.xml | ruby -r nokogiri -e "puts Nokogiri::XML(ARGF.read).xpath('//article-title').map { |t| t.content.gsub(/\s+/, ' ') }" | wc -l

      78
      
$ cat test.xml | ruby -r nokogiri -e "puts Nokogiri::XML(ARGF.read).xpath('//article-title').map { |t| t.content.gsub(/\s+/, ' ') }"

Chemical Approaches To Perturb, Profile, and Perceive Glycans
On the frequency of protein glycosylation, as deduced from analysis of the SWISS-PROT database
Annotation of glycoproteins in the SWISS-PROT database