Skip to content

Instantly share code, notes, and snippets.

@budnik
budnik / d1t1.rb
Last active December 24, 2019 16:29
advent2019
def move(d, l, c)
case d
when ?R then [c.first+l, c.last]
when ?L then [c.first-l, c.last]
when ?U then [c.first, c.last-l]
when ?D then [c.first, c.last+l]
end
end
@budnik
budnik / gist:85197cf1de40c43399a0f59b55b18a09
Created December 2, 2025 17:20
Results of git grep 'Aws::'
app/controllers/api/v3/users_controller.rb: dynamodb = Aws::DynamoDB::Client.new(region: 'us-west-2')
app/controllers/api/v3/users_controller.rb: # dynamodb = Aws::DynamoDB::Client.new(region: 'us-west-2')
app/controllers/api/v4/users_controller.rb: # s3 = Aws::S3::Client.new
app/controllers/api/v4/users_controller.rb: rescue Aws::Rekognition::Errors::InvalidParameterException
app/controllers/api/v4/users_controller.rb: rescue Aws::Rekognition::Errors::ImageTooLargeException
app/controllers/api/v4/users_controller.rb: rescue Aws::Rekognition::Errors::InvalidS3ObjectException => e
app/controllers/api/v4/users_controller.rb: rescue Aws::Rekognition::Errors::InvalidImageFormatException
app/controllers/api/v4/users_controller.rb: rescue Aws::Rekognition::Errors::InvalidParameterException, Aws::Rekognition::Errors::ImageTooLargeException, Aws::Rekognition::Errors::InvalidS3ObjectException => e
app/controllers/api/v4/users_controller.rb: dynamodb = Aws::DynamoDB::Client.new(