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
| # Allows `require` to work for libs outside of Bundler's environment, so you can require | |
| # gems that aren't in the project's Gemfile while inside an irb session (for example). | |
| if defined?(Gem.post_reset_hooks) | |
| Gem.post_reset_hooks.reject!{ |hook| hook.source_location.first =~ %r{/bundler/} } | |
| Gem::Specification.reset | |
| load 'rubygems/custom_require.rb' | |
| alias gem require | |
| 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
| import { Observable } from 'rxjs' | |
| // Takes a higher-order observable as input and subscribes to its inner | |
| // observables. Emits an array containing the last emitted value from each *active* | |
| // inner observable when: | |
| // | |
| // 1. any inner observable emits | |
| // 2. any inner observable completes | |
| // | |
| // In contrast to `combineLatest`, the latest value from completed observables |
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 | |
| DBNAME=${DBNAME:-database} | |
| help() { | |
| echo "A very lol key/value database written in bash. | |
| usage: bashdb <command> <args> | |
| get <key> Get a value from the database |
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
| # Quick way to log both stubbing instructions and the response of a real request. | |
| # Useful for stubbing real requests without having to resort to VCR. | |
| WebMock.allow_net_connect! | |
| WebMock.after_request do |request_signature, response| | |
| puts "\nA real HTTP request was made." | |
| puts WebMock::RequestSignatureSnippet.new(request_signature).stubbing_instructions | |
| puts "----- RESPONSE HEADERS -----" |
OlderNewer