| Language | HTTP |
|---|---|
| Clojure | Client |
| Erlang | Client |
| Go | Client |
| Haskell | Client |
| Node | Yes |
| OCaml | No |
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 Game | |
| attr_accessor :home | |
| attr_accessor :away | |
| def initialize(home, away) | |
| @home = home | |
| @away = away | |
| end | |
| def city |
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
| Dividata::Application.config.middleware.use Rack::Attack | |
| Rack::Attack.whitelist("localhost") do |request| | |
| ['127.0.0.1'].include? request.ip | |
| end | |
| Rack::Attack.throttle 'requests/minute', limit: 60, period: 1.minute, &:ip | |
| Rack::Attack.throttle 'requests/hour', limit: 600, period: 1.hour, &:ip | |
| Rack::Attack.throttle 'requests/day', limit: 3000, period: 1.day, &:ip |
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
| User 'glance' has role '_member_' in scope 'project:service' | |
| User 'glance' has role 'service' in scope 'project:service' | |
| User 'nova' has role 'ResellerAdmin' in scope 'project:service' | |
| User 'nova' has role 'admin' in scope 'project:service' | |
| User 'nova' has role '_member_' in scope 'project:service' | |
| User 'swiftusertest3' has role 'anotherrole' in scope 'project:swifttenanttest1' | |
| User 'swiftusertest3' has role '_member_' in scope 'project:swifttenanttest1' | |
| User 'demo' has role 'heat_stack_owner' in scope 'project:demo' | |
| User 'demo' has role 'Member' in scope 'project:demo' | |
| User 'demo' has role 'anotherrole' in scope 'project:demo' |
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 After | |
| def worked?; true; end | |
| end | |
| module Newless | |
| module_function | |
| def newless(klass) | |
| method_name = klass.name.to_sym | |
| return if \ |
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
| module Guillemets | |
| def inspect; "<<#{self}>>"; end | |
| end | |
| Value = Struct.new(:value) do | |
| include Guillemets | |
| def reducible?; false; end | |
| end | |
| Operation = Struct.new(:left, :right) do |
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
| $ tree -L 3 $GOPATH/src | |
| /Users/Justin/Code/go/src | |
| ├── bitbucket.org | |
| │ └── mountdiablo | |
| │ └── ce_nikola | |
| ├── code.google.com | |
| │ └── p | |
| │ ├── go-uuid | |
| │ ├── go.tools | |
| │ ├── goplan9 |
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
| puts "About to define BaseService" | |
| class BaseService | |
| puts "BaseService code running" | |
| def self.clone; puts "clone called"; super; end | |
| def self.dup; puts "dup called"; super; end | |
| end | |
| puts "About to inherit from BaseService" |
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 ClassOne | |
| def name | |
| :one | |
| end | |
| end | |
| ClassOne.new.name # => :one | |
| ClassTwo = Class.new do | |
| def name |
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
| use std::collections::HashMap; | |
| type Token = String; | |
| type Url = String; | |
| struct World { id: int, urls: HashMap<Token, Url> } | |
| fn main() { | |
| let mut world = World { urls: HashMap::new(), id: 0i }; |