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
Recognized HTTParty parameters: | |
Class Foo | |
include HTTParty | |
http_proxy '<URL>', <PORT> # Allows setting http proxy information to be used | |
base_uri '<URL>' # Allows setting a base uri to be used for each request. Will normalize uri to include http, etc. | |
basic_auth '<USERNAME>', '<PASS>' # Allows setting basic authentication username and password. | |
digest_auth '<USERNAME>', '<PASS>' # Allows setting digest authentication username and password. | |
default_params <Default_Param_Hash> # Allows setting default parameters to be appended to each request. Great for api keys and such. |
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.version == '2.3.8' && Gem.available?('mongrel', Gem::Requirement.new('~>1.1.5')) && self.class.const_defined?(:Mongrel) | |
# Pulled right from latest rack. Old looked like this in 1.1.0 version. | |
# | |
# def [](k) | |
# super(@names[k] ||= @names[k.downcase]) | |
# end | |
# | |
module Rack |
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
const int inPin = 7; // pushbutton connected to digital pin 7 | |
//const int cmPerClick = 51; // cm | |
const float inchesPerClick = 20.1; // inches | |
int val = 0; // variable to store the read value | |
float totalDistance = 0; // total distance in inches | |
int lastTime = 0; | |
float difference = 0; |