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
module DSL | |
# We put our DSL syntax (methods) in a separate module (ClassMethods) because it | |
# will be converted to class methods once a class includes it. | |
module ClassMethods | |
attr_reader :routes | |
##### SUPPORTED DSL SYNTAX | |
def get(uri, &block) | |
save_route(:get, uri, block) | |
end |
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
class Hash | |
def deep_transform_values(&block) | |
_deep_transform_values_in_object(self, &block) | |
end | |
def deep_transform_values!(&block) | |
_deep_transform_values_in_object!(self, &block) | |
end | |
private |
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
panic: runtime error: index out of range | |
goroutine 340 [running]: | |
panic(0x244d600, 0xc420010110) | |
/opt/go/src/runtime/panic.go:500 +0x1a1 | |
github.com/hashicorp/terraform/vendor/github.com/hashicorp/hil.(*evalCall).Eval(0xc4201c0170, 0x4068ea0, 0xc420437330, 0xc42053c250, 0x0, 0x0, 0x40, 0x0, 0x0) | |
/opt/gopath/src/github.com/hashicorp/terraform/vendor/github.com/hashicorp/hil/eval.go:231 +0x3f4 | |
github.com/hashicorp/terraform/vendor/github.com/hashicorp/hil.(*evalIndex).Eval(0xc4201c0160, 0x4068ea0, 0xc420437330, 0xc42053c250, 0x0, 0x0, 0x0, 0x2c19ead, 0x0) | |
/opt/gopath/src/github.com/hashicorp/terraform/vendor/github.com/hashicorp/hil/eval.go:258 +0x12b | |
github.com/hashicorp/terraform/vendor/github.com/hashicorp/hil.(*evalVisitor).visit(0xc42053c240, 0x406c020, 0xc420220ba0, 0x10, 0xc4204377a0) |
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
2016/09/15 17:43:45 [INFO] Terraform version: 0.7.3 0dd7c657d6d60d2e7392b66ae6f74fb84582cab9 | |
2016/09/15 17:43:45 [INFO] CLI args: []string{"/usr/local/Cellar/terraform/0.7.0/bin/terraform", "plan", "-var-file", "terraform.tfvars"} | |
2016/09/15 17:43:45 [DEBUG] Detected home directory from env var: /Users/adam | |
2016/09/15 17:43:45 [DEBUG] Detected home directory from env var: /Users/adam | |
2016/09/15 17:43:45 [DEBUG] Attempting to open CLI config file: /Users/adam/.terraformrc | |
2016/09/15 17:43:45 [DEBUG] File doesn't exist, but doesn't need to. Ignoring. | |
2016/09/15 17:43:45 [DEBUG] Detected home directory from env var: /Users/adam | |
2016/09/15 17:43:45 [DEBUG] New state was assigned lineage "dbd7fe63-2bfc-4357-b74f-c2b5dc5ee50c" | |
2016/09/15 17:43:45 [TRACE] Graph after step *terraform.ConfigTransformer: |
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
#!/usr/bin/ruby | |
# elevator.rb | |
require 'drb/drb' | |
requests = [] | |
DRb.start_service('druby://localhost:9999', requests) | |
tick = 0 | |
loop do |
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
FROM node:8-slim | |
ARG DEBIAN_FRONTEND=noninteractive | |
ENV PUPPETEER_VERSION 1.5.0 | |
ENV CHROXY_VERSION 0.3.2 | |
RUN apt-get update -qqy \ | |
&& apt-get -qqy install \ | |
unzip gnupg curl wget ca-certificates apt-transport-https \ | |
git ttf-wqy-zenhei g++ libzmq3-dev apt-utils vim \ |
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
# Client | |
require "http" | |
client = HTTP::WebSocket.new(URI.parse("ws://127.0.0.1:9333")) | |
client.send "ping" | |
client.on_message do |str| | |
puts str | |
client.send "ping" | |
sleep 1 |
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
# elevator.py | |
from random import randint | |
# from SimpleXMLRPCServer import SimpleXMLRPCServer # Python 2 | |
from xmlrpc.server import SimpleXMLRPCServer # Python 3 | |
MAX_FLOOR = 10 | |
current_floor = 0 | |
server = SimpleXMLRPCServer(("localhost", 8000), logRequests=False) |
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
CREATE TABLE attribute_types ( | |
attribute_type_id SERIAL PRIMARY KEY, | |
type TEXT NOT NULL, | |
value TEXT NOT NULL | |
); | |
INSERT INTO attribute_types(type, value) VALUES ('Kitchen', 'Deluxe'); | |
INSERT INTO attribute_types(type, value) VALUES ('Kitchen', 'Small'); | |
INSERT INTO attribute_types(type, value) VALUES ('Windows', 'Clean'); |
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
conn = Faraday.new(:url => 'https://demo.docusign.net/restapi/v2.1', | |
headers: { | |
'X-DocuSign-Authentication' => { | |
Username: '', | |
Password: '', | |
IntegratorKey: '' | |
}.to_json, | |
'Accept' => 'application/json', | |
'Content-Type' => 'application/json' | |
}) do |builder| |