This file contains hidden or 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
# frozen_string_literal: true | |
class XlsxColumns | |
attr_reader :position | |
ALPHABET = ("A".."Z").to_a | |
class << self | |
def column(position) | |
if position > max_position | |
raise ArgumentError, "Position must be #{max_position} or lower" |
This file contains hidden or 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
# spec/support/shared/examples/cachable.rb | |
# frozen_string_literal: true | |
# Provide a simple interface for caching methods | |
# Usage example: | |
# | |
# class Foo | |
# include Cachable | |
# cache :bar |
This file contains hidden or 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
#!/bin/bash | |
# USE CASE | |
# I have a bucket with a lot of files and someone else wants to download them. | |
# They don't have AWS CLI for rsyncing. | |
# PURPOSE | |
# It is possible to generate a list of files present in an AWS bucket with the | |
# AWS CLI: | |
# aws s3 ls s3://bucket-name/path/ --region eu-west-1 --recursive | tee aws-files.txt |