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
# for now, only run if we have a clean slate | |
def self.load_from_apis_for_jurisdiction(abbreviation) | |
return if self.in(abbreviation).count > 0 | |
api_parse(results_for_jurisdiction(abbreviation)).map do |attributes| | |
create_from_apis attributes | |
end | |
end | |
def self.create_from_apis(attributes, options = {}) |
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
setting = SystemSetting.find_by_name('Maximum Uploaded File Size') |
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
setting = SystemSetting.find_by_name('Image Sizes') |
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/bash | |
### BEGIN INIT INFO | |
# Provides: kbzb | |
# Required-Start: $mysql $all | |
# Required-Stop: $mysql | |
# Default-Start: 2 | |
# Default-Stop: | |
# Short-Description: Reboot all Backgroundrb and Zebra for Kete instances | |
### END INIT INFO |
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
nextStep = (event) -> | |
button = event.delegateTarget | |
steps = $(button).attr('data-relevant-steps').split(', ') | |
currentStep = $(button).attr 'data-current-step' | |
currentStepId = stepId(currentStep) | |
currentStepIndex = steps.indexOf(currentStep) | |
nextStepIndex = currentStepIndex + 1 | |
nextStepName = steps[nextStepIndex] | |
nextStepId = stepId(nextStepName) |
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
<%= render 'shared/navigation' %> | |
<section class="question ask"> | |
<%= form_for @question, url: questions_path(@state_code), validate: true, html: { accept_charset: 'utf-8' } do |f| %> | |
<%= f.hidden_field :user_id if user_signed_in? %> | |
<%= f.hidden_field :person_id %> | |
<%= f.validate :person_id %> | |
<% locals = { question: @question, person: @person, relevant_steps: @relevant_steps, first_step: @first_step, f: f } -%> | |
<% @relevant_steps.each do |step| %> |
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
allowed_attributes = [:full_name, :photo_url, :party] | |
needed_methods = [:id, :most_recent_chamber_title, :most_recent_district] | |
respond_with @people.as_json({ only: allowed_attributes, methods: needed_methods }) |
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
# Customize to your needs... | |
# export PATH=... | |
source $HOME/.zshenv | |
# suck in stuff for backwards compatibility | |
source $HOME/.profile |
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
plugins=(brew bundler capistrano coffee cp gem git git-remote-branch github heroku osx pow powder rails3) |
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
(setenv "ESHELL" "/usr/local/bin/zsh") | |
(setenv "SHELL" "/usr/local/bin/zsh") |