This file contains hidden or 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
// Settings in here override those in "Default/Preferences.sublime-settings", and | |
// are overridden in turn by file type specific settings. | |
{ | |
"tab_size": 2, | |
"translate_tabs_to_spaces": true, | |
"default_line_ending": "unix", | |
"highlight_line": true, | |
"word_wrap": "true", | |
"font_size": 12 | |
} |
This file contains hidden or 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
# -*- encoding: utf-8 -*- | |
require 'mini_magick' | |
require 'rtesseract' | |
require 'nokogiri' | |
require 'nestful' | |
require 'csv' | |
require 'pp' | |
class Buy360 | |
def initialize(url='') |
This file contains hidden or 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
# It works for pure text only. It will fail for html and url type of text. | |
# http://henrik.nyh.se/2007/03/ruby-wordwrap-method | |
def wrap_long_string(text,max_width = 20, separator = "\n") | |
(text.length < max_width) ? | |
text : | |
text.scan(/.{1,#{max_width}}/).join(separator) | |
end |
This file contains hidden or 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 | |
ARGV[1..-1].each do |file| | |
puts file | |
`#{ARGV[0]} #{file}` | |
end | |
# Example | |
# ./batch_run.rb "tar zxvf" refseq_genomic.*.gz |
This file contains hidden or 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 | |
# | |
# Wubin Qu <[email protected]> | |
require 'fileutils' | |
module Biodb | |
module DbProcess | |
attr_reader :ftp_address, :dir | |
attr_accessor :available_dbs |
This file contains hidden or 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 | |
# | |
# Wubin Qu <[email protected]> | |
# | |
if ARGV.size != 1 | |
$stderr.puts " | |
Remove blank lines and leading ^M characters | |
Usage: |
NewerOlder