Skip to content

Instantly share code, notes, and snippets.

Avatar

Adam Gotterer adamgotterer

  • CTO @ Common
  • New York, NY
View GitHub Profile
View Docusign Forward Envelope API.md

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 Dec 30, 2020
Authenticate with Docusign using Faraday
View Docusign authentication.rb
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 Apr 19, 2019
Experiments with storing typed attributes in Postgres
View Column References.sql
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');
View elevator.py
# 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 Jul 23, 2018
Crystal WebSocket Client/Server Ping/Pong
View websocker.cr
# 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 Jun 20, 2018
Puppeteer headless chrome with chroxy
View Dockerfile
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
Ruby Elevator
View Elevator
#!/usr/bin/ruby
# elevator.rb
require 'drb/drb'
requests = []
DRb.start_service('druby://localhost:9999', requests)
tick = 0
loop do
View terraform-crash-log
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:
View terraform-panic
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 Nov 16, 2015
Recursively transform the values of a Hash or Array
View deep_transform_values.rb
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