This configuration assumes you have:
- A YubiKey that supports OpenPGP (4, 4 Nano, 4C, or NEO)
- GPGTools (I couldn't get PIN entry, which is required for interfacing to work with any other GPG's version of pinentry)
- Insert YubiKey into USB port.
| require 'net/http' | |
| require 'time' | |
| require 'json' | |
| require 'uri' | |
| require 'pry' | |
| TOKEN = File.read('nyt-s.token').rstrip | |
| API_BASE = 'https://www.nytimes.com/svc/games' | |
| DELAY = 0.2 |
| require 'tempfile' | |
| WORDS_FILE = 'words.txt'.freeze | |
| SOLUTIONS_FILE = 'solutions.txt'.freeze | |
| def unique_letters_for_words(words) | |
| words.join.split('').uniq.sort.join | |
| end | |
| # Ex: verify_solution_against_puzzle(['DISTURB', 'BLACKJACK'], ['JLI', 'CUD', 'BTK', 'ASR']) |
| { | |
| "AWSTemplateFormatVersion": "2010-09-09", | |
| "Outputs": { | |
| "DistributionHostname": { | |
| "Description": "Use this domain name in your DNS provider.", | |
| "Value": { | |
| "Fn::GetAtt": [ | |
| "RootDistribution", | |
| "DomainName" | |
| ] |
| resource "aws_s3_bucket" "b" { | |
| bucket = "my-tf-test-bucket-{random_string.suffix.id}" | |
| } | |
| resource "random_string" "suffix" { | |
| length = 20 | |
| special = false | |
| upper = false | |
| } |
| # Our product relies on SSH for authentication and transport in various parts | |
| # of the app. Most operations generate a certificate with particular | |
| # restrictions to constrain what the user can do once they're authenticated to | |
| # the SSH portal. | |
| # The Core API would be making the permission decisions (i.e. | |
| # what force command to use, whether to allocate port forwarding), and this | |
| # module is responsible for providing a corresponding SSH Certificate. | |
| # For example: DB Tunnel operations are allowed to port-forward, but they're |
| require 'net/http' | |
| require 'time' | |
| require 'json' | |
| require 'uri' | |
| TOKEN = File.read('nyt-s.token').rstrip | |
| API_BASE = 'https://nyt-games-prd.appspot.com/svc/crosswords' | |
| DELAY = 0.1 |
| AWSTemplateFormatVersion: '2010-09-09' | |
| Description: | | |
| Template for a CloudFront distribution that serves Secure Headers | |
| Parameters: | |
| Domain: | |
| Type: String | |
| Description: | | |
| CNAME at which CloudFront distribution will be served (e.g., foobar.com) |
| require 'json' | |
| BASE_URL = 'https://slack.com/api' | |
| TOKEN = ENV['SLACK_TOKEN'] | |
| BACKOFF = 0.2 | |
| channels_url = "#{BASE_URL}/conversations.list?token=#{TOKEN}" | |
| channels = JSON.parse(`curl -s '#{channels_url}'`)['channels'] | |
| sleep BACKOFF |
I hereby claim:
To claim this, I am signing this object: