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
responses = [] | |
host = 'https://api.getfeedback.com' | |
api_key = '[YOUR_API_KEY]' | |
path = '/surveys/[YOUR_SURVEY_ID]/responses' | |
def fetch_results_by_page(connection, page, path, per_page = 20) | |
response = connection.get(path) do |request| | |
request.params['page'] = page | |
request.params['per_page'] = per_page |
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
# team_id | first_officer_id | |
---|---|---|
91 | 91 | |
79357 | 79357 | |
507 | 507 | |
735 | 735 | |
995 | 995 | |
2154 | 2154 | |
4131 | 4131 | |
38247 | 38247 | |
8701 | 8701 |
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
diff --git a/config/initializers/active_record.rb b/config/initializers/active_record.rb | |
index 2f966a7..51a5cc7 100644 | |
--- a/config/initializers/active_record.rb | |
+++ b/config/initializers/active_record.rb | |
@@ -18,3 +18,23 @@ ActiveSupport.on_load(:active_record) do | |
Audited.configure_database_connection(config) | |
ActiveRecord::Base.establish_connection(config) | |
end | |
+ | |
+module ActiveRecord |
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
- (IBAction)swipedDown:(id)sender { | |
CGPoint location = [sender locationInView:self.view]; | |
NSLog(@"swiped down at %f, %f", location.x, location.y); | |
NSString *viewName = @"TaskQuickCreateView"; | |
TaskQuickCreateView *view = [[NSBundle mainBundle] | |
loadNibNamed:viewName | |
owner:self | |
options:nil][0]; |
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
# | |
# Script that will propagate changes made in the main en storyboard to the other locales | |
# | |
# https://code.google.com/p/edim-mobile/source/browse/trunk/ios/IncrementalLocalization/localize.py | |
# http://www.youtube.com/watch?v=cF1Rf02QvZQ | |
# Download the script and create a build phase along the lines of: | |
python ~/bin/localize-storyboards.py --mainIdiom=en --mainStoryboard=tauntaun/en.lproj/MainStoryboard.storyboard pt fr |
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
Task *task = self.task; | |
// Ensure we have the most fresh copy of the task | |
void (^successCallback)(void) = ^void(void) { | |
[[task managedObjectContext] refreshObject:task mergeChanges:YES]; | |
// TODO: Do we need to call the segue here? | |
}; | |
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
// http://jsfiddle.net/uNv8C/ | |
// https://forrst.com/posts/Animated_list_item_reordering_in_jQuery-RR1 | |
$(document).ready(function() { | |
$('li').click(function() { | |
// the clicked LI | |
var clicked = $(this); | |
// all the LIs above the clicked one | |
var previousAll = clicked.prevAll(); |
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
if Rails.env.features? || Rails.env.test? | |
ActiveRecord::Base.class_eval do | |
class << self | |
def delete_all_of_all | |
@model_subclasses_for_delete_all_of_all.each do |klass| | |
klass.delete_all | |
end | |
end | |
def inherited_with_model_tracker(subclass) | |
@model_subclasses_for_delete_all_of_all ||= [] |
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 'sanitize' | |
=> [] | |
>> s="<p>\r\n</p>" | |
=> "<p>\r\n</p>" | |
>> Sanitize.clean(s) | |
=> " \n" | |
>> exit |