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
# https://www.invisionpower.com/support/guides/_/install-and-getting-started/installing-r18 | |
# before installation | |
## blue | |
chmod 0777 blog | |
## blue with * | |
chmod -R 0777 cache css_files downloads hooks public/ipc_blocks public/style_css public/style_emoticons public/style_images screenshots | |
uploads |
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
// ==UserScript== | |
// @name Hide HarvestApp "Submit for Approval" button | |
// @namespace http://tablexi.harvestapp.com/ | |
// @version 0.1 | |
// @description This script hides anything with the .approval-button class | |
// @author Mark Yoon | |
// @match https://tablexi.harvestapp.com/* | |
// @grant GM_addStyle | |
// ==/UserScript== |
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
{ | |
"$schema": "http://json-schema.org/draft-04/schema#", | |
"definitions": { | |
"entry": { | |
"allOf": [ | |
{ "$ref": "#/definitions/thing_with_codes" }, | |
{ "properties": { | |
"description": { "type": ["string", "null"] }, | |
"specifics": { "type": ["string", "null"] }, | |
"time": { "type": ["integer", "null"] }, |
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
module SurveySectionCustomMethods | |
def translation(locale) | |
{:title => self.title, :description => self.description} | |
end | |
end | |
class SurveySection < ActiveRecord::Base | |
include Surveyor::Models::SurveySectionMethods | |
include SurveySectionCustomMethods | |
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
module SurveyCustomMethods | |
def translation(locale_symbol) | |
{:title => self.title, :description => self.description} | |
end | |
end | |
class Survey < ActiveRecord::Base | |
include Surveyor::Models::SurveyMethods | |
include SurveyCustomMethods | |
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
require 'rubygems' | |
require 'zip' | |
archive_directory_path = '' | |
archive_zip_path = '' | |
Zip::File.open( archive_zip_path, Zip::File::CREATE ) do |zip_file| | |
Dir[ File.join( archive_directory_path, "**", "**" ) ].each do |file| | |
zip_file.add( file.sub( "#{ archive_directory_path }/", "" ), file ) | |
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
Questions may have many answers, e.g. "Fun, Kind, Cool". Export one column per answer, or collapse to one column per question. | |
%h4 Columns - one per: | |
= radio_button_tag :column, :answer, true | |
= label_tag :column_answer, "answer" | |
= radio_button_tag :column, :question | |
= label_tag :column_question, "question" | |
An answer has various identifiers set in the form definition. Response count is the number of times an answer is selected. |
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
def self.export(params) | |
{:report => "", :name => "blank"} if params[:responses].blank? | |
# surveys | |
responses_surveys = Survey.includes({:sections => {:questions => :answers}}).find(params[:responses] || []) | |
questions = responses_surveys.map(&:sections).flatten.map(&:questions).flatten.reject{|q| q.display_type == "label"} | |
answers = questions.map(&:answers).flatten | |
# response sets | |
from = params[:date_from].blank? ? nil : Date.strptime(params[:date_from], '%m-%d-%Y') |
NewerOlder