Skip to content

Instantly share code, notes, and snippets.

def flater(arr):
result = []
for el in arr:
if isinstance(el, list):
result = result + flater(el)
else:
result.append(el)
return result
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,
p,blockquote,pre,a,abbr,acronym,address,big,code,em,img,
small,strong,sub,sup,tt,b,u,i,center,
ol,ul,li,table,caption,tbody,tfoot,thead,tr,th,td {
margin:0;
padding:0;
border:0;
font-size:100%;
font:inherit;
vertical-align:baseline;
@averjr
averjr / app.rb
Last active December 12, 2015 07:48
# GET request
get '/envelope-sample' do
haml :envelope_sample
end
# POST request to handle callback when document was signed
post '/envelope-sample/sign' do
# Content Type of callback is application/json
data = JSON.parse(request.body.read)
begin
# GET request
get '/envelope-sample' do
haml :envelope_sample
end
# POST request
post '/envelope-sample' do
haml :envelope_sample
end
%h3{:style => "text-align:center;"}
%a{:href => "/"} GroupDocs Ruby SDK Samples
\- Envelope sample
.samplecontent{:style => "padding:10px;"}
%i This sample will show how to use envelope and signature API using Ruby SDK
%br/
%i You can find documentation for this sample
%a{:href => "/docs/envelope-sample.html"} here
%br/
%br/
@averjr
averjr / app.rb
Last active December 12, 2015 07:48
require 'sinatra'
require 'groupdocs'
require 'haml'
get '/' do
haml :index
end
get '/style.css' do
sass :style
source :rubygems
gem 'sinatra'
gem 'groupdocs'
gem 'haml'