ssh -L 3000:localhost:3000 -L 3001:localhost:3001 -L 3002:localhost:3002 -L 8000:localhost:8000 -L 35729:localhost:35729
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
| version: '3.3' | |
| services: | |
| database: | |
| image: mysql:5.7 | |
| container_name: mysql | |
| restart: always | |
| environment: | |
| MYSQL_DATABASE: 'ThriveFantasy' | |
| MYSQL_USER: 'tf' | |
| MYSQL_PASSWORD: 'password' |
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
| #!/usr/bin/env python | |
| import itertools, copy | |
| HOUSE_VALUE = { | |
| 'stark': 42, | |
| 'greyjoy': 20, | |
| 'martel': 25, | |
| 'baratheon': 40, | |
| 'lannister': 35, | |
| 'tyrell': 28 |
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
| date | visitor_id | |
|---|---|---|
| 2018-01-15 | pFihzA | |
| 2018-01-15 | 6N2dMg | |
| 2018-01-15 | P4rCVA | |
| 2018-01-15 | RE3k5A | |
| 2018-01-15 | sATrOg | |
| 2018-01-15 | hz-j3A | |
| 2018-01-15 | kVP6CQ | |
| 2018-01-15 | upEtnw | |
| 2018-01-15 | 8uur7A |
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
| class Card < Struct.new(:rank, :suit) | |
| def inspect | |
| "#{rank} of #{suit}s" | |
| end | |
| end | |
| ## | |
| # Problem #1 -- create a deck of cards and shuffle it | |
| ## |
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
| require 'active_support/multibyte/chars' | |
| require 'active_support/core_ext/string/inflections' | |
| require 'json' | |
| require 'httpi' | |
| require 'nokogiri' | |
| STG_CONTROL_FILE = '.last-date'.freeze | |
| STG_CHANNEL_URL = 'https://hooks.slack.com/services/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'.freeze | |
| STG_SKIPPED_MENUS = %w(Pastries Breakfast).freeze |
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
| require 'openssl' | |
| def hkdf(digest_klass, length, ikm, salt, info) | |
| prk = OpenSSL::HMAC.digest(digest_klass.new, salt, ikm) | |
| okm, t = '', '' | |
| (length.to_f / digest_klass.new.length).ceil.times do |index| | |
| t = OpenSSL::HMAC.digest(digest_klass.new, prk, "#{t}#{info}#{(index + 1).chr}") | |
| okm << t | |
| end |
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
| class MessageVerifierTest < ActiveSupport::TestCase | |
| def test_null_serializer | |
| verifier = ActiveSupport::MessageVerifier.new("Hey, I'm a secret!", serializer: ActiveSupport::MessageEncryptor::NullSerializer) | |
| message = verifier.generate("message", expires_in: 1.day, purpose: 'NullSerializer') | |
| assert_equal "message", verifier.verify(message) | |
| end | |
| end |
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
| # conversation: https://github.com/rack/rack/commit/734a00c5f4bb46e9a5e6e2677d89a2f285dcc185 | |
| # | |
| # user system total real | |
| # reverse: 0.030000 0.010000 0.040000 ( 0.046804) | |
| # join: 0.090000 0.000000 0.090000 ( 0.092356) | |
| # regexp: 0.080000 0.000000 0.080000 ( 0.087152) | |
| # slice 0.010000 0.000000 0.010000 ( 0.004146) | |
| require 'benchmark' |
NewerOlder