This file contains 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
-- An LCG consists of three values: a multiplier, an offset, and a | |
-- modulus. | |
data LCG = LCG | |
{ multiplier :: Integer | |
, offset :: Integer | |
, modulus :: Integer | |
} | |
deriving Show |
This file contains 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 'json' | |
require 'set' | |
# Create a personal access token at https://github.com/settings/tokens | |
# It needs only one scope: read:org ("Read org and team membership"). | |
TOKEN_FILE = 'secrets/token.txt'.freeze | |
SLEEP_TIME = 2 | |
global_name = 'track-maintainers'.freeze |
This file contains 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
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<script src="https://unpkg.com/[email protected]/dist/react.js"></script> | |
<script src="https://unpkg.com/[email protected]/dist/react-dom.js" | |
></script> | |
<script src="https://unpkg.com/[email protected]/dist/redux.js"></script> | |
<script src="https://unpkg.com/[email protected]/dist/react-redux.js" | |
></script> |
This file contains 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
# Multiple inheritance with Modules as an alternative to injected composition | |
# from Sandi Metz's talk [Nothing is Something](http://confreaks.tv/videos/bathruby2015-nothing-is-something) | |
# Like Sandi's 'direct' DI method this has behavior outside of the base class | |
# that gets composed together. However in this gist I compose modules in class | |
# definitions instead of injecting collaborators. | |
# Tradeoffs between this and Sandi's version are that in this case the API consumer doesn't | |
# have to know how to make a RandomEchoHouse (no `house = House.new(formatter: Whatever.new)`), | |
# but also the API consumer can't make anything not already accounted for either. |
This file contains 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_relative 'tail_call_optimization' # All files loaded AFTER this file with have tail-recursion enabled. | |
require_relative 'tail_factorial' |