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
def test
puts "alkjdfalkjf"
end
# 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],
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) ->
@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
@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 / 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>