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 DocuSign | |
class CreateEnvelopeDefinition < ActiveInteraction::Base | |
record :consumer, class: 'Consumer' | |
record :dealer, class: 'Dealer' | |
object :templates_hash, class: 'Hash' | |
def execute | |
envelope_definition = DocuSign_eSign::EnvelopeDefinition.new(status: 'sent', compositeTemplates: build_composite_templates) | |
# envelope level webhook notification https://developers.docusign.com/platform/webhooks/connect/create-webhook-listener/ | |
envelope_definition.event_notification = event_notification |
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
require 'json' | |
require 'base64' | |
require 'aws-sdk-s3' | |
def lambda_handler(event:, context:) | |
region = '' | |
bucket_name = '' | |
access_key = '' | |
secret_key = '' |
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
Pattern WHITESPACE_PATTERN = Pattern.compile("\\s"); | |
private class ConnectedThread extends Thread { | |
private final BluetoothSocket mmSocket; | |
private final InputStream mmInStream; | |
private final OutputStream mmOutStream; | |
private byte[] mmBuffer; // mmBuffer store for the stream | |
public ConnectedThread(BluetoothSocket socket) { | |
mmSocket = socket; |
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
import android.bluetooth.BluetoothAdapter; | |
import android.bluetooth.BluetoothDevice; | |
import android.bluetooth.BluetoothSocket; | |
BluetoothSocket mmSocket; | |
UUID MY_UUID = UUID.fromString("2cf6e0ab-5417-4595-8564-487134f99ccd"); | |
try { | |
// Get a BluetoothSocket to connect with the given BluetoothDevice. | |
// MY_UUID is the app's UUID string, also used in the server code. |
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
import android.bluetooth.BluetoothAdapter; | |
import android.bluetooth.BluetoothDevice; | |
private static String OBD2_DEVICE_NAME = "OBDII"; // Name of the Device shipped by the manufacturer | |
BluetoothAdapter mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); | |
Set<BluetoothDevice> bondedDevices = mBluetoothAdapter.getBondedDevices(); | |
BluetoothDevice obd2Device; | |
for(BluetoothDevice bondedDevice: bondedDevices) { | |
if (bondedDevice.getName().contains(OBD2_DEVICE_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
import com.amazonaws.auth.CognitoCachingCredentialsProvider; | |
import com.amazonaws.mobileconnectors.kinesis.kinesisrecorder.KinesisRecorder; | |
File directory = getApplicationContext().getCacheDir(); | |
CognitoCachingCredentialsProvider credentialsProvider = new CognitoCachingCredentialsProvider(getApplicationContext(), "Identity pool ID", Regions.US_WEST_2); | |
KinesisRecorder kinesisRecorder = new KinesisRecorder(directory, Regions.US_WEST_2, credentialsProvider); | |
String kinesisStreamName = "test2-kinesis-data-stream"; | |
JSONObject json = new JSONObject(); | |
try { |