This file contains hidden or 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
{ | |
"data"=>{ | |
"reports"=>{ | |
"1"=>[ | |
{ | |
"grower_id"=>4, | |
"irrigation"=>"", | |
"id"=>123, | |
"staging"=>"test", | |
"weather"=>"", |
This file contains hidden or 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
# Unbind default prefix of Ctrl-b | |
unbind C-b | |
# Bind prefix to Ctrl-a instead of Ctrl-b | |
set -g prefix C-a | |
# Binding the prefix to Ctrl-a requires and additional configuration | |
# to allow us to send that prefix to other commands through tmux | |
# when we need it, like with Vim and Bash. Now we can send the | |
# Ctrl-a command through to other programs by pressing Ctrl-a twice. |
This file contains hidden or 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 Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains hidden or 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
Rails.application.configure do | |
# Settings specified here will take precedence over those in config/application.rb. | |
# Code is not reloaded between requests. | |
config.cache_classes = true | |
# Eager load code on boot. This eager loads most of Rails and | |
# your application in memory, allowing both threaded web servers | |
# and those relying on copy on write to perform better. | |
# Rake tasks automatically ignore this option for performance. |
This file contains hidden or 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
GEM | |
remote: https://rubygems.org/ | |
specs: | |
actionmailer (4.1.10) | |
actionpack (= 4.1.10) | |
actionview (= 4.1.10) | |
mail (~> 2.5, >= 2.5.4) | |
actionpack (4.1.10) | |
actionview (= 4.1.10) | |
activesupport (= 4.1.10) |
This file contains hidden or 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 'test_helper' | |
class Api::V1::Scout::SyncControllerTest < ActionController::TestCase | |
test "sync without an email returns error" do | |
get :get_sync, format: :json | |
assert_equal "Missing email header", response_body["message"] | |
end | |
test "sync with wrong email returns error and no timestamp or token" do |
This file contains hidden or 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 Admin < ActiveRecord::Base | |
# Include default devise modules. Others available are: | |
# :confirmable, :lockable, :timeoutable and :omniauthable | |
devise :database_authenticatable, :registerable, | |
:recoverable, :rememberable, :trackable, :validatable | |
validates :key, format: {with: /\A#{ENV["admin_key"]}/} | |
def self.send_report_notification report | |
all.each do |a| |
This file contains hidden or 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
+ (void)uploadImages { | |
// create an array of image names that need to be uploaded | |
FMDatabase *db = [FMDatabase databaseWithPath:[[Sync shared] databasePath]]; | |
[db open]; | |
NSUInteger count = 0; | |
NSUInteger total = [db intForQuery:@"SELECT COUNT(*) FROM images WHERE uploads>0"]; | |
//NSLog(@"%ld records", total); | |
FMResultSet *results = [db executeQuery:@"SELECT * FROM images WHERE uploads>0"]; |
This file contains hidden or 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
ActionModal = new Main.ActionModal | |
ActionModal.open( "#openSample", "#sampleModal"); | |
ActionModal.open( "#openStand", "#standModal"); | |
ActionModal.open( "#openRecommendation", "#recommendationModal" ); | |
ActionModal.close( "#closeRecommendation", "#recommendationModal"); | |
ActionModal.open( "#editReport", "#editReportModal"); | |
ActionModal.close( "#closeEditModal", "#editReportModal") | |
ActionModal.close( "#deleteReport", "#editModal"); | |
ActionModal.open( "#openYield", "#yieldModal") |
This file contains hidden or 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
{ | |
"data": | |
{ | |
"reports": | |
{ | |
"1": [ | |
{ | |
"id": 11984, | |
"staging": "V84", | |
"weather": "This should not be in created array", |