Skip to content

Instantly share code, notes, and snippets.

View hayduke19us's full-sized avatar
🐙

matthew sullivan hayduke19us

🐙
View GitHub Profile
{
"data"=>{
"reports"=>{
"1"=>[
{
"grower_id"=>4,
"irrigation"=>"",
"id"=>123,
"staging"=>"test",
"weather"=>"",
# 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.
@hayduke19us
hayduke19us / 0_reuse_code.js
Last active August 29, 2015 14:22
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
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.
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)
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
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|
+ (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"];
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")
{
"data":
{
"reports":
{
"1": [
{
"id": 11984,
"staging": "V84",
"weather": "This should not be in created array",