Skip to content

Instantly share code, notes, and snippets.

View adamgotterer's full-sized avatar

Adam Gotterer adamgotterer

  • CTO @ Common
  • New York, NY
View GitHub Profile

As far as I can tell envelope forard isn't documented anywhere in the Docusign API and it took quite a bit of digging to figure it out. Here's how it works:

What is document forwarding?

Forwarding creates a copy of a completed envelope which you can send to new recipients as is or add new documents and fields as needed. For a forwarded envelope, you cannot remove any information or signatures on the completed documents, but you can add new recipients, documents, and recipient fields.

https://support.docusign.com/en/guides/ndse-user-guide-forward

@adamgotterer
adamgotterer / Docusign authentication.rb
Last active December 30, 2020 15:38
Authenticate with Docusign using Faraday
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|
@adamgotterer
adamgotterer / Column References.sql
Created April 19, 2019 13:50
Experiments with storing typed attributes in Postgres
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');
@adamgotterer
adamgotterer / elevator.py
Last active February 7, 2019 18:34
Python Elevator
# 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)
@adamgotterer
adamgotterer / websocker.cr
Last active July 23, 2018 15:56
Crystal WebSocket Client/Server Ping/Pong
# 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
@adamgotterer
adamgotterer / Dockerfile
Created June 20, 2018 15:48
Puppeteer headless chrome with chroxy
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 \
@adamgotterer
adamgotterer / Elevator
Last active May 6, 2019 01:50
Ruby Elevator
#!/usr/bin/ruby
# elevator.rb
require 'drb/drb'
requests = []
DRb.start_service('druby://localhost:9999', requests)
tick = 0
loop do
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:
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)
@adamgotterer
adamgotterer / deep_transform_values.rb
Created November 16, 2015 20:04
Recursively transform the values of a Hash or Array
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