Skip to content

Instantly share code, notes, and snippets.

View coryschires's full-sized avatar
💭
Code King

Cory Schires coryschires

💭
Code King
View GitHub Profile
@coryschires
coryschires / example-jats-citation.xml
Created April 17, 2024 21:36
JATS citation example
<citation-alternatives>
  <element-citation publication-type="article-journal">
    <article-title>Daratumumab, a Novel Therapeutic Human CD38 Monoclonal Antibody, Induces Killing of Multiple Myeloma and Other Hematological Tumors</article-title>
    <source>The Journal of Immunology</source>
    <person-group person-group-type="author">
      <name>
        <surname>de Weers</surname>
        <given-names>Michel</given-names>
      </name>
      <name>
@coryschires
coryschires / moment-timezone-data.js
Created August 14, 2013 22:04
TZInfo mapping between Rails and moment.js
moment.tz.add({
"zones": {
"Africa/Algiers": [
"0:12:12 - LMT 1891_2_15_0_1 0:12:12",
"0:9:21 - PMT 1911_2_11 0:9:21",
"0 Algeria WE%sT 1940_1_25_2",
"1 Algeria CE%sT 1946_9_7 1",
"0 - WET 1956_0_29",
"1 - CET 1963_3_14 1",
"0 Algeria WE%sT 1977_9_21 1",
@coryschires
coryschires / test.rb
Created August 4, 2013 22:35
Test gist
def height
rows_in_legend = (editors.size.to_f / 6.to_f).ceil
case rows_in_legend
when 1 then 580
when 2 then 722
when 3 then 870
when 4 then 1020
else 1160
end
end
file_field.fileupload
dataType: 'xml'
fileInput: file_input
url: "#{document.location.protocol}//s3.amazonaws.com/#{opts.as3.bucket}"
add: (e, data) ->
data_context = data
file_name_wrapper.show().text(get_file_name(data)) if file_valid(data)
send: (e, data) ->
file_name_wrapper.fadeOut 300, -> progress_bar.fadeIn()
progress: (e, data) ->
# Assumes your `days` method will return an array of hashes where the
# key specifies the month number (i.e. 1-12) and the value is an array
# containing the days of the month (i.e. 1-31) when the streets will
# be cleaned.
#
# Following that scheme then your data might looks something like:
#
# [
# 1: [7, 8], # January 7th and 8th
# 2: [2, 4],
# Assumes your `days` method will return an array of hashes where the
# key specifies the month number (i.e. 1-12) and the value is an array
# containing the days of the month # (i.e. 1-31) when the streets will
# be cleaned.
#
# Following that scheme then your data might looks something like:
#
# [
# 1: [7, 8], # January 7th and 8th
# 2: [2, 4],
def test
puts "alkjdfalkjf"
end
first = 0
last = 1000
total = 0
multipules = []
# build the array of multipules
(first..last).each do |list|
if (list % 5 == 0) or (list % 3 == 0)
multipules.push(list)
end
print "What is your start year? "
start = gets.chomp.to_i
print "What is your finish year? "
finish = gets.chomp.to_i
while finish > start
puts finish -= 1
end
@coryschires
coryschires / beer.rb
Created May 7, 2012 20:16
Bottle of beer examples
bottle_num = 100
# You can clean up the the puts statement using interpolation (i.e. "Some words #{a_variable} and more words")
#
while bottle_num > 0
puts "#{bottle_num -= 1} bottles of beer on the wall"
end
# Or you could even one line it.
#