- Line 13 in
CookbookUploadsController
. Do we need to check if the upload is valid if we're checking if it's valid in thefinish!
method? - What value does Virtus add to
CookbookUpload::Metadata
that can't be achieved with accessors?
class A
attr_accessor :b, :c, :d
def initialize(h)
h.each { |k, v| send("#{k}=", v) }
end
end
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
require 'parslet' | |
recipe = <<EOH | |
:1 oz: @1 :60 Minutes: | |
:1 oz: @2 :30 Minutes: | |
EOH | |
class BierDown < Parslet::Parser | |
rule(:colon) { match(':') } | |
rule(:at) { match('@') } |
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
irb(main):022:0> Cookbook.find_by(name: 'mysql').cookbook_versions.sort_by { |v| Semverse::Version.new(v.version) }.reverse.first | |
Cookbook Load (0.6ms) SELECT "cookbooks".* FROM "cookbooks" WHERE "cookbooks"."name" = 'mysql' LIMIT 1 | |
CookbookVersion Load (2.5ms) SELECT "cookbook_versions".* FROM "cookbook_versions" WHERE "cookbook_versions"."cookbook_id" = $1 [["cookbook_id", 699]] | |
=> #<CookbookVersion id: 2861, cookbook_id: 699, license: "Apache 2.0", version: "4.1.2", created_at: "2014-02-28 10:27:00", updated_at: "2014-02-28 10:27:00", tarball_file_name: "mysql20140228-22364-1stzk6m", tarball_content_type: "application/x-tar", tarball_file_size: 26275, tarball_updated_at: "2014-02-28 10:26:56", readme: "mysql Cookbook\n==============\n[![Build Status](htt...", readme_extension: "md", dependencies_imported: true, description: "Installs and configures mysql for client or server", legacy_id: 6009, web_download_count: 65, api_download_count: 0, verification_state: "pending"> | |
irb(main):023:0> Cookbook |
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
self.navigationController.view.addConstraints([ | |
NSLayoutConstraint( | |
item: add, | |
attribute: .Width, | |
relatedBy: .Equal, | |
toItem: add, | |
attribute: .Width, | |
multiplier: 1, | |
constant: 0 | |
), |
- Mule Bar - Good beer bar, craft cocktails and food.
- Misery Loves Company - Amazing low class, high class food. I recommend going for lunch. Also serves some good beer and cocktails. My favorites are the Big Red, Rough Francis and the Korean Rueben.
- Winooski Beverage Warehouse (The Bevie) - Huge bottled/can beer and wine selection. I go here pretty much on a weekly basis.
- American Flatbread - My favorite restaurant in town. Really fantastic wood fired pizza and one of my favorite microbreweries in Vermont (they have ~15 of their own beers on draft). My personal favorite is the Medicine Wheel w/ Sausage. On the weekend they also do brunch flatbreads.
- [Farmhouse Tap & Grill](http://www.yelp.com/biz/the-farmhouse-tap-and-grill-burlingto
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
function fish_greeting | |
set_color green | |
print_weather | cowsay | |
end | |
function print_weather | |
if test -f .weather | |
set time (head -n 1 .weather) | |
set current (date +%s) | |
set diff (math $current - $time) |
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
require.paths.unshift(__dirname + '/modules', __dirname + '/lib/node', __dirname); | |
var express = require('express'); | |
var app = module.exports = new express.Server(); | |
app.configure(function() { | |
app.use(express.cookieDecoder()); | |
app.use(express.session()); | |
}); |
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
LOAD DATA INFILE '/path/to/file' IGNORE INTO TABLE data.timeseries FIELDS TERMINATED BY ',' ENCLOSED BY '"' IGNORE 1 LINES; |
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
.reject { |key, value| columns.map(&:name).include?(key) }.keys |
OlderNewer