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
'use strict'; | |
// http://docs.aws.amazon.com/lambda/latest/dg/test-sam-local.html#sam-cli-simple-app | |
// This is the corrected code for the url above. Specifically, the example for | |
// product.js does not return`body`, `header`, nor `statusCode` for GET, PUT and | |
// DELETE methods. Original code is included at the bottom. | |
exports.handler = (event, context, callback) => { | |
let id = event.pathParameters.product || false; |
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
#!/bin/sh | |
####################################################### | |
# Another great script by: # | |
# _ , _ # | |
# / ) _, _ |) /|/_) ,_ _ _ # | |
# / / | / |/\ | \/ | / \_| | |_/|/| |/ # | |
# /__/\/|_/\__/| |/|(_/ |/\_/ \/ \/ | |_/|_/ # | |
# (| # | |
# # |
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
<tr class="nested-fields"> | |
#How do I use strftime on the drug date field below? | |
<td><%= f.input :drug_date, as: :string, label: false, :input_html => { class: 'ui-date-picker' } %></td> | |
<td><%= f.input :drug, label: false %></td> | |
<td><%= f.input :drug_amount, label: false %></td> | |
<td><%= f.input :drug_problem, label: false %></td> | |
<td><%= f.input :drug_administrator, label: false %></td> | |
<td><%= link_to_remove_association "remove", f, class: "btn btn-primary btn-sm" %></td> | |
</tr> |
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
function scan_preprocess_panels_pane(&$variables) { | |
if($variables['pane']->type == 'entity_field' && $variables['pane']->subtype == 'node:field_physical_address') { | |
watchdog('theme', 'I have a suggestion!'); | |
$variables['theme_hook_suggestions'][] = 'panels-pane__address'; | |
} | |
} |
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
link "/vagrant/modules" do | |
to "/vagrant/www/sites/#{node[:my][:sitename]}.dev/modules" | |
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
class CountryInput < Formtastic::Inputs::CountryInput | |
def to_html | |
raise "To use the :country input, please install a country_select plugin, like this one: https://github.com/jamesds/country-select" unless builder.respond_to?(:country_select) | |
input_wrapping do | |
label_html << | |
builder.country_select(method, priority_countries, input_options) | |
end | |
end | |
def priority_countries |