Most weather data sources give you an array of hashes (representing hours or days) with data points like so:
[
{
temperature: 73,
windSpeed: 10,
},
{
temperature: 70,
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>title</title> | |
</head> | |
<body> | |
<p>body</p> | |
</body> | |
</html> |
$('.submittable').live('change', function() { | |
$(this).parents('form:first').submit(); | |
}); |
Most weather data sources give you an array of hashes (representing hours or days) with data points like so:
[
{
temperature: 73,
windSpeed: 10,
},
{
temperature: 70,
# gem install httparty | |
# ruby gists.rb | |
require 'httparty' | |
class Gists | |
include HTTParty | |
@username = 'x' | |
@password = 'x' |
class Game | |
attr_gtk | |
def tick | |
defaults | |
input | |
calc | |
render | |
end |
2139 ℹ INFORMATION SOURCE | |
23EB ⏫ BLACK UP-POINTING DOUBLE TRIANGLE | |
23EC ⏬ BLACK DOWN-POINTING DOUBLE TRIANGLE | |
23F0 ⏰ ALARM CLOCK | |
23F3 ⏳ HOURGLASS WITH FLOWING SAND | |
26C5 ⛅ SUN BEHIND CLOUD | |
26D4 ⛔ NO ENTRY | |
2705 ✅ WHITE HEAVY CHECK MARK | |
2753 ❓ BLACK QUESTION MARK ORNAMENT | |
2757 ❗ HEAVY EXCLAMATION MARK SYMBOL |
# When a spammer wants to attack your site, they'll likely send an automated bot | |
# that will blindly fill out any forms it encounters. The idea of a "honeypot" is that | |
# you place a hidden field in a form. That's the honeypot. If this field is filled in, then | |
# it's almost certain to be a spammer (since a normal user wouldn't have even seen the | |
# field), and the contents of the form can safely be discarded. | |
# Normally, you would implement a "honeypot" in a Rails app with some combination of a | |
# special field in a particular form, and then some logic in the corresponding controller that | |
# would check for content in the "honeypot" field. This is somewhat of an inefficient | |
# approach, because it requires special code (not DRY), and bots are still going through an |
class NoWWW | |
STARTS_WITH_WWW = /^www\./i | |
def initialize(app) | |
@app = app | |
end | |
def call(env) | |
if env['HTTP_HOST'] =~ STARTS_WITH_WWW |
# gem install bundler | |
# ruby hello_world.rb | |
require 'bundler/inline' | |
gemfile do | |
source 'https://rubygems.org' | |
gem 'rails', '~> 5.0' | |
end |