Skip to content

Instantly share code, notes, and snippets.

View hayduke19us's full-sized avatar
🐙

matthew sullivan hayduke19us

🐙
View GitHub Profile
$ ->
#this effect takes 4 arguments
#the first is the 'div' that is intended to be faded
#the second 'tall' is the integer to be multiplied by the divs height
#like for the second div you would multiply by 2
#the third arg 'adjustment' is to start the fade before the
#div is out of sight
#the fourth is a lambda option with default null
#this arg must be a funtion in this case i want the globe to
require "colorize"
module Adjuster
def self.method_time
Adjuster.measure {BetterBenchmark.new}
end
def self.block_time
x = measure {yield}
require "minitest/autorun"
class Archeology
#The method 'function' takes a single argument. The argument must be a collection,
#or at least something enumerble since the inject method is used. Inject's
#argument is an accumulator the block proceding has two interpolations. The
#first is injects accumulator, an empty hash. The second "val" will iterate thru
#the collection given to the function method. The block of code that follows
#does something really funny. It begins to populate the empty hash or
require "minitest/autorun"
class Archeology
#The method 'function' takes a single argument. The argument must be a collection,
#or at least something enumerble since the inject method is used. Inject's
#argument is an accumulator the block proceding has two interpolations. The
#first is injects accumulator, an empty hash. The second "val" will iterate thru
#the collection given to the function method. The block of code that follows
# this request will show you a headcount of 10
https://api.meetup.com/2/event/5898549\?sign\=true\&key\=59512b1f5939553e4e7962a15154c
# this request will show you the attendance *NOTICE* the members id's are
# missing
https://api.meetup.com/momsmeetupofco/events/5898549/attendance%5C?sign%5C=true%5C&key%5C=59512b1f5939553e4e7962a15154c
# Same attendance request with filter=all
http https://api.meetup.com/momsmeetupofco/events/5898549/attendance\?sign\=true\&key\=59512b1f5939553e4e7962a15154c\&filter\=all
# The original method
def create_report_identifier
field = Field.find(self.field_id)
field_name = field.field_name
report_date = self.date.to_s
self.report_identifier_id = field_name << ' ' << report_date
end
# the decoupled version
# law of demeter

##Field Journel Docs

We will document all software development by following this pattern.

git clone https://github.com/Paradigmisr/field_journel_docs.git 

When creating new files follow this pattern

Routing: append Routing.md

require 'test_helper'
class ScoutTest < ActiveSupport::TestCase
test
end
$(document).on("click", "#menu", ->
$( '.off-canvas-wrap' ).foundation('offcanvas', 'show', 'move-right');
false
)
$(document).foundation({
offcanvas : {
open_method : 'move',
close_on_click : true
}
class Api::V1::Scout::SessionsController < Devise::SessionsController
skip_before_filter :verify_authenticity_token
prepend_before_filter :allow_params_authentication!, only: :create
prepend_before_filter :require_no_authentication, :only => [:create ]
include Devise::Controllers::Helpers
respond_to :json
def create
if correct_headers?